summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-06-08 09:30:03 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-06-08 09:30:03 (GMT)
commita5bc6e10452a5a9d019c72b80504d635388b43fb (patch)
tree3fbfa6f88091d948f4b5c66c16ef8a28a68301a6 /unix
parent495791db7a0a519703a2cb0f1f0f6304a303bb8d (diff)
parent4a54b3c89a0f656a1c344bcb5978e55be37c6081 (diff)
downloadtcl-a5bc6e10452a5a9d019c72b80504d635388b43fb.zip
tcl-a5bc6e10452a5a9d019c72b80504d635388b43fb.tar.gz
tcl-a5bc6e10452a5a9d019c72b80504d635388b43fb.tar.bz2
Add "-fno-common" to SHARED_CFLAGS on various platforms (e.g. Linux, CYGWIN). This is the default with gcc-10, so better make sure it doesn't cause problems
Diffstat (limited to 'unix')
-rwxr-xr-xunix/configure15
-rw-r--r--unix/tcl.m415
2 files changed, 16 insertions, 14 deletions
diff --git a/unix/configure b/unix/configure
index 874c945..94de17f 100755
--- a/unix/configure
+++ b/unix/configure
@@ -5038,7 +5038,7 @@ fi
CFLAGS_OPTIMIZE=-O2
CFLAGS_WARNING="-Wall -Wextra -Wwrite-strings -Wpointer-arith"
case "${CC}" in
- *++)
+ *++|*++-*)
;;
*)
CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement"
@@ -5311,7 +5311,7 @@ fi
LD_SEARCH_FLAGS=""
;;
CYGWIN_*)
- SHLIB_CFLAGS=""
+ SHLIB_CFLAGS="-fno-common"
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
DL_OBJS="tclLoadDl.o"
@@ -5694,7 +5694,7 @@ fi
fi
;;
Linux*|GNU*|NetBSD-Debian)
- SHLIB_CFLAGS="-fPIC"
+ SHLIB_CFLAGS="-fPIC -fno-common"
SHLIB_SUFFIX=".so"
CFLAGS_OPTIMIZE="-O2"
@@ -5830,7 +5830,6 @@ fi
;;
DragonFly-*|FreeBSD-*)
# This configuration from FreeBSD Ports.
- SHLIB_CFLAGS="-fPIC"
SHLIB_LD="${CC} -shared"
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
SHLIB_SUFFIX=".so"
@@ -6218,7 +6217,6 @@ fi
QNX-6*)
# QNX RTP
# This may work for all QNX, but it was only reported for v6.
- SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld -Bshareable -x"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
@@ -6562,9 +6560,12 @@ fi
AIX-*) ;;
BSD/OS*) ;;
CYGWIN_*) ;;
- IRIX*) ;;
- NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
+ HP_UX*) ;;
Darwin-*) ;;
+ IRIX*) ;;
+ Linux*|GNU*) ;;
+ NetBSD-*|OpenBSD-*) ;;
+ OSF1-V*) ;;
SCO_SV-3.2*) ;;
*) SHLIB_CFLAGS="-fPIC" ;;
esac
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 0a2920b..aed464f 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -968,7 +968,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_OPTIMIZE=-O2
CFLAGS_WARNING="-Wall -Wextra -Wwrite-strings -Wpointer-arith"
case "${CC}" in
- *++)
+ *++|*++-*)
;;
*)
CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement"
@@ -1084,7 +1084,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
LD_SEARCH_FLAGS=""
;;
CYGWIN_*)
- SHLIB_CFLAGS=""
+ SHLIB_CFLAGS="-fno-common"
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
DL_OBJS="tclLoadDl.o"
@@ -1269,7 +1269,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
])
;;
Linux*|GNU*|NetBSD-Debian)
- SHLIB_CFLAGS="-fPIC"
+ SHLIB_CFLAGS="-fPIC -fno-common"
SHLIB_SUFFIX=".so"
CFLAGS_OPTIMIZE="-O2"
@@ -1364,7 +1364,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
;;
DragonFly-*|FreeBSD-*)
# This configuration from FreeBSD Ports.
- SHLIB_CFLAGS="-fPIC"
SHLIB_LD="${CC} -shared"
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
SHLIB_SUFFIX=".so"
@@ -1558,7 +1557,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
QNX-6*)
# QNX RTP
# This may work for all QNX, but it was only reported for v6.
- SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld -Bshareable -x"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
@@ -1786,9 +1784,12 @@ dnl # preprocessing tests use only CPPFLAGS.
AIX-*) ;;
BSD/OS*) ;;
CYGWIN_*) ;;
- IRIX*) ;;
- NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
+ HP_UX*) ;;
Darwin-*) ;;
+ IRIX*) ;;
+ Linux*|GNU*) ;;
+ NetBSD-*|OpenBSD-*) ;;
+ OSF1-V*) ;;
SCO_SV-3.2*) ;;
*) SHLIB_CFLAGS="-fPIC" ;;
esac])