ce50734cf0
- gcc/ld-wrappers have been factored out into a separate derivation. This allows a working gcc to be installed in the user environment. (Previously the Nix gcc didn't work because it needed a whole bunch of flags to point to glibc.) - Better modularity: packages can specify hooks into the setup scripts. For instance, setup no longer knows about the PKG_CONFIG_PATH variable; pkgconfig can set it up instead. - gcc not longer depends on binutils. This simplifies the bootstrap process. svn path=/nixpkgs/trunk/; revision=816
28 lines
507 B
Bash
28 lines
507 B
Bash
#! /bin/sh
|
|
|
|
if test -n "$NIX_LD_WRAPPER_START_HOOK"; then
|
|
. "$NIX_LD_WRAPPER_START_HOOK"
|
|
fi
|
|
|
|
extra=()
|
|
|
|
if test -z "$NIX_LDFLAGS_SET"; then
|
|
extra=(${extra[@]} $NIX_LDFLAGS)
|
|
fi
|
|
|
|
if test "$NIX_DEBUG" = "1"; then
|
|
echo "original flags to @ld@:" >&2
|
|
for i in "$@"; do
|
|
echo " $i" >&2
|
|
done
|
|
echo "extra flags to @ld@:" >&2
|
|
for i in ${extra[@]}; do
|
|
echo " $i" >&2
|
|
done
|
|
fi
|
|
|
|
if test -n "$NIX_LD_WRAPPER_EXEC_HOOK"; then
|
|
. "$NIX_LD_WRAPPER_EXEC_HOOK"
|
|
fi
|
|
|
|
exec @ld@ "$@" ${extra[@]}
|