mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
sys-devel/sysroot-wrappers: Drop as Gentoo's gcc will handle sysroot
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 <jlecuirot@microsoft.com>
This commit is contained in:
parent
5ab0ba0d21
commit
6d4692b159
@ -423,7 +423,6 @@ install_cross_toolchain() {
|
||||
# Setup environment and wrappers for our shiny new toolchain
|
||||
binutils_set_latest_profile "${cross_chost}"
|
||||
gcc_set_latest_profile "${cross_chost}"
|
||||
"${sudo[@]}" CC_QUIET=1 sysroot-config --install-links "${cross_chost}"
|
||||
}
|
||||
|
||||
# Build/install toolchain dependencies into the cross sysroot for a
|
||||
|
||||
@ -20,7 +20,6 @@ RDEPEND="${RDEPEND}
|
||||
dev-embedded/u-boot-tools
|
||||
!arm64? ( sys-boot/syslinux )
|
||||
sys-devel/crossdev
|
||||
sys-devel/sysroot-wrappers
|
||||
sys-fs/dosfstools
|
||||
"
|
||||
|
||||
|
||||
1
sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-aarch64-cros-linux-gnu/gcc
vendored
Symbolic link
1
sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-aarch64-cros-linux-gnu/gcc
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../sys-devel/gcc
|
||||
1
sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-x86_64-cros-linux-gnu/gcc
vendored
Symbolic link
1
sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-x86_64-cros-linux-gnu/gcc
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../sys-devel/gcc
|
||||
4
sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/gcc/README.md
vendored
Normal file
4
sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/gcc/README.md
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
The ESYSROOT patch is pending inclusion into Gentoo's gcc patch set. Once
|
||||
merged, this will most likely be applied from 14.1 or 14.2 onwards. Check the
|
||||
[GitHub pull request](https://github.com/gentoo/gcc-patches/pull/3) for the
|
||||
current situation.
|
||||
@ -0,0 +1,20 @@
|
||||
diff -Naur a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
--- a/gcc/gcc.cc 2024-08-01 23:34:33.525082176 +0100
|
||||
+++ b/gcc/gcc.cc 2024-08-01 23:43:31.557156041 +0100
|
||||
@@ -5527,6 +5527,16 @@
|
||||
"BINUTILS", PREFIX_PRIORITY_LAST, 0, 1);
|
||||
free (tooldir_prefix);
|
||||
|
||||
+ if (*cross_compile == '1' && !target_system_root_changed)
|
||||
+ {
|
||||
+ const char *esysroot = env.get("ESYSROOT");
|
||||
+ if (esysroot && esysroot[0] != '\0' && strcmp(esysroot, "/") != 0 && (!target_system_root || strcmp(esysroot, target_system_root) != 0))
|
||||
+ {
|
||||
+ target_system_root = esysroot;
|
||||
+ target_system_root_changed = 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
#if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS)
|
||||
/* If the normal TARGET_SYSTEM_ROOT is inside of $exec_prefix,
|
||||
then consider it to relocate with the rest of the GCC installation
|
||||
@ -110,12 +110,6 @@ cros_post_src_install_set_up_var_lib_selinux() {
|
||||
# Source hooks for SLSA build provenance report generation
|
||||
source "${BASH_SOURCE[0]}.slsa-provenance"
|
||||
|
||||
# Insert our sysroot wrappers into the path
|
||||
SYSROOT_WRAPPERS_BIN="/usr/lib64/sysroot-wrappers/bin"
|
||||
if [[ "$PATH" != *"$SYSROOT_WRAPPERS_BIN"* ]]; then
|
||||
export PATH="$SYSROOT_WRAPPERS_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# Improve the chance that ccache is valid across versions by making all
|
||||
# paths under $S relative to $S, avoiding encoding the package version
|
||||
# contained in the path into __FILE__ expansions and debug info.
|
||||
|
||||
@ -1 +0,0 @@
|
||||
DIST sysroot-wrappers-0.2.tar.gz 138063 BLAKE2B 04c5072fd48c0b931ea971aac4e242dc9a213429ebe03527cca5f4dd6c970eb15dee900c6e64d798a41fde48457c241e91ff8dcfbd678282bad390d5a7e07063 SHA512 bb27e2737ecde63bb877b75430c65b18e192b13671bb1a10d939694bff57412e59e51d4151aedf3ebf5f4d17e789a2f34ed1ab6506c20503c878b9c04efcfda6
|
||||
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
</pkgmetadata>
|
||||
@ -1,15 +0,0 @@
|
||||
# Copyright (c) 2013 CoreOS Inc. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Build tool wrappers for using custom SYSROOTs"
|
||||
HOMEPAGE="https://github.com/flatcar/sysroot-wrappers"
|
||||
SRC_URI="https://github.com/flatcar/${PN}/releases/download/v${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm64"
|
||||
IUSE=""
|
||||
@ -1,21 +0,0 @@
|
||||
# Copyright (c) 2013 CoreOS Inc. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools git-r3
|
||||
|
||||
DESCRIPTION="Build tool wrappers for using custom SYSROOTs"
|
||||
HOMEPAGE="https://github.com/coreos/sysroot-wrappers"
|
||||
EGIT_REPO_URI="https://github.com/coreos/sysroot-wrappers"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="-*"
|
||||
IUSE=""
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
@ -211,7 +211,6 @@ info "Updating basic system packages"
|
||||
sudo -E ${EMERGE_CMD} "${EMERGE_FLAGS[@]}" \
|
||||
sys-apps/portage \
|
||||
sys-devel/crossdev \
|
||||
sys-devel/sysroot-wrappers \
|
||||
sys-libs/nss-usrfiles \
|
||||
"${TOOLCHAIN_PKGS[@]}"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user