-
Notifications
You must be signed in to change notification settings - Fork 34
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: add new flag "--enable-optimizations" and expand scope of "--enable-debug", additional homekeeping #85
Conversation
c097ee8
to
d477da4
Compare
'This PR has been flagged as stale due to no activity for over 60 |
LGTM
pls check 0d88e91 for more of this :) |
…erm]` The arguments were called `disable-{tests,bench,hardening}` but the variable they set was `use_[term]`, which could lead to an inversion. It appears that it is expected that developers declare enablement flags and Autotools will generate their equivalent disablement flags but there's no text to indicate that the same will happen vice-versa.
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
This is a problem introduced by skipping architecture specific flags when building with optimizations disabled. Neither i?86 nor arm contain the number 32 in it, making number based matching unusable. But arm64 is 64-bit (though usually the recommended term is aarch64) and so we must match targets with the number 64 first before we assume anything with arm is 32-bit.
These are defined nowhere and used nowhere
f6e6462
to
6a14049
Compare
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.
Helps us avoid a situation where a compiler will report a warning instead of erroring out when testing a flag, giving `autotools` the impression they are supported when they are not, polluting the build log with "argument unused during compilation" messages.
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
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.
LGTM
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.
light-utACK
Additional information
This pull request is a result a comment which proposed a possible source for non-reproducible builds on Apple Silicon as difference in optimized code output.
While investigating further, it was realized that
bls-signatures
lacks the option to enable useful debugging flags or disable optimizations (both by the compiler and from libraries).--enable-debug
will setDEBUG=1
for Relic (existing behaviour), disables compiler optimization (and leaves library optimizations as-is), sets the dbginfo level to 3 and sets-ftrapv
--disable-optimizations
will disable both compiler and library optimizations (by setting (CPU_
)ARCH
tonone
and setting the backend toeasy
unless overridden), does not change the dbginfo level and sets-fwrapv
If both flags are used and there are conflicts, the flags set by
--enable-debug
will take precedence (i.e. debug level will be 3 and-ftrapv
will be set)These changes are made alongside general housekeeping and consolidation of the
autoconf
script.