4 ms·
-fpic is a single letter option, -f, followed by the parameter pic. Clang still uses two hyphens for long options including --help.
by sp332 5y ago
-fpic is a single letter option, -f, followed by the parameter pic. Clang still uses two hyphens for long options including --help.
- lifthrasiir 5y agoThere are tons of options that start with -f and can't be decomposed in that way [1, e.g. -framework]. They are essentially atomic options with a loose naming convention. [1] https://clang.llvm.org/docs/ClangCommandLineReference.html https://clang.llvm.org/docs/ClangCommandLineReference.html
- IgorPartola 5y agoCorrect. You cannot use “ramework” as an argument to “-f”. Instead use two dashes and it is unambiguous.
- lifthrasiir 5y agoIt took me some thoughts to realize what you wanted to say, and you are incorrect: there is no single option `-f` in cc options! `-f` is just a common prefix of hundreds of independent options, like `-fsanitize=...` (which can't be used as `-f sanitize=...`). As I've iterated before, those prefixes mostly represent broad categories of options and not hard and fast rules: `-g` for debug, `-i` for directories, `-m` for target architectures, `-W` for warnings, and `-f` for virtually everything else.
- deleted 5y ago[deleted]
- hsbauauvhabzb 5y agoBut maybe we should talk about the lack of space character between the flag and the argument…
- account42 5y agoThat's just how short options with arguments work in getopt POSIX land: '-oARG' is equivalent to '-o' 'ARG' just like '--option=ARG' is equivalent to '--option' 'ARG' (for GNU long options). This means that you cannot chain any other short options after one with an (optional) argument but otherwise does not cause any problems.
- hsbauauvhabzb 5y agoYes not every Linux/unix arg parser conforms to posix, some require a space, others do not.