diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tcl.h | 2 | ||||
-rwxr-xr-x | unix/configure | 5 | ||||
-rw-r--r-- | unix/tcl.m4 | 7 |
4 files changed, 15 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2011-04-11 Jan Nijtmans <nijtmans@users.sf.net> + * generic/tcl.h: fix for [Bug 3281728]: Tcl sources from 2011-04-06 do + * unix/tcl.m4: not build on GCC9 (RH9) + * unix/configure: + 2011-04-08 Jan Nijtmans <nijtmans@users.sf.net> * win/tclWinPort.h: fix for [Bug 3280043]: win2k: unresolved DLL imports diff --git a/generic/tcl.h b/generic/tcl.h index 3285c3c..ed63f8f 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -193,7 +193,7 @@ extern "C" { # endif #else # define DLLIMPORT -# if defined(__GNUC__) && !defined(NO_VIZ) && !defined(STATIC_BUILD) +# if defined(__GNUC__) && __GNUC__ > 3 # define DLLEXPORT __attribute__ ((visibility("default"))) # else # define DLLEXPORT diff --git a/unix/configure b/unix/configure index 4fdddd4..2483e4a 100755 --- a/unix/configure +++ b/unix/configure @@ -6479,7 +6479,7 @@ if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$GCC" = yes -a "$SHARED_BUILD" = 1; then + if test "$SHARED_BUILD" = 1; then hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -6492,6 +6492,9 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { +#if !defined(__GNUC__) || __GNUC__ < 4 +#error visibility hidden is not supported for this compiler +#endif ; return 0; diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 9a02e4c..5f4012d 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1044,9 +1044,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_CACHE_CHECK([if compiler supports visibility "hidden"], tcl_cv_cc_visibility_hidden, [ - AS_IF([test "$GCC" = yes -a "$SHARED_BUILD" = 1], [ + AS_IF([test "$SHARED_BUILD" = 1], [ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" - AC_TRY_COMPILE(,, tcl_cv_cc_visibility_hidden=yes, + AC_TRY_COMPILE(,[#if !defined(__GNUC__) || __GNUC__ < 4 +#error visibility hidden is not supported for this compiler +#endif + ], tcl_cv_cc_visibility_hidden=yes, tcl_cv_cc_visibility_hidden=no) CFLAGS=$hold_cflags ], [ |