diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 82f5c6443d54..df1afef33745 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -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