From 3dae41abc9ea4c6d642ece7ce5bc54c0548b56a5 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Thu, 2 Nov 2023 11:04:07 -0400 Subject: [PATCH 1/3] toolchain-funcs.eclass: tc-ld-force-bfd: unset LD before calling tc-getLD The previous logic would fail with common values of LD set by the user: LD="ld.lld" -> LD="ld.lld.bfd" LD="ld.gold" -> LD="ld.gold.bfd" LD="mold" -> LD="mold.bfd" It makes more sense to ignore the user's LD setting and use the default value given by tc-getLD. If the user doesn't have binutils installed, the "type -P" check will still fail and LD will be unaltered. Signed-off-by: Mike Gilbert --- eclass/toolchain-funcs.eclass | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 4559894ca04a2..8fef764ad5973 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -534,10 +534,9 @@ tc-ld-force-bfd() { ewarn "Forcing usage of the BFD linker" # Set up LD to point directly to bfd if it's available. - local ld=$(tc-getLD "$@") - # We need to extract the first word in case there are flags appended - # to its value (like multilib), bug #545218. - local bfd_ld="${ld%% *}.bfd" + # Unset LD first so we get the default value from tc-getLD. + local ld=$(unset LD; tc-getLD "$@") + local bfd_ld="${ld}.bfd" local path_ld=$(type -P "${bfd_ld}" 2>/dev/null) [[ -e ${path_ld} ]] && export LD=${bfd_ld} From bd7fe586d642e047d14c193950f883e0b7b17a6a Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Sat, 4 Nov 2023 13:41:59 -0400 Subject: [PATCH 2/3] sys-libs/db: call tc-ld-force-bfd before multilib code Signed-off-by: Mike Gilbert --- sys-libs/db/db-4.8.30-r8.ebuild | 9 ++++++--- sys-libs/db/db-5.3.28-r9.ebuild | 8 ++++++-- sys-libs/db/db-6.0.35-r4.ebuild | 8 ++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/sys-libs/db/db-4.8.30-r8.ebuild b/sys-libs/db/db-4.8.30-r8.ebuild index f5906a0c970e8..7d3883eeb3603 100644 --- a/sys-libs/db/db-4.8.30-r8.ebuild +++ b/sys-libs/db/db-4.8.30-r8.ebuild @@ -80,6 +80,12 @@ src_prepare() { -i configure || die } +src_configure() { + # Force bfd before calling multilib_toolchain_setup + tc-ld-force-bfd #470634 #729510 + multilib-minimal_src_configure +} + multilib_src_configure() { local myconf=( --enable-compat185 @@ -93,9 +99,6 @@ multilib_src_configure() { $(use_enable test) ) - # bug #470634 and bug #729510 - tc-ld-force-bfd - # compilation with -O0 fails on amd64, see bug #171231 if [[ ${ABI} == amd64 ]]; then local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS} diff --git a/sys-libs/db/db-5.3.28-r9.ebuild b/sys-libs/db/db-5.3.28-r9.ebuild index 1d029d38e96b4..13da32d2e3bbc 100644 --- a/sys-libs/db/db-5.3.28-r9.ebuild +++ b/sys-libs/db/db-5.3.28-r9.ebuild @@ -111,6 +111,12 @@ src_prepare() { -i "${S_BASE}"/test/tcl/reputils.tcl || die } +src_configure() { + # Force bfd before calling multilib_toolchain_setup + tc-ld-force-bfd #470634 #729510 + multilib-minimal_src_configure +} + multilib_src_configure() { local myconf=( # sql_compat will cause a collision with sqlite3 @@ -132,8 +138,6 @@ multilib_src_configure() { $(use_enable test) ) - tc-ld-force-bfd #470634 #729510 - # compilation with -O0 fails on amd64, see bug #171231 if [[ ${ABI} == amd64 ]]; then local CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" diff --git a/sys-libs/db/db-6.0.35-r4.ebuild b/sys-libs/db/db-6.0.35-r4.ebuild index 20268a5c99966..0ee187c58cea1 100644 --- a/sys-libs/db/db-6.0.35-r4.ebuild +++ b/sys-libs/db/db-6.0.35-r4.ebuild @@ -104,6 +104,12 @@ src_prepare() { -i "${S_BASE}"/test/tcl/reputils.tcl || die } +src_configure() { + # Force bfd before calling multilib_toolchain_setup + tc-ld-force-bfd #470634 #729510 + multilib-minimal_src_configure +} + multilib_src_configure() { local myconf=( --enable-compat185 @@ -121,8 +127,6 @@ multilib_src_configure() { $(use_enable test) ) - tc-ld-force-bfd #470634 #729510 - # compilation with -O0 fails on amd64, see bug #171231 if [[ ${ABI} == amd64 ]]; then local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS} From 7ac86392444d950797d8cc035792370202614a7f Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Sat, 4 Nov 2023 13:50:59 -0400 Subject: [PATCH 3/3] sys-libs/db: fix pkgcheck warnings Signed-off-by: Mike Gilbert --- sys-libs/db/db-5.3.28-r9.ebuild | 4 ++-- sys-libs/db/db-6.0.35-r4.ebuild | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys-libs/db/db-5.3.28-r9.ebuild b/sys-libs/db/db-5.3.28-r9.ebuild index 13da32d2e3bbc..a86fe5ad0d1f8 100644 --- a/sys-libs/db/db-5.3.28-r9.ebuild +++ b/sys-libs/db/db-5.3.28-r9.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit autotools db flag-o-matic multilib multilib-minimal toolchain-funcs +inherit autotools db flag-o-matic multilib-minimal toolchain-funcs #Number of official patches #PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"` @@ -24,7 +24,7 @@ DESCRIPTION="Oracle Berkeley DB" HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html" SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz" for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do - export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}" + SRC_URI+=" http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}" done LICENSE="Sleepycat" diff --git a/sys-libs/db/db-6.0.35-r4.ebuild b/sys-libs/db/db-6.0.35-r4.ebuild index 0ee187c58cea1..422b7e8188a81 100644 --- a/sys-libs/db/db-6.0.35-r4.ebuild +++ b/sys-libs/db/db-6.0.35-r4.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit autotools db flag-o-matic multilib multilib-minimal toolchain-funcs +inherit autotools db flag-o-matic multilib-minimal toolchain-funcs #Number of official patches #PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"` @@ -24,7 +24,7 @@ DESCRIPTION="Oracle Berkeley DB" HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html" SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz" for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do - export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}" + SRC_URI+=" http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}" done LICENSE="AGPL-3"