summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstwo <stwo>2014-09-16 15:52:44 (GMT)
committerstwo <stwo>2014-09-16 15:52:44 (GMT)
commit76db7c5c047f92589956c4c5d0ae3eb6997dd69d (patch)
tree26f65c8515018cef08162c3debe999b991327bf3
parent5f9519213f1ee34452f4fa7bd495a4c1ddada792 (diff)
downloadtcl-76db7c5c047f92589956c4c5d0ae3eb6997dd69d.zip
tcl-76db7c5c047f92589956c4c5d0ae3eb6997dd69d.tar.gz
tcl-76db7c5c047f92589956c4c5d0ae3eb6997dd69d.tar.bz2
Better pic flag for OpenBSD.
-rwxr-xr-xunix/configure9
-rw-r--r--unix/tcl.m49
2 files changed, 16 insertions, 2 deletions
diff --git a/unix/configure b/unix/configure
index d11e7d2..ff7791e 100755
--- a/unix/configure
+++ b/unix/configure
@@ -7576,7 +7576,14 @@ fi
LDFLAGS=""
;;
*)
- SHLIB_CFLAGS="-fPIC"
+ case "$arch" in
+ alpha|sparc64)
+ SHLIB_CFLAGS="-fPIC"
+ ;;
+ *)
+ SHLIB_CFLAGS="-fpic"
+ ;;
+ esac
SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 437ce3d..c4e4675 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1499,7 +1499,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
LDFLAGS=""
;;
*)
- SHLIB_CFLAGS="-fPIC"
+ case "$arch" in
+ alpha|sparc64)
+ SHLIB_CFLAGS="-fPIC"
+ ;;
+ *)
+ SHLIB_CFLAGS="-fpic"
+ ;;
+ esac
SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"