diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 3c3dbc03d413..673d9ec494cb 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -46,9 +46,9 @@ while [ $n -lt ${#params[*]} ]; do isCpp=1 elif [ "$p" = -nostdlib ]; then isCpp=-1 - elif [ "${i:0:1}" != - ]; then + elif [ "${p:0:1}" != - ]; then nonFlagArgs=1 - elif [ "$i" = -m32 ]; then + elif [ "$p" = -m32 ]; then if [ -e @out@/nix-support/dynamic-linker-m32 ]; then NIX_LDFLAGS="$NIX_LDFLAGS -dynamic-linker $(cat @out@/nix-support/dynamic-linker-m32)" fi