summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-01-29 00:51:18 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-01-29 00:51:18 +0000
commitc2ee96b0307df455d970dd1926c8652909ba767c (patch)
tree5d8d13e2bbc6fe9003b2ec96a94d0e2f501b2987 /eclass
parentc727ef413bd99c61e1775c18e542a4018b6743a7 (diff)
downloadbaldeagleos-repo-c2ee96b0307df455d970dd1926c8652909ba767c.tar.gz
baldeagleos-repo-c2ee96b0307df455d970dd1926c8652909ba767c.tar.xz
baldeagleos-repo-c2ee96b0307df455d970dd1926c8652909ba767c.zip
Adding metadata
Diffstat (limited to 'eclass')
-rw-r--r--eclass/linux-mod.eclass6
-rw-r--r--eclass/toolchain.eclass28
-rw-r--r--eclass/usr-ldscript.eclass9
3 files changed, 37 insertions, 6 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index 6cf9969b19af..98b22dcb9fc6 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: linux-mod.eclass
@@ -624,10 +624,6 @@ linux-mod_src_compile() {
cd "${srcdir}" || die
ln -s "${S}"/Module.symvers Module.symvers # no die for bug #888679
einfo "Preparing ${modulename} module"
- if [[ -n ${ECONF_PARAMS} ]]; then
- eqawarn "This package relies on the deprecated functionality of econf being called in linux-mod_src_compile (ECONF_PARAMS), which will go away in 30 days (20230107) (https://bugs.gentoo.org/340597)"
- econf ${ECONF_PARAMS}
- fi
# This looks messy, but it is needed to handle multiple variables
# being passed in the BUILD_* stuff where the variables also have
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 0dd23d93e383..6d8901d21812 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -719,6 +719,19 @@ toolchain_src_prepare() {
einfo "Remove texinfo (bug #198182, bug #464008)"
eapply "${FILESDIR}"/gcc-configure-texinfo.patch
+ if ! use prefix-guest && [[ -n ${EPREFIX} ]] ; then
+ einfo "Prefixifying dynamic linkers..."
+ for f in gcc/config/*/*linux*.h ; do
+ ebegin " Updating ${f}"
+ if [[ ${f} == gcc/config/rs6000/linux*.h ]]; then
+ sed -i -r "s,(DYNAMIC_LINKER_PREFIX\s+)\"\",\1\"${EPREFIX}\",g" "${f}" || die
+ else
+ sed -i -r "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g" "${f}" || die
+ fi
+ eend $?
+ done
+ fi
+
# >=gcc-4
if [[ -x contrib/gcc_update ]] ; then
einfo "Touching generated files"
@@ -1200,6 +1213,21 @@ toolchain_src_configure() {
confgcc+=( --enable-threads=posix )
;;
esac
+
+ if ! use prefix-guest ; then
+ # GNU ld scripts, such as those in glibc, reference unprefixed paths
+ # as the sysroot given here is automatically prepended. For
+ # prefix-guest, we use the host's libc instead.
+ if [[ -n ${EPREFIX} ]] ; then
+ confgcc+=( --with-sysroot="${EPREFIX}" )
+ fi
+
+ # We need to build against the right headers and libraries. Again,
+ # for prefix-guest, this is the host's.
+ if [[ -n ${ESYSROOT} ]] ; then
+ confgcc+=( --with-build-sysroot="${ESYSROOT}" )
+ fi
+ fi
fi
# __cxa_atexit is "essential for fully standards-compliant handling of
diff --git a/eclass/usr-ldscript.eclass b/eclass/usr-ldscript.eclass
index b73d538ae5bb..6dbce59c6400 100644
--- a/eclass/usr-ldscript.eclass
+++ b/eclass/usr-ldscript.eclass
@@ -39,6 +39,13 @@ gen_usr_ldscript() {
tc-is-static-only && return
use prefix && return
+ # The toolchain's sysroot is automatically prepended to paths in this
+ # script. We therefore need to omit EPREFIX on standalone prefix (RAP)
+ # systems. prefix-guest (non-RAP) systems don't apply a sysroot so EPREFIX
+ # is still needed in that case. This is moot because the above line makes
+ # the function a noop on prefix, but we keep this in case that changes.
+ local prefix=$(usex prefix-guest "${EPREFIX}" "")
+
# We only care about stuffing / for the native ABI. #479448
if [[ $(type -t multilib_is_native_abi) == "function" ]] ; then
multilib_is_native_abi || return 0
@@ -154,7 +161,7 @@ gen_usr_ldscript() {
See bug https://bugs.gentoo.org/4411 for more info.
*/
${output_format}
- GROUP ( ${EPREFIX}/${libdir}/${tlib} )
+ GROUP ( ${prefix}/${libdir}/${tlib} )
END_LDSCRIPT
;;
esac