nixpkgs/pkgs/build-support/gcc-wrapper/setup-hook.sh
Eelco Dolstra 946a2d4a48 * gcc-wrapper now filters out -L and -I flags referring to paths
outside the store (in pure builds).

svn path=/nixpkgs/trunk/; revision=817
2004-03-08 18:29:08 +00:00

18 lines
375 B
Bash

addCVars () {
if test -d $1/include; then
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$1/include"
fi
if test -d $1/lib; then
export NIX_LDFLAGS="$NIX_LDFLAGS -L$1/lib -rpath $1/lib"
fi
}
envHooks=(${envHooks[@]} addCVars)
if test -z "@isNative@"; then
PATH=$PATH:@gcc@/bin:@glibc@/bin
fi
export NIX_ENFORCE_PURITY=@enforcePurity@