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

Build uses low optimization option "-O" instead of the one provided from outside #101

Open
yurivict opened this issue Jun 5, 2024 · 3 comments

Comments

@yurivict
Copy link

yurivict commented Jun 5, 2024

For example, I provided CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing", but the build added -O which takes precedence:

c++ -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -W -O -DNDEBUG -I../build -c ../src/backward.cpp
@arminbiere
Copy link
Owner

I am unsure what the semantics of providing 'CXXFLAGS' actually should be (some of the compilation flags should still be set by configure). We could filter out those that 'configure' wants to set but are already in 'CXXFLAGS'. Is this what you want? In principle there is already a mechanism for those '-f' options, but the '-O' is unclear.

@yurivict
Copy link
Author

The configure script shouldn't add any CXXFLAGS when the user provided CXXFLAGS flags.
Only when no original CXXFLAGS exists should configure add anything, except perhaps include directories.

@arminbiere
Copy link
Owner

We are still researching how this should properly be done.

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

2 participants