aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 06:26:17 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 07:11:25 +0100
commit8505f963a1990566202b0fe60300f89c752ace86 (patch)
treee07a9ca6c9505a10e5f2ca6ddc3fb102af96f9b9 /configure.ac
parent4018fcb9b8d622e7bac1310a689c90dac9109137 (diff)
Merge pull request #9972 from NixOS/allow-unoptimized-builds
Don't hardcode the `-O2` compiler flag (cherry picked from commit 57ebcadb2f00e69c7548e72cbd63986c4c39bb78) Change-Id: I49987181b2381627cb1c37b978b94c3163598af2
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 75ce7d01d..e070c0d0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,10 @@ AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier ('cpu-os')])
# State should be stored in /nix/var, unless the user overrides it explicitly.
test "$localstatedir" = '${prefix}/var' && localstatedir=/nix/var
+# Assign a default value to C{,XX}FLAGS as the default configure script sets them
+# to -O2 otherwise, which we don't want to have hardcoded
+CFLAGS=${CFLAGS-""}
+CXXFLAGS=${CXXFLAGS-""}
AC_PROG_CC
AC_PROG_CXX