-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curl_compilers.m4: accept -Og flag #1440
Conversation
@MarcelRaad, thanks for your PR! By analyzing the history of the files in this pull request, we identified @yangtse, @bagder and @dfandrich to be potential reviewers. |
m4/curl-compilers.m4
Outdated
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could throw in -Ofast as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mention in the commit title this change is gcc specific
curl_compilers.m4: accept -Og gcc flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, how could I overlook -Ofast when studying the GCC optimization flags for almost an hour yesterday...
Changes pushed.
-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: curl#1404 (comment) Closes curl#1440
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, one nitpick, it's curl-compilers.m4 not curl_compilers.m4
-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: curl#1404 (comment) Closes curl#1440
-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: curl#1404 (comment) Closes curl#1440
-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: curl#1404 (comment) Closes curl#1440
Thanks! |
-Og
, introduced in GCC 4.8, optimizes for debugging experience. Whenspecified in
CFLAGS
, it was always overridden by-O0
or-O2
. Fix thisby adding it to flags_opt_all.
Ref: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
Ref: #1404 (comment)