* when using -fpic, the .got section must fit into 4K, which on Solaris it doesn't ("relocation truncated to fit: R_SPARC_GOT13") --- support/shobj-conf +++ support/shobj-conf @@ -80,15 +80,17 @@ ;; sunos5*-*gcc*|solaris2*-*gcc*) - SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' ld_used=`gcc -print-prog-name=ld` if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then # This line works for the GNU ld SHOBJ_LDFLAGS='-shared -Wl,-h,$@' + # http://sourceware.org/ml/binutils/2001-08/msg00361.html + SHOBJ_CFLAGS=-fPIC else # This line works for the Solaris linker in /usr/ccs/bin/ld SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@' + SHOBJ_CFLAGS=-fpic fi # SHLIB_XLDFLAGS='-R $(libdir)'