diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.40-r8.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.40-r9.ebuild similarity index 99% rename from sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.40-r8.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.40-r9.ebuild index 789ad23b05..b7fac9c0e7 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.40-r8.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.40-r9.ebuild @@ -118,7 +118,9 @@ src_prepare() { # This is applied conditionally for now just out of caution. # It should be okay on non-prefix systems though. See bug #892549. - use prefix && eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch + fi fi fi diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.41-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.41-r2.ebuild similarity index 99% rename from sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.41-r1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.41-r2.ebuild index eec1ecb1e0..de4cbac1da 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.41-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.41-r2.ebuild @@ -118,7 +118,9 @@ src_prepare() { # This is applied conditionally for now just out of caution. # It should be okay on non-prefix systems though. See bug #892549. - use prefix && eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch + fi fi fi diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild index 11e84c53af..5d9cedc9c2 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild @@ -118,7 +118,9 @@ src_prepare() { # This is applied conditionally for now just out of caution. # It should be okay on non-prefix systems though. See bug #892549. - use prefix && eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch + fi fi fi diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch index 7423f8d705..bddfa1ec6e 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch @@ -36,39 +36,3 @@ libstdc++.so.6, while other linkers do not use this file at all. sprintf (filename, "%s/%s", search->name, l->name); nn.name = filename; if (ldelf_try_needed (&nn, force, is_linux)) - -From 8afc65c8d8c0fff2f686ddd8eb9023c7ebabcca9 Mon Sep 17 00:00:00 2001 -From: James Le Cuirot -Date: Sat, 11 Feb 2023 15:18:58 +0000 -Subject: [PATCH 2/2] ldelf.c: Do not search for libraries using ld.so.conf - -Other linkers do not do this. It is problematic for Gentoo Linux, -because crossdev installs libraries such as libstdc++.so.6 outside of -the sysroot. ---- a/ld/ld.texi -+++ b/ld/ld.texi -@@ -2355,7 +2355,9 @@ For a linker for a Linux system, if the file @file{/etc/ld.so.conf} - exists, the list of directories found in that file. Note: the path - to this file is prefixed with the @code{sysroot} value, if that is - defined, and then any @code{prefix} string if the linker was --configured with the @command{--prefix=} option. -+configured with the @command{--prefix=} option. This has feature has -+been disabled on Gentoo Linux to make it consistent with the other -+linkers, which do not do this. - @item - For a native linker on a FreeBSD system, any directories specified by - the @code{_PATH_ELF_HINTS} macro defined in the @file{elf-hints.h} ---- a/ld/ldelf.c -+++ b/ld/ldelf.c -@@ -1156,10 +1156,6 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab, - if (is_freebsd - && ldelf_check_ld_elf_hints (l, force, elfsize)) - break; -- -- if (is_linux -- && ldelf_check_ld_so_conf (l, force, elfsize, prefix)) -- break; - } - - len = strlen (l->name); -