cc-wrapper: handle -nostdinc{++,}

+8 -1
+8 -1
pkgs/build-support/cc-wrapper/cc-wrapper.sh
··· 22 getVersion=0 23 nonFlagArgs=0 24 [[ "@prog@" = *++ ]] && isCpp=1 || isCpp=0 25 26 params=("$@") 27 n=0 ··· 46 isCpp=1 47 elif [ "$p" = -nostdlib ]; then 48 isCpp=-1 49 elif [ "${p:0:1}" != - ]; then 50 nonFlagArgs=1 51 elif [ "$p" = -m32 ]; then ··· 106 fi 107 108 if [[ "$isCpp" = 1 ]]; then 109 - NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${NIX_CXXSTDLIB_COMPILE-@default_cxx_stdlib_compile@}" 110 NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK $NIX_CXXSTDLIB_LINK" 111 fi 112
··· 22 getVersion=0 23 nonFlagArgs=0 24 [[ "@prog@" = *++ ]] && isCpp=1 || isCpp=0 25 + cppInclude=1 26 27 params=("$@") 28 n=0 ··· 47 isCpp=1 48 elif [ "$p" = -nostdlib ]; then 49 isCpp=-1 50 + elif [ "$p" = -nostdinc ]; then 51 + cppInclude=0 52 + elif [ "$p" = -nostdinc++ ]; then 53 + cppInclude=0 54 elif [ "${p:0:1}" != - ]; then 55 nonFlagArgs=1 56 elif [ "$p" = -m32 ]; then ··· 111 fi 112 113 if [[ "$isCpp" = 1 ]]; then 114 + if [[ "$cppInclude" = 1 ]]; then 115 + NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${NIX_CXXSTDLIB_COMPILE-@default_cxx_stdlib_compile@}" 116 + fi 117 NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK $NIX_CXXSTDLIB_LINK" 118 fi 119