]> granicus.if.org Git - curl/commitdiff
curl-compilers.m4: accept -Og and -Ofast GCC flags
authorMarcel Raad <raad@teamviewer.com>
Sat, 22 Apr 2017 21:12:07 +0000 (23:12 +0200)
committerMarcel Raad <raad@teamviewer.com>
Mon, 24 Apr 2017 08:56:56 +0000 (10:56 +0200)
-Og, introduced in GCC 4.8, optimizes for debugging experience.
-Ofast, introduced in GCC 4.7, builds on -O3 and enables further
optimizations breaking strict standards compliance.
When specified in CFLAGS, these were always overridden by -O0 or -O2.
Fix this by adding them to flags_opt_all.

Ref: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
Ref: https://github.com/curl/curl/pull/1404#issuecomment-296401570
Closes https://github.com/curl/curl/pull/1440

m4/curl-compilers.m4

index 19462582f53124e8a3a848a583d2e7328da23e07..5890324468a0055411dde5b77288b73f86a6863a 100644 (file)
@@ -158,7 +158,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
     flags_dbg_all="$flags_dbg_all -gvms"
     flags_dbg_yes="-g"
     flags_dbg_off=""
-    flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
+    flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
     CURL_CHECK_DEF([_WIN32], [], [silent])