about summary refs log tree commit diff
path: root/pkgs/build-support/setup-hooks
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-03-14 18:25:39 +0100
committerNaïm Favier <n@monade.li>2022-04-26 12:14:39 +0200
commitf8cc8ff5755528d9a73671481ba3d6fb00f4e8d5 (patch)
tree8c81b001f9a6d6c651aa7cb613f9b2e0b500ae40 /pkgs/build-support/setup-hooks
parent532ebf6b579ebf657a473c371eef7d52e13804a4 (diff)
makeBinaryWrapper: unset NIX_CFLAGS
Prevent the wrapper from being affected by the derivation's CFLAGS,
which may not even apply to GCC.
Diffstat (limited to 'pkgs/build-support/setup-hooks')
-rw-r--r--pkgs/build-support/setup-hooks/make-binary-wrapper.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh
index 986be5b9e1137..7123f100c1755 100644
--- a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh
+++ b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh
@@ -33,6 +33,8 @@ assertExecutable() {
 # To troubleshoot a binary wrapper after you compiled it,
 # use the `strings` command or open the binary file in a text editor.
 makeWrapper() {
+    local NIX_CFLAGS_COMPILE NIX_CFLAGS_LINK
+    unset NIX_CFLAGS_COMPILE NIX_CFLAGS_LINK
     local original="$1"
     local wrapper="$2"
     shift 2