From f0a4bdf8e0bd9a6dc5de8efd01e6f3df3516f2b0 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 29 May 2010 19:27:49 -0700 Subject: [PATCH] On FreeBSD/SPARC64, use -fPIC - it's apparently necessary. --- aclocal.m4 | 19 ++++++++++++++++++- configure | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index e5841ed..2cce559 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -245,7 +245,24 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT, # or accepts command-line arguments like # those the GNU linker accepts. # - V_CCOPT="$V_CCOPT -fpic" + # Some instruction sets require -fPIC on some + # operating systems. Check for them. If you + # have a combination that requires it, add it + # here. + # + PIC_OPT=-fpic + case "$host_cpu" in + + sparc64*) + case "$host_os" in + + freebsd*) + PIC_OPT=-fPIC + ;; + esac + ;; + esac + V_CCOPT="$V_CCOPT $PIC_OPT" V_SONAME_OPT="-Wl,-soname," V_RPATH_OPT="-Wl,-rpath," ;; diff --git a/configure b/configure index b7fd5e9..ed7fb6d 100755 --- a/configure +++ b/configure @@ -3231,7 +3231,24 @@ _ACEOF # or accepts command-line arguments like # those the GNU linker accepts. # - V_CCOPT="$V_CCOPT -fpic" + # Some instruction sets require -fPIC on some + # operating systems. Check for them. If you + # have a combination that requires it, add it + # here. + # + PIC_OPT=-fpic + case "$host_cpu" in + + sparc64*) + case "$host_os" in + + freebsd*) + PIC_OPT=-fPIC + ;; + esac + ;; + esac + V_CCOPT="$V_CCOPT $PIC_OPT" V_SONAME_OPT="-Wl,-soname," V_RPATH_OPT="-Wl,-rpath," ;;