nixpkgs/pkgs/build-support/gcc-wrapper/setup-hook.sh
Eelco Dolstra 5c5db47443 * Set a flag to indicate whether we're doing a native build.
svn path=/nixpkgs/trunk/; revision=821
2004-03-09 10:36:45 +00:00

19 lines
411 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)
export NIX_IS_NATIVE=@isNative@
if test -z "$NIX_IS_NATIVE"; then
PATH=$PATH:@gcc@/bin:@glibc@/bin
fi
export NIX_ENFORCE_PURITY=@enforcePurity@