diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2004-03-08 16:02:46 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2004-03-08 16:02:46 +0000 |
commit | ce50734cf067496ae50d1a6fd139fc03de283cbc (patch) | |
tree | 8603be7a557177d8646093c4edf7bdb097577b11 /pkgs/build-support/gcc-wrapper/ld-wrapper.sh | |
parent | 1b8e9faf08d2bb5fe83464d8380dabc52982f935 (diff) |
* Started reorganising stdenv:
- 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
Diffstat (limited to 'pkgs/build-support/gcc-wrapper/ld-wrapper.sh')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/ld-wrapper.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh new file mode 100644 index 0000000000000..2201bbe19d234 --- /dev/null +++ b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh @@ -0,0 +1,28 @@ +#! /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[@]} |