Skip to content

Commit f672ae1

Browse files
committed
scripts/bootstrap-prefix: simplify/cleanup configure_toolchain for Darwin
Remove outdated logic, go with current systems and requirements. Signed-off-by: Fabian Groffen <[email protected]>
1 parent 885a6df commit f672ae1

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

scripts/bootstrap-prefix.sh

+12-14
Original file line numberDiff line numberDiff line change
@@ -176,38 +176,36 @@ configure_toolchain() {
176176
*darwin*:1)
177177
einfo "Triggering Darwin with GCC toolchain"
178178
compiler_stage1+=" sys-apps/darwin-miscutils"
179+
compiler_stage1+=" sys-devel/gcc"
180+
# recent binutils-apple are hard to build (C++11 features,
181+
# and cmake build system) so avoid going there, the system
182+
# ld on machines with compiler that supports C11 is good
183+
# enough to bring us to stage3, after which the @system set
184+
# will take care of the rest
185+
linker="sys-devel/native-cctools"
186+
179187
local ccvers="$(unset CHOST; ${CC} --version 2>/dev/null)"
180-
local isgcc=
181188
case "${ccvers}" in
182189
*"(GCC) "[1-9]*|"gcc ("*") "[1-9]*)
183190
local cvers="${ccvers#*)}"; cvers="${cvers%%.*}"
184191
# GCC-5 has C11 see above
185192
if [[ ${ccvers} -ge 5 ]] ; then
186-
linker="=sys-devel/binutils-apple-3.2.6"
187-
isgcc=true
193+
: # ok!
188194
else
195+
# FIXME: should probably stage1 bootstrap GCC-5
196+
# or something
189197
eerror "compiler ${ccvers} is too old: ${cvers} < 5"
190198
eerror "you need a C11/C++11 compiler to bootstrap"
191199
fi
192200
;;
193201
*"Apple clang version "*|*"Apple LLVM version "*)
194-
# recent binutils-apple are hard to build (C++11
195-
# features, and cmake build system) so avoid going
196-
# there, the system ld is good enough to bring us to
197-
# stage3, after which the @system set will take care of
198-
# the rest
199-
linker=sys-devel/native-cctools
202+
: # ok!
200203
;;
201204
*)
202205
eerror "unknown compiler: ${ccvers}"
203206
return 1
204207
;;
205208
esac
206-
# current compiler (gcc-12) requires C++11, which is
207-
# available since 4.8, but we don't have versions in the
208-
# tree any more to bootstrap up to this -- so fail
209-
# FIXME: should probably stage1 bootstrap GCC-5 or something
210-
compiler_stage1+=" sys-devel/gcc"
211209
;;
212210
*-darwin*)
213211
einfo "Triggering Darwin with LLVM/Clang toolchain"

0 commit comments

Comments
 (0)