From e2c8655405307bac689eaaf864b3504ac91cbc99 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Tue, 19 Dec 2017 01:45:42 +0000 Subject: [PATCH] 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. --- pkgs/build-support/setup-hooks/ld-is-cc-hook.sh | 5 +++++ pkgs/top-level/all-packages.nix | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 pkgs/build-support/setup-hooks/ld-is-cc-hook.sh 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 { };