Gentoo Archives: gentoo-alt

From: Michael Weiser <michael@×××××××××××××××.net>
To: gentoo-alt@l.g.o
Subject: [gentoo-alt] ebuild dependency based on OS X version?
Date: Sun, 08 Feb 2015 13:00:30
Message-Id: 20150208120645.GB16350@weiser.dinsnail.net
1 Hi,
2
3 we've just upped the dependency on binutils-apple for llvm/clang to 5.1:
4 https://bugs.gentoo.org/show_bug.cgi?id=537342#c2
5
6 DEPEND="${COMMON_DEPEND}
7 [...]
8 || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 )
9
10 With good reason since clang won't compile on OS >= 10.7 otherwise: It
11 expects the linker to find the main program entry by itself without the
12 help of a crt1.o given on its command line by the linker. Huh.
13
14 This requirement becomes a problem on PPC though because
15 binutils-apple-4.2 is the most recent one that still does any PPC
16 output. And it totally suffices because there's nothing newer than OS X
17 10.5 on PPC and clang will always correctly put crt1.{,10.4,10.5}.o on
18 the linker command line on those older versions. The same holds true on
19 Intel for OS X < 10.7.
20
21 So what we'd need is something like:
22
23 DEPEND="${COMMON_DEPEND}
24 [...]
25 || ( >=sys-devel/binutils-2.18 sys-devel/binutils-apple )
26 kernel_Darwin_ge_107? ( >=sys-devel/binutils-apple-5.1 )
27
28 kernel_Darwin_ge_107 meaning "We're on an OS X 10.7 or newer.". As a
29 workaround I guess we could do:
30
31 DEPEND="${COMMON_DEPEND}
32 [...]
33 || ( >=sys-devel/binutils-2.18 sys-devel/binutils-apple )
34 !ppc-macos? ( >=sys-devel/binutils-apple-5.1 )
35
36 This would work since binutils-apple-5.1 (and 6.1) are available as far
37 back as 10.4 on Intel.
38
39 So what's the right way[tm] to go here?
40 --
41 Thanks,
42 Michael

Replies

Subject Author
Re: [gentoo-alt] ebuild dependency based on OS X version? Fabian Groffen <grobian@g.o>