From 4abb9bae4adcc38f480b435dfa01a88f676e0c03 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Thu, 25 Jul 2024 08:24:15 +0200 Subject: [PATCH] scripts/bootstrap-prefix: disable USE=pie for Solaris bootstrap Host compiler doesn't like -pie in the workload it has to do during bootstrap, so go through lengths to disable it. (Why can't we just override masks/forces from base?) Signed-off-by: Fabian Groffen --- scripts/bootstrap-prefix.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 11ad8eb8e4..eb89fa4847 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -2032,6 +2032,13 @@ bootstrap_stage2() { # unless we only build the buildtool, bug #603012 echo "dev-build/cmake -server" >> "${ROOT}"/tmp/etc/portage/package.use + if [[ ${CHOST} == *-solaris* ]] ; then + # avoid complexities with the host toolchain + sed -i -e '/^sys-devel\/gcc pie$/d' \ + "${PORTDIR}"/profiles/base/package.use.force + echo "sys-devel/gcc -pie" >> "${ROOT}"/tmp/etc/portage/package.use + fi + emerge_pkgs --nodeps "${pkgs[@]}" || return 1 # Debian multiarch supported by RAP needs ld to support sysroot.