aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-05-29 19:27:49 -0700
committerGuy Harris <guy@alum.mit.edu>2010-05-29 19:27:49 -0700
commitf0a4bdf8e0bd9a6dc5de8efd01e6f3df3516f2b0 (patch)
tree819bf4098237e72c2e6a90840c4989374af2ec7e
parent9980b3601f6aafce0d53229cd3a331679c6668c1 (diff)
On FreeBSD/SPARC64, use -fPIC - it's apparently necessary.
-rw-r--r--aclocal.m419
-rwxr-xr-xconfigure19
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,"
;;