-
Notifications
You must be signed in to change notification settings - Fork 50
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
Drop sysroot-wrappers and *-config script wrappers #2207
Merged
Merged
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
2 tasks
krnowak
reviewed
Aug 8, 2024
...ontainer/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/gcc/gcc-esysroot.patch
Show resolved
Hide resolved
Signed-off-by: James Le Cuirot <[email protected]>
Signed-off-by: James Le Cuirot <[email protected]>
Signed-off-by: James Le Cuirot <[email protected]>
Otherwise packages subsequently built by this script do not have the patches applied. Signed-off-by: James Le Cuirot <[email protected]>
It will patch gcc to respect ESYSROOT when cross-compiling, effectively adding the --sysroot flag without the use of flags or wrappers. This hasn't been merged into Gentoo yet, but it has been given the nod. When it does get merged, it was only be for newer gcc versions than we're currently using, so we'll need this user patch in the meantime regardless. Signed-off-by: James Le Cuirot <[email protected]>
…ss fixes It was previously relying on xmlsec1-config and dnet-config scripts that we were creating wrappers for. Signed-off-by: James Le Cuirot <[email protected]>
pkg-config is usually preferable, but this simpler approach works here because krb5-config is a shell script and the headers and libraries are in standard paths. It was previously relying on a wrapper we were creating. It still works without that, but only because krb5-config also exists on the host, and we shouldn't assume that. Signed-off-by: James Le Cuirot <[email protected]>
Gentoo avoids using these scripts as much as possible because they don't play well when cross-compiling. Wrappers can help, but this approach is considered too messy for Gentoo itself, and there are always other ways around the problem. I found that only app-emulation/open-vm-tools failed to build without these wrappers. I have fixed this in Gentoo (and Flatcar) and sent a simple patch further upstream. I knew that other instances of this problem were being masked by the presence of these scripts on the build host, so I manually removed them all before rebuilding all of the board packages. This found about 8 more affected packages, most of which were looking for krb5-config. These have now been addressed in Gentoo or Flatcar as necessary. The Gentoo fixes have not been applied to Flatcar yet, but they can be taken in the round. Signed-off-by: James Le Cuirot <[email protected]>
chewi
force-pushed
the
chewi/no-sysroot-wrappers-gcc
branch
from
August 8, 2024 15:41
11fb61d
to
b59acee
Compare
krnowak
approved these changes
Aug 9, 2024
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.
Drop sysroot-wrappers and *-config script wrappers
Supersedes #2177.
Gentoo will soon start patching gcc to respect the
ESYSROOT
environment variable so that cross-compiling into a different directory works out of the box. This removes the need for our own sysroot wrappers. This approach does not have the downside of sysroot paths leaking into the final build.While working on this, I unintentionally dropped the generation of our *-config script wrappers but found that this only broke one package, so I fixed that up. I then flushed out the few remaining instances of this issue that were being masked by presence of these scripts on the build host. The Gentoo fixes for those can be taken in the round as it does not actually affect our build.
The included eclass changes have already been merged into Gentoo.
How to use
Do a full Flatcar build, preferably in two phases.
Testing done
I have previously done several two-phase builds in Jenkins. I will now perform a fresh one.
changelog/
directory (user-facing change, bug fix, security fix, update) -- N/A/boot
and/usr
size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.