blob: 927bac5c202b4328a667aa60cb349584423883d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
fixup solaris linker options
http://bugs.gentoo.org/show_bug.cgi?id=81058
--- support/shobj-conf.orig
+++ support/shobj-conf
@@ -78,10 +78,14 @@
sunos5*-*gcc*|solaris2*-*gcc*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
- # This line works for the Solaris linker in /usr/ccs/bin/ld
- SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
- # This line works for the GNU ld
-# SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
+ ld_used=`gcc -print-prog-name=ld`
+ if ${ld_used} -V 2>&1 | grep -q GNU; then
+ # This line works for the GNU ld
+ SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
+ else
+ # This line works for the Solaris linker in /usr/ccs/bin/ld
+ SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
+ fi
# SHLIB_XLDFLAGS='-R $(libdir)'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|