summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2011-04-06 14:54:06 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2011-04-06 14:54:06 (GMT)
commitce26b61d1c8d2936f481cd2324c8455795e477ce (patch)
treec67ac77da328b014485f7794aab500dece201863
parent3cf31b48a75e71a6fa81d39a13377d5f1d192b08 (diff)
downloadtk-ce26b61d1c8d2936f481cd2324c8455795e477ce.zip
tk-ce26b61d1c8d2936f481cd2324c8455795e477ce.tar.gz
tk-ce26b61d1c8d2936f481cd2324c8455795e477ce.tar.bz2
Don't use -fvisibility=hidden with static libraries (--disable-shared)
FossilOrigin-Name: 059fca216a6be24535fac093451c4e9753c89812
-rw-r--r--ChangeLog2
-rwxr-xr-xunix/configure2
-rw-r--r--unix/tcl.m42
3 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e5c1a4..bf42b33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
* unix/tkAppInit.c: Make symbols "main" and "Tcl_AppInit"
MODULE_SCOPE: there is absolutely no reason for exporting them.
+ * unix/tcl.m4: Don't use -fvisibility=hidden with static
+ * unix/configure libraries (--disable-shared)
2011-04-04 Peter Spjuth <peter.spjuth@gmail.com>
diff --git a/unix/configure b/unix/configure
index e44463a..79eff52 100755
--- a/unix/configure
+++ b/unix/configure
@@ -4316,7 +4316,7 @@ if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test "$GCC" = yes; then
+ if test "$GCC" = yes -a "$SHARED_BUILD" = 1; then
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror"
cat >conftest.$ac_ext <<_ACEOF
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 8c9eaf0..9a02e4c 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1044,7 +1044,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_CACHE_CHECK([if compiler supports visibility "hidden"],
tcl_cv_cc_visibility_hidden, [
- AS_IF([test "$GCC" = yes], [
+ AS_IF([test "$GCC" = yes -a "$SHARED_BUILD" = 1], [
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror"
AC_TRY_COMPILE(,, tcl_cv_cc_visibility_hidden=yes,
tcl_cv_cc_visibility_hidden=no)