mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 01:21:02 +02:00
eclass/toolchain: Sync with Gentoo
It's from Gentoo commit 597efc1908793a77001d42ebbd96ebb07f8ee631.
This commit is contained in:
parent
dbba02fcd7
commit
8a6f8708a3
@ -719,6 +719,19 @@ toolchain_src_prepare() {
|
|||||||
einfo "Remove texinfo (bug #198182, bug #464008)"
|
einfo "Remove texinfo (bug #198182, bug #464008)"
|
||||||
eapply "${FILESDIR}"/gcc-configure-texinfo.patch
|
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
|
# >=gcc-4
|
||||||
if [[ -x contrib/gcc_update ]] ; then
|
if [[ -x contrib/gcc_update ]] ; then
|
||||||
einfo "Touching generated files"
|
einfo "Touching generated files"
|
||||||
@ -1200,6 +1213,21 @@ toolchain_src_configure() {
|
|||||||
confgcc+=( --enable-threads=posix )
|
confgcc+=( --enable-threads=posix )
|
||||||
;;
|
;;
|
||||||
esac
|
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
|
fi
|
||||||
|
|
||||||
# __cxa_atexit is "essential for fully standards-compliant handling of
|
# __cxa_atexit is "essential for fully standards-compliant handling of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user