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

Merged
merged 1 commit into from Apr 24, 2017

Conversation

Projects
None yet
3 participants
@MarcelRaad
Copy link
Member

MarcelRaad commented Apr 22, 2017

-Og, introduced in GCC 4.8, optimizes for debugging experience. When
specified in CFLAGS, it was always overridden by -O0 or -O2. Fix this
by adding it to flags_opt_all.

Ref: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
Ref: #1404 (comment)

@mention-bot

This comment has been minimized.

Copy link

mention-bot commented Apr 22, 2017

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

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

This comment has been minimized.

@jay

jay Apr 22, 2017

Member

you could throw in -Ofast as well

This comment has been minimized.

@jay

jay Apr 22, 2017

Member

mention in the commit title this change is gcc specific
curl_compilers.m4: accept -Og gcc flag

This comment has been minimized.

@MarcelRaad

MarcelRaad Apr 23, 2017

Member

Thanks, how could I overlook -Ofast when studying the GCC optimization flags for almost an hour yesterday...
Changes pushed.

@MarcelRaad MarcelRaad force-pushed the MarcelRaad:gcc_og branch from d7daa0a to 71c0598 Apr 23, 2017

MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request Apr 23, 2017

curl_compilers.m4: accept -Og and -Ofast GCC flags
-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
@jay

jay approved these changes Apr 24, 2017

Copy link
Member

jay left a comment

looks good, one nitpick, it's curl-compilers.m4 not curl_compilers.m4

@MarcelRaad MarcelRaad force-pushed the MarcelRaad:gcc_og branch from 71c0598 to 8f9e4ff Apr 24, 2017

MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request Apr 24, 2017

curl-compilers.m4: accept -Og and -Ofast GCC flags
-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

@MarcelRaad MarcelRaad force-pushed the MarcelRaad:gcc_og branch from 8f9e4ff to da3b9aa Apr 24, 2017

MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request Apr 24, 2017

curl-compilers.m4: accept -Og and -Ofast GCC flags
-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
curl-compilers.m4: accept -Og and -Ofast GCC flags
-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: #1404 (comment)
Closes #1440

@MarcelRaad MarcelRaad force-pushed the MarcelRaad:gcc_og branch from da3b9aa to 71d2d37 Apr 24, 2017

@MarcelRaad MarcelRaad merged commit 71d2d37 into curl:master Apr 24, 2017

2 of 3 checks passed

continuous-integration/travis-ci/push The Travis CI build is in progress
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MarcelRaad MarcelRaad deleted the MarcelRaad:gcc_og branch Apr 24, 2017

@MarcelRaad

This comment has been minimized.

Copy link
Member

MarcelRaad commented Apr 24, 2017

Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators May 14, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.