mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03: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
@ -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 New Issue
Block a user