Skip to content
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

./configure --enable-debug is broken #2101

Closed
amitdo opened this issue Dec 2, 2018 · 4 comments
Closed

./configure --enable-debug is broken #2101

amitdo opened this issue Dec 2, 2018 · 4 comments

Comments

@amitdo
Copy link
Collaborator

amitdo commented Dec 2, 2018

It produces -O0 -O2, which means the compiler will use -O2 instead of -O0.

@amitdo
Copy link
Collaborator Author

amitdo commented Dec 2, 2018

https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/C_002b_002b-Compiler.html

— Macro: AC_PROG_CXX ([compiler-search-list])
...
If output variable CXXFLAGS was not already set, set it to -g -O2 for the GNU C++ compiler (-O2 on systems where G++ does not accept -g), or -g for other compilers. If your package does not like this default, then it is acceptable to insert the line : ${CXXFLAGS=""}
after AC_INIT and before AC_PROG_CXX to select an empty default instead.

@amitdo
Copy link
Collaborator Author

amitdo commented Dec 2, 2018

Also, we might want to use -Og instead of -O0.

@amitdo
Copy link
Collaborator Author

amitdo commented Dec 2, 2018

@amitdo
Copy link
Collaborator Author

amitdo commented Dec 2, 2018

Clang accepts the -Og flag since version 4.0, but treats it as -O1.
https://clang.llvm.org/docs/CommandGuide/clang.html

@zdenop zdenop closed this as completed in fef64d7 Jul 13, 2019
zdenop added a commit that referenced this issue Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant