commit: a58e5f266d9b62816405cbb1e8d0beb281b97edb
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 6 13:15:52 2024 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Feb 6 13:15:52 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=a58e5f26
scripts/bootstrap-prefix: pull in libffi as part of the compiler
We need an updated linker to compile libffi on Darwin 9, so make libffi
part of the compiler dependencies, such that we can build the linker
first, and then finish libffi.
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
scripts/bootstrap-prefix.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 676fe5ec0a..9a65ccf4fc 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -112,6 +112,9 @@ efetch() {
configure_cflags() {
export CPPFLAGS="-I${ROOT}/tmp/usr/include"
+ # keep it fairly reasonable (no -march or whatever)
+ export OVERRIDE_CFLAGS="-O2 -pipe"
+ export OVERRIDE_CXXFLAGS="-O2 -pipe"
case ${CHOST} in
*-darwin*)
@@ -151,7 +154,7 @@ configure_cflags() {
configure_toolchain() {
linker="sys-devel/binutils"
- local gcc_deps="dev-libs/gmp dev-libs/mpfr dev-libs/mpc"
+ local gcc_deps="dev-libs/gmp dev-libs/mpfr dev-libs/mpc dev-libs/libffi"
compiler="${gcc_deps} sys-devel/gcc-config sys-devel/gcc"
compiler_stage1="${gcc_deps} sys-devel/gcc-config"
compiler_type="gcc"
@@ -190,7 +193,8 @@ configure_toolchain() {
local cvers="${ccvers#*)}";
cvers="${cvers%%.*}"
# GCC-5 has C11 see above
if [[ ${cvers} -ge 5 ]] ; then
- : # ok!
+ : # ok! stage1 bootstrapped
one, get us a linker too
+
linker="=sys-devel/binutils-apple-3.2.6*"
else
# FIXME: should probably stage1
bootstrap GCC-5
# or something
@@ -1846,7 +1850,6 @@ bootstrap_stage2() {
app-arch/xz-utils
sys-apps/sed
sys-apps/baselayout
- dev-libs/libffi
sys-devel/m4
sys-devel/flex
sys-apps/diffutils # needed by bison-3 build system
@@ -1904,7 +1907,7 @@ bootstrap_stage2() {
EXTRA_ECONF="--disable-bootstrap $(rapx
--with-linker-hash-style=both) --with-local-prefix=${ROOT}
${disable_darwin_rpath}" \
MYCMAKEARGS="-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=OFF" \
GCC_MAKE_TARGET=all \
- OVERRIDE_CXXFLAGS="${CPPFLAGS} -O2 -pipe" \
+ OVERRIDE_CXXFLAGS="${CPPFLAGS} ${OVERRIDE_CXXFLAGS}" \
TPREFIX="${ROOT}" \
PYTHON_COMPAT_OVERRIDE=python$(python_ver) \
emerge_pkgs --nodeps ${pkg} || return 1