1 |
On Tue, 2007-06-12 at 11:27 +0200, Fabian Groffen wrote: |
2 |
> I've hit this thought a few times now, but every time hacked around it |
3 |
> with assumptions. However, maybe it is a good idea to make the linker |
4 |
> (and perhaps also the compiler?) visible from ebuilds? Many "Darwin" |
5 |
> patches are linker patches. |
6 |
> |
7 |
> I was thinking of things like |
8 |
> |
9 |
> linker_GNU |
10 |
> linker_Darwin |
11 |
> linker_Solaris |
12 |
> |
13 |
> or? |
14 |
> |
15 |
> [[ ${LINKER} == binutils-2.17* ]] |
16 |
> [[ ${LINKER} == odcctools* ]] |
17 |
> |
18 |
> or any other mix inbetween? Does it make sense to anyone? Thoughts? |
19 |
|
20 |
What about having some intelligent functions in toolchain-funcs.eclass ? |
21 |
|
22 |
Because when GNU ld once works on platforms it does currently not, we |
23 |
might want to switch... |
24 |
|
25 |
I'm thinking of somewhat like that: |
26 |
|
27 |
tc-have-soname() { |
28 |
if [[ $($($(tc-getCC) -print-prog-name=ld) --version 2>/dev/null) == *GNU* ]]; then |
29 |
# ld used by CC is GNU ld, thus we have -soname |
30 |
return 0 |
31 |
fi |
32 |
case "${CHOST}" in |
33 |
*-hpux*) return 0 ;; # assume ldwrapper maps -soname to +h |
34 |
esac |
35 |
return 1 |
36 |
} |
37 |
|
38 |
and/or eventually: |
39 |
|
40 |
tc-soname() { |
41 |
if [[ $($(tc-getCC) -print-prog-name=ld) --version 2>/dev/null) == *GNU* ]]; then |
42 |
# ld used by CC is GNU ld, thus we have -soname |
43 |
echo "-soname=${1}" |
44 |
else |
45 |
case "${CHOST}" in |
46 |
*-hpux*) echo "+h ${1}" ;; # no mapping of -soname to +h in ldwrapper |
47 |
esac |
48 |
fi |
49 |
true |
50 |
} |
51 |
|
52 |
/haubi/ |
53 |
|
54 |
-- |
55 |
gentoo-alt@g.o mailing list |