-
Notifications
You must be signed in to change notification settings - Fork 519
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
update to SDK v0.29.0 #2730
Merged
Merged
update to SDK v0.29.0 #2730
Conversation
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
Signed-off-by: Ben Cressey <[email protected]>
The "variants" workspace is cleaned by the clean-packages target, and should not be cleaned separately. Additional crates exist in the "tools" workspace, and binaries other than `buildsys` and `pubsys` are now installed, so clean those up as well. Signed-off-by: Ben Cressey <[email protected]>
Our spec files do not have any entries in the %changelog section, so disable %source_date_epoch_from_changelog to prevent warnings about a "missing" changelog. Signed-off-by: Ben Cressey <[email protected]>
The functions in the c-utf8 library have an aliasing rules violation, and the resulting undefined behavior allows the compiler to ignore the expected side effects under certain conditions. GCC 11 and beyond will "optimize" this code in a way that breaks it, if possible. Normally, the use of `-fPIC` to compile this code stops the compiler from applying the optimization, since the function is called through the PLT and could be interposed with some other implementation that does not violate the rules. However, we also pass `-fno-semantic-interposition` which tells the compiler to optimize as though no interposition takes place, allowing it to exploit the undefined behavior. Signed-off-by: Ben Cressey <[email protected]>
GCC enables `-fstrict-aliasing` at the `-O2` optimization level, and leverages any undefined behavior it finds. These "optimizations" are not always desirable, and can result in emitted code that neglects the expected side effects of function calls. The use of `-fno-semantic-interposition` gives GCC room to apply more such optimizations, since it can assume that any function calls will resolve to the same function at runtime, with the same side effects, and the same undefined behavior. To help prevent unwanted optimizations in cases like this, treat any alias warnings enabled by `-Wall` as errors, so that builds will fail until the warnings are addressed somehow. Signed-off-by: Ben Cressey <[email protected]>
Putting this out in draft until I can publish SDK images for the more recent changes in bottlerocket-os/bottlerocket-sdk#87, and do some additional testing. |
Signed-off-by: Ben Cressey <[email protected]>
jpmcb
approved these changes
Jan 12, 2023
jpculp
approved these changes
Jan 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue number:
N/A
Description of changes:
Update SDK to v0.29.0. Includes changes from bottlerocket-os/bottlerocket-sdk#87.
The major change in this update is to GCC 11, which initially miscompiled
dbus-broker
when built with-fstrict-aliasing
(the default at the-O2
optimization level). I added a patch to address that, and also elevated aliasing warnings into build errors to try to catch similar errors in the future. This didn't actually flag thedbus-broker
problem, but still feels like a useful change.There was also an update to
pahole
via thedwarves
package in Fedora 37 which caused problems with the older kernel 5.10 and 5.15 builds; that's been fixed by #2569.Testing done:
Built variants for both target architectures on both host architectures. Verified aws, vmware, and metal builds were reasonably clean - no alarming warnings across all the build output in
variants/target
, and no strange behavior at runtime.Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.