tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
cc-wrapper: handle -nostdinc{++,}
Nikolay Amiantov
9 years ago
24f695ff
081ac25d
+8
-1
1 changed file
expand all
collapse all
unified
split
pkgs
build-support
cc-wrapper
cc-wrapper.sh
+8
-1
pkgs/build-support/cc-wrapper/cc-wrapper.sh
···
22
getVersion=0
23
nonFlagArgs=0
24
[[ "@prog@" = *++ ]] && isCpp=1 || isCpp=0
0
25
26
params=("$@")
27
n=0
···
46
isCpp=1
47
elif [ "$p" = -nostdlib ]; then
48
isCpp=-1
0
0
0
0
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@}"
0
0
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