Gentoo Archives: gentoo-alt

From: Fabrizio Listello <flistello@×××××.com>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] [PREFIX] linker_XXX?
Date: Wed, 20 Jun 2007 16:15:19
Message-Id: 442674df0706200914u5c843149qd69dc4ac9b01866a@mail.gmail.com
In Reply to: Re: [gentoo-alt] [PREFIX] linker_XXX? by Michael Haubenwallner
1 Some time ago I used a sun-ld keyword for chosing between GNU linker
2 or Sun Solaris native linker. This can be useful for debugging
3 pourpose.
4 I'ld prefer to have somewhere an explicit choice of the linker, if I
5 can. This can be useful in the future where, for example, one can try
6 to compile ebuild using Sun Studio Compilers instead of GCC...
7 Does this make sense?
8
9 On 6/13/07, Michael Haubenwallner <michael.haubenwallner@×××××××.at> wrote:
10 > On Tue, 2007-06-12 at 11:27 +0200, Fabian Groffen wrote:
11 > > I've hit this thought a few times now, but every time hacked around it
12 > > with assumptions. However, maybe it is a good idea to make the linker
13 > > (and perhaps also the compiler?) visible from ebuilds? Many "Darwin"
14 > > patches are linker patches.
15 > >
16 > > I was thinking of things like
17 > >
18 > > linker_GNU
19 > > linker_Darwin
20 > > linker_Solaris
21 > >
22 > > or?
23 > >
24 > > [[ ${LINKER} == binutils-2.17* ]]
25 > > [[ ${LINKER} == odcctools* ]]
26 > >
27 > > or any other mix inbetween? Does it make sense to anyone? Thoughts?
28 >
29 > What about having some intelligent functions in toolchain-funcs.eclass ?
30 >
31 > Because when GNU ld once works on platforms it does currently not, we
32 > might want to switch...
33 >
34 > I'm thinking of somewhat like that:
35 >
36 > tc-have-soname() {
37 > if [[ $($($(tc-getCC) -print-prog-name=ld) --version 2>/dev/null) == *GNU* ]]; then
38 > # ld used by CC is GNU ld, thus we have -soname
39 > return 0
40 > fi
41 > case "${CHOST}" in
42 > *-hpux*) return 0 ;; # assume ldwrapper maps -soname to +h
43 > esac
44 > return 1
45 > }
46 >
47 > and/or eventually:
48 >
49 > tc-soname() {
50 > if [[ $($(tc-getCC) -print-prog-name=ld) --version 2>/dev/null) == *GNU* ]]; then
51 > # ld used by CC is GNU ld, thus we have -soname
52 > echo "-soname=${1}"
53 > else
54 > case "${CHOST}" in
55 > *-hpux*) echo "+h ${1}" ;; # no mapping of -soname to +h in ldwrapper
56 > esac
57 > fi
58 > true
59 > }
60 >
61 > /haubi/
62 >
63 > --
64 > gentoo-alt@g.o mailing list
65 >
66 >
67
68
69 --
70
71 FList
72 --
73 gentoo-alt@g.o mailing list

Replies

Subject Author
Re: [gentoo-alt] [PREFIX] linker_XXX? Fabian Groffen <grobian@g.o>