Tcl Source Code

Artifact [2f20e15cda]
Login

Artifact 2f20e15cda54b3bb454470ce913ae88a45c8e12a:

Attachment "inline.patch" to ticket [440891ffff] added by dgp 2001-07-13 08:05:10.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.494
diff -u -r1.494 ChangeLog
--- ChangeLog	2001/07/12 13:36:09	1.494
+++ ChangeLog	2001/07/13 01:04:08
@@ -1,3 +1,9 @@
+2001-07-12  Don Porter  <[email protected]>
+
+	* unix/tcl.m4 (SC_CONFIG_CFLAGS): On Linux, disable inlining when
+	one of the compat/*.c routines is to be linked in.
+	* unix/configure: Regen.
+
 2001-07-12  Donal K. Fellows  <[email protected]>
 
 	* tests/unixInit.test (unixInit-2.8): Added extra constraint,
Index: unix/configure
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure,v
retrieving revision 1.15
diff -u -r1.15 configure
--- unix/configure	2001/07/11 00:59:30	1.15
+++ unix/configure	2001/07/13 01:04:08
@@ -533,7 +533,7 @@
 fi
 
 
-# RCS: @(#) $Id: configure,v 1.15 2001/07/11 00:59:30 mdejong Exp $
+# RCS: @(#) $Id: configure.in,v 1.70 2001/07/11 00:59:31 mdejong Exp $
 
 TCL_VERSION=8.4
 TCL_MAJOR_VERSION=8
@@ -5135,6 +5135,14 @@
 	    if test "`uname -m`" = "alpha" ; then
 		EXTRA_CFLAGS="-mieee"
 	    fi
+
+	    # Inlining of system functions like strtod() can defeat
+	    # their replacement by compat/*.c versions listed in
+	    # $LIBOBJS.  Make sure inlining is disabled whenever any
+	    # compat/*.c file is being linked in.
+	    if test x"${LIBOBJS}" != x ; then
+		EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
+	    fi
 	    ;;
 	MP-RAS-02*)
 	    SHLIB_CFLAGS="-K PIC"
@@ -5160,17 +5168,17 @@
 	    # Not available on all versions:  check for include file.
 	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:5164: checking for dlfcn.h" >&5
+echo "configure:5172: checking for dlfcn.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5169 "configure"
+#line 5177 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5197,9 +5205,9 @@
 		LDFLAGS=""
 		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:5201: checking for ELF" >&5
+echo "configure:5209: checking for ELF" >&5
 		cat > conftest.$ac_ext <<EOF
-#line 5203 "configure"
+#line 5211 "configure"
 #include "confdefs.h"
 
 #ifdef __ELF__
@@ -5470,17 +5478,17 @@
 	    # that don't grok the -Bexport option.  Test that it does.
 	    hold_ldflags=$LDFLAGS
 	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:5474: checking for ld accepts -Bexport flag" >&5
+echo "configure:5482: checking for ld accepts -Bexport flag" >&5
 	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
 	    cat > conftest.$ac_ext <<EOF
-#line 5477 "configure"
+#line 5485 "configure"
 #include "confdefs.h"
 
 int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   found=yes
 else
@@ -5526,9 +5534,9 @@
 
     if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
 	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:5530: checking sys/exec.h" >&5
+echo "configure:5538: checking sys/exec.h" >&5
 	cat > conftest.$ac_ext <<EOF
-#line 5532 "configure"
+#line 5540 "configure"
 #include "confdefs.h"
 #include <sys/exec.h>
 int main() {
@@ -5546,7 +5554,7 @@
     
 ; return 0; }
 EOF
-if { (eval echo configure:5550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   tcl_ok=usable
 else
@@ -5564,9 +5572,9 @@
 
 	else
 	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:5568: checking a.out.h" >&5
+echo "configure:5576: checking a.out.h" >&5
 	    cat > conftest.$ac_ext <<EOF
-#line 5570 "configure"
+#line 5578 "configure"
 #include "confdefs.h"
 #include <a.out.h>
 int main() {
@@ -5584,7 +5592,7 @@
 	    
 ; return 0; }
 EOF
-if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   tcl_ok=usable
 else
@@ -5602,9 +5610,9 @@
 
 	    else
 		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:5606: checking sys/exec_aout.h" >&5
+echo "configure:5614: checking sys/exec_aout.h" >&5
 		cat > conftest.$ac_ext <<EOF
-#line 5608 "configure"
+#line 5616 "configure"
 #include "confdefs.h"
 #include <sys/exec_aout.h>
 int main() {
@@ -5622,7 +5630,7 @@
 		
 ; return 0; }
 EOF
-if { (eval echo configure:5626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   tcl_ok=usable
 else
@@ -5717,7 +5725,7 @@
 
 
     echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:5721: checking for build with symbols" >&5
+echo "configure:5729: checking for build with symbols" >&5
     # Check whether --enable-symbols or --disable-symbols was given.
 if test "${enable_symbols+set}" = set; then
   enableval="$enable_symbols"
@@ -5754,17 +5762,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5758: checking for $ac_hdr" >&5
+echo "configure:5766: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5763 "configure"
+#line 5771 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5794,17 +5802,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5798: checking for $ac_hdr" >&5
+echo "configure:5806: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5803 "configure"
+#line 5811 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5831,7 +5839,7 @@
 done
 
     echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6
-echo "configure:5835: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
+echo "configure:5843: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
     if test -f /usr/lib/NextStep/software_version; then
 	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
     else
@@ -5893,7 +5901,7 @@
 
 
     echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:5897: checking how to build libraries" >&5
+echo "configure:5905: checking how to build libraries" >&5
     # Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
   enableval="$enable_shared"
Index: unix/tcl.m4
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tcl.m4,v
retrieving revision 1.39
diff -u -r1.39 tcl.m4
--- unix/tcl.m4	2001/07/11 00:59:31	1.39
+++ unix/tcl.m4	2001/07/13 01:04:08
@@ -806,6 +806,14 @@
 	    if test "`uname -m`" = "alpha" ; then
 		EXTRA_CFLAGS="-mieee"
 	    fi
+
+	    # Inlining of system functions like strtod() can defeat
+	    # their replacement by compat/*.c versions listed in
+	    # $LIBOBJS.  Make sure inlining is disabled whenever any
+	    # compat/*.c file is being linked in.
+	    if test x"${LIBOBJS}" != x ; then
+		EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
+	    fi
 	    ;;
 	MP-RAS-02*)
 	    SHLIB_CFLAGS="-K PIC"