mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
cc-wrapper: Don't treat "-" alone as a flag
It means stdin, and is morally equivalent to passing a file. e.g. $ echo 'int main(void) { return 0; }' | gcc -x c - will compile and link a binary.
This commit is contained in:
parent
bdd6c037c0
commit
4f869bccc1
1 changed files with 2 additions and 1 deletions
|
@ -59,7 +59,8 @@ while (( "$n" < "$nParams" )); do
|
|||
cppInclude=0
|
||||
elif [ "$p" = -nostdinc++ ]; then
|
||||
cppInclude=0
|
||||
elif [ "${p:0:1}" != - ]; then
|
||||
elif [[ "$p" != -?* ]]; then
|
||||
# A dash alone signifies standard input; it is not a flag
|
||||
nonFlagArgs=1
|
||||
fi
|
||||
n+=1
|
||||
|
|
Loading…
Reference in a new issue