makeBinaryWrapper: unset NIX_CFLAGS

Prevent the wrapper from being affected by the derivation's CFLAGS,
which may not even apply to GCC.
This commit is contained in:
Naïm Favier 2022-03-14 18:25:39 +01:00
parent 532ebf6b57
commit f8cc8ff575
No known key found for this signature in database
GPG Key ID: 49B07322580B7EE2

View File

@ -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