summary refs log tree commit diff
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-12-19 01:45:42 +0000
committerOrivej Desh <orivej@gmx.fr>2017-12-19 01:45:42 +0000
commite2c8655405307bac689eaaf864b3504ac91cbc99 (patch)
tree2b3571b6ea6d215acf8d54f52f535cef60331963
parent170a96481526b398fee4da83422fcc462057c647 (diff)
downloadnixlib-e2c8655405307bac689eaaf864b3504ac91cbc99.tar
nixlib-e2c8655405307bac689eaaf864b3504ac91cbc99.tar.gz
nixlib-e2c8655405307bac689eaaf864b3504ac91cbc99.tar.bz2
nixlib-e2c8655405307bac689eaaf864b3504ac91cbc99.tar.lz
nixlib-e2c8655405307bac689eaaf864b3504ac91cbc99.tar.xz
nixlib-e2c8655405307bac689eaaf864b3504ac91cbc99.tar.zst
nixlib-e2c8655405307bac689eaaf864b3504ac91cbc99.zip
ld-is-cc-hook: init
This hook sets LD to CC, for use with software that works as if LD=$CC when LD
is unset, and does not work when LD=ld.
-rw-r--r--pkgs/build-support/setup-hooks/ld-is-cc-hook.sh5
-rw-r--r--pkgs/top-level/all-packages.nix3
2 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/build-support/setup-hooks/ld-is-cc-hook.sh b/pkgs/build-support/setup-hooks/ld-is-cc-hook.sh
new file mode 100644
index 000000000000..b53e184b0956
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/ld-is-cc-hook.sh
@@ -0,0 +1,5 @@
+ld-is-cc-hook() {
+    LD=$CC
+}
+
+preConfigureHooks+=(ld-is-cc-hook)
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c0ce9f7c98c7..0f2af1f92d42 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -287,6 +287,9 @@ with pkgs;
     inherit url;
   };
 
+  ld-is-cc-hook = makeSetupHook { name = "ld-is-cc-hook"; }
+    ../build-support/setup-hooks/ld-is-cc-hook.sh;
+
   libredirect = callPackage ../build-support/libredirect { };
 
   madonctl = callPackage ../applications/misc/madonctl { };