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

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