Hi,

we've just upped the dependency on binutils-apple for llvm/clang to 5.1:
https://bugs.gentoo.org/show_bug.cgi?id=537342#c2

DEPEND="${COMMON_DEPEND}
        [...]
        || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 )

With good reason since clang won't compile on OS >= 10.7 otherwise: It
expects the linker to find the main program entry by itself without the
help of a crt1.o given on its command line by the linker. Huh.

This requirement becomes a problem on PPC though because
binutils-apple-4.2 is the most recent one that still does any PPC
output. And it totally suffices because there's nothing newer than OS X
10.5 on PPC and clang will always correctly put crt1.{,10.4,10.5}.o on
the linker command line on those older versions. The same holds true on
Intel for OS X < 10.7.

So what we'd need is something like:

DEPEND="${COMMON_DEPEND}
        [...]
        || ( >=sys-devel/binutils-2.18 sys-devel/binutils-apple )
        kernel_Darwin_ge_107? ( >=sys-devel/binutils-apple-5.1 )

kernel_Darwin_ge_107 meaning "We're on an OS X 10.7 or newer.". As a
workaround I guess we could do:

DEPEND="${COMMON_DEPEND}
        [...]
        || ( >=sys-devel/binutils-2.18 sys-devel/binutils-apple )
        !ppc-macos? ( >=sys-devel/binutils-apple-5.1 )

This would work since binutils-apple-5.1 (and 6.1) are available as far
back as 10.4 on Intel.

So what's the right way[tm] to go here?
-- 
Thanks,
Michael

Reply via email to