From f8cc8ff5755528d9a73671481ba3d6fb00f4e8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Mon, 14 Mar 2022 18:25:39 +0100 Subject: [PATCH] makeBinaryWrapper: unset NIX_CFLAGS Prevent the wrapper from being affected by the derivation's CFLAGS, which may not even apply to GCC. --- pkgs/build-support/setup-hooks/make-binary-wrapper.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh index 986be5b9e113..7123f100c175 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