-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow overriding default flags #700
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
613c34c
Remove test in configure.ac because it doesn't have an effect
jonasnick ecba813
Append instead of Prepend user-CFLAGS to default CFLAGS allowing the …
jonasnick 83fb1bc
Remove -O2 from default CFLAGS because this would override the -O3 fl…
jonasnick ca739cb
Compile with optimization flag -O2 by default instead of -O3
jonasnick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,10 @@ AH_TOP([#ifndef LIBSECP256K1_CONFIG_H]) | |
AH_TOP([#define LIBSECP256K1_CONFIG_H]) | ||
AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/]) | ||
AM_INIT_AUTOMAKE([foreign subdir-objects]) | ||
|
||
# Set -g (but not -O2 because this would override -O3 which we're adding later) | ||
# if CFLAGS are not already set (see PROG_CC in the Autoconf manual) | ||
: ${CFLAGS="-g"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
LT_INIT | ||
|
||
dnl make the compilation flags quiet unless V=1 is used | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Couldn't we get rid of this entirely then because Autoconf's default is
-g -O2
?If your answer is, maybe keep this variant still as a branch somewhere until we have further Concept ACKs on the idea of switching to
-O2
:pThere 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.
If we remove this then if
$CFLAGS
aren't already set they will be set to-O2 ... -O2
. The comment additionally serves as a hint to how autoconf works :) because I'd rather set: ${CFLAGS=""}
in the future, because anything else doesn't make much sense to me.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.
Okay yes. Also, autoconf sets -O2 apparently only for gcc and not for other compilers according to its manual... So we need to keep the -O2 further below anyway.