diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-08-28 14:56:08 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-13 16:08:18 -0500 |
commit | 8e557ed2c58e6ce48a8d05dbc57ef84e98b4cecd (patch) | |
tree | 1f981fdaa6de98e84214b0feb76795812dbfe10f /pkgs/build-support/cc-wrapper/setup-hook.sh | |
parent | 4f869bccc14fb2fa19df130e76c022765ecda924 (diff) | |
download | nixpkgs-8e557ed2c58e6ce48a8d05dbc57ef84e98b4cecd.tar nixpkgs-8e557ed2c58e6ce48a8d05dbc57ef84e98b4cecd.tar.gz nixpkgs-8e557ed2c58e6ce48a8d05dbc57ef84e98b4cecd.tar.bz2 nixpkgs-8e557ed2c58e6ce48a8d05dbc57ef84e98b4cecd.tar.lz nixpkgs-8e557ed2c58e6ce48a8d05dbc57ef84e98b4cecd.tar.xz nixpkgs-8e557ed2c58e6ce48a8d05dbc57ef84e98b4cecd.tar.zst nixpkgs-8e557ed2c58e6ce48a8d05dbc57ef84e98b4cecd.zip |
bintools-wrapper: Init
Factor a bintools (i.e. binutils / cctools) wrapper out of cc-wrapper. While only LD is wrapped, the setup hook defines environment variables on behalf of other utilites.
Diffstat (limited to 'pkgs/build-support/cc-wrapper/setup-hook.sh')
-rw-r--r-- | pkgs/build-support/cc-wrapper/setup-hook.sh | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh index 7822b7f84d0..a922193ad2e 100644 --- a/pkgs/build-support/cc-wrapper/setup-hook.sh +++ b/pkgs/build-support/cc-wrapper/setup-hook.sh @@ -74,14 +74,6 @@ ccWrapper_addCVars () { export NIX_${role}CFLAGS_COMPILE+=" ${ccIncludeFlag:--isystem} $1/include" fi - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_${role}LDFLAGS+=" -L$1/lib64" - fi - - if [[ -d "$1/lib" ]]; then - export NIX_${role}LDFLAGS+=" -L$1/lib" - fi - if [[ -d "$1/Library/Frameworks" ]]; then export NIX_${role}CFLAGS_COMPILE+=" -F$1/Library/Frameworks" fi @@ -119,11 +111,6 @@ if [ -n "@cc@" ]; then fi # shellcheck disable=SC2157 -if [ -n "@binutils_bin@" ]; then - addToSearchPath _PATH @binutils_bin@/bin -fi - -# shellcheck disable=SC2157 if [ -n "@libc_bin@" ]; then addToSearchPath _PATH @libc_bin@/bin fi @@ -142,17 +129,5 @@ export ${role_pre}CXX=@named_cxx@ export CC${role_post}=@named_cc@ export CXX${role_post}=@named_cxx@ -for cmd in \ - ar as ld nm objcopy objdump readelf ranlib strip strings size windres -do - if - PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null - then - upper_case="$(echo "$cmd" | tr "[:lower:]" "[:upper:]")" - export "${role_pre}${upper_case}=@targetPrefix@${cmd}"; - export "${upper_case}${role_post}=@targetPrefix@${cmd}"; - fi -done - # No local scope in sourced file -unset -v role_pre role_post cmd upper_case +unset -v role_pre role_post |