diff options
author | Lukas Larsson <[email protected]> | 2018-12-03 14:41:59 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-12-03 14:41:59 +0100 |
commit | 0d24aecf46f9f387d64f06744f8a55b841669d1e (patch) | |
tree | 28b30a8091d925e88bdb6d5b3577e35754c76466 /erts/configure.in | |
parent | 1dc8502e0c129358ba671708f0ad52ff36bb4027 (diff) | |
parent | 4e5e0c6103982775e8e890f7d7c209cba279d0d6 (diff) | |
download | otp-0d24aecf46f9f387d64f06744f8a55b841669d1e.tar.gz otp-0d24aecf46f9f387d64f06744f8a55b841669d1e.tar.bz2 otp-0d24aecf46f9f387d64f06744f8a55b841669d1e.zip |
Merge branch 'lukas/erts/CFLAGS-O-check/OTP-15465' into maint
* lukas/erts/CFLAGS-O-check/OTP-15465:
erts: Fix some 32-bit gcc warnings
erts: Add check that a -O flag is present in CFLAGS
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/configure.in b/erts/configure.in index 4a27b532de..1074aab2c2 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -589,6 +589,17 @@ else WFLAGS="" WERRORFLAGS="" fi + +AC_MSG_CHECKING([CFLAGS for -O switch]) +case "$CFLAGS" in + *-O*) AC_MSG_RESULT([yes]) ;; + *) + AC_MSG_ERROR([ + CFLAGS must contain a -O flag. If you need to edit the CFLAGS you probably + also want to add the default CFLAGS. The default CFLAGS are "-O2 -g". + If you want to build erts without any optimization, pass -O0 to CFLAGS.]) ;; +esac + dnl DEBUG_FLAGS is obsolete (I hope) AC_SUBST(DEBUG_FLAGS) AC_SUBST(DEBUG_CFLAGS) |