From 93ef2ca8ce830fe5a8a6126835ea3f5d269e2e6c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 13 Dec 2010 22:33:09 +0000 Subject: [Bug 3135271] Link error due to hidden symbols (CentOS 4.2) --- ChangeLog | 3 +++ generic/tcl.h | 4 ++-- unix/configure | 5 +++++ unix/tcl.m4 | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b943834..d308783 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-12-13 Jan Nijtmans + * generic/tcl.h: [Bug 3135271] Link error due to hidden + * unix/tcl.m4: symbols (CentOS 4.2) + * unix/configure: (autoconf-2.59) * win/tclPanic.c: Use gcc's __builtin_trap(), when available, to enter the debugger after a panic. * win/tclWinFile.c: Undocumented feature, only meant to be diff --git a/generic/tcl.h b/generic/tcl.h index 2e4b1fc..732b8e8 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.309 2010/12/10 21:59:24 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.310 2010/12/13 22:33:11 nijtmans Exp $ */ #ifndef _TCL @@ -190,7 +190,7 @@ extern "C" { # endif #else # define DLLIMPORT -# if defined(__GNUC__) && __GNUC__ > 3 +# if defined(__GNUC__) && !defined(NO_VIZ) # define DLLEXPORT __attribute__ ((visibility("default"))) # else # define DLLEXPORT diff --git a/unix/configure b/unix/configure index 816e681..5debd0a 100755 --- a/unix/configure +++ b/unix/configure @@ -6545,6 +6545,11 @@ echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 else + +cat >>confdefs.h <<\_ACEOF +#define NO_VIZ +_ACEOF + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ diff --git a/unix/tcl.m4 b/unix/tcl.m4 index cfaffe8..c699535 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1056,6 +1056,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [ CFLAGS="$CFLAGS -fvisibility=hidden" ], [ + AC_DEFINE(NO_VIZ, [], [No visibility attribute]) hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" AC_TRY_LINK([ extern __attribute__((__visibility__("hidden"))) void f(void); -- cgit v0.12