diff options
author | dgp <dgp@users.sourceforge.net> | 2001-09-18 20:15:33 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2001-09-18 20:15:33 (GMT) |
commit | f26e49122769de0558300ba54acf53660ad4d04c (patch) | |
tree | d963be0ed29e9e2a35abab3218018d8b43841d60 | |
parent | 004a1c1b5c076486f54e26f5e167af8cfcafd928 (diff) | |
download | tcl-f26e49122769de0558300ba54acf53660ad4d04c.zip tcl-f26e49122769de0558300ba54acf53660ad4d04c.tar.gz tcl-f26e49122769de0558300ba54acf53660ad4d04c.tar.bz2 |
* On Linux, disable inlining when
one of the compat/*.c routines is to be linked in. [Patch 440891]
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | unix/configure | 70 | ||||
-rw-r--r-- | unix/tcl.m4 | 12 |
3 files changed, 59 insertions, 29 deletions
@@ -1,3 +1,9 @@ +2001-09-18 Don Porter <dgp@users.sourceforge.net> + + * unix/configure: Regen. + * unix/tcl.m4 (SC_CONFIG_CFLAGS): On Linux, disable inlining when + one of the compat/*.c routines is to be linked in. [Patch 440891] + 2001-09-13 Jeff Hobbs <jeffh@ActiveState.com> * generic/tclUtf.c (Tcl_UtfPrev): corrected to return the proper diff --git a/unix/configure b/unix/configure index 650a8c5..f26b858 100755 --- a/unix/configure +++ b/unix/configure @@ -5060,6 +5060,18 @@ fi if test "`uname -m`" = "alpha" ; then EXTRA_CFLAGS="-mieee" fi + + # The combo of gcc + glibc has a bug related + # to inlining of functions like strtod(). The + # -fno-builtin flag should address this problem + # but it does not work. The -fno-inline flag + # is kind of overkill but it works. + # Disable inlining only when one of the + # files in compat/*.c is being linked in. + if test x"${LIBOBJS}" != x ; then + EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline" + fi + ;; GNU*) SHLIB_CFLAGS="-fPIC" @@ -5075,17 +5087,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:5079: checking for dld.h" >&5 +echo "configure:5091: checking for dld.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 5084 "configure" +#line 5096 "configure" #include "confdefs.h" #include <dld.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5101: \"$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* @@ -5140,17 +5152,17 @@ fi # 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:5144: checking for dlfcn.h" >&5 +echo "configure:5156: 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 5149 "configure" +#line 5161 "configure" #include "confdefs.h" #include <dlfcn.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5166: \"$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* @@ -5177,9 +5189,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then LDFLAGS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:5181: checking for ELF" >&5 +echo "configure:5193: checking for ELF" >&5 cat > conftest.$ac_ext <<EOF -#line 5183 "configure" +#line 5195 "configure" #include "confdefs.h" #ifdef __ELF__ @@ -5456,17 +5468,17 @@ EOF # 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:5460: checking for ld accepts -Bexport flag" >&5 +echo "configure:5472: checking for ld accepts -Bexport flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-Bexport" cat > conftest.$ac_ext <<EOF -#line 5463 "configure" +#line 5475 "configure" #include "confdefs.h" int main() { int i; ; return 0; } EOF -if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -5512,9 +5524,9 @@ rm -f conftest* if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:5516: checking sys/exec.h" >&5 +echo "configure:5528: checking sys/exec.h" >&5 cat > conftest.$ac_ext <<EOF -#line 5518 "configure" +#line 5530 "configure" #include "confdefs.h" #include <sys/exec.h> int main() { @@ -5532,7 +5544,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -5550,9 +5562,9 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:5554: checking a.out.h" >&5 +echo "configure:5566: checking a.out.h" >&5 cat > conftest.$ac_ext <<EOF -#line 5556 "configure" +#line 5568 "configure" #include "confdefs.h" #include <a.out.h> int main() { @@ -5570,7 +5582,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -5588,9 +5600,9 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:5592: checking sys/exec_aout.h" >&5 +echo "configure:5604: checking sys/exec_aout.h" >&5 cat > conftest.$ac_ext <<EOF -#line 5594 "configure" +#line 5606 "configure" #include "confdefs.h" #include <sys/exec_aout.h> int main() { @@ -5608,7 +5620,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -5705,7 +5717,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:5709: checking for build with symbols" >&5 +echo "configure:5721: 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" @@ -5742,17 +5754,17 @@ CFLAGS=${CFLAGS_DEFAULT} do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5746: checking for $ac_hdr" >&5 +echo "configure:5758: 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 5751 "configure" +#line 5763 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5768: \"$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* @@ -5782,17 +5794,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5786: checking for $ac_hdr" >&5 +echo "configure:5798: 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 5791 "configure" +#line 5803 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5808: \"$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* @@ -5819,7 +5831,7 @@ fi done echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6 -echo "configure:5823: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo "configure:5835: 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 @@ -5881,7 +5893,7 @@ TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX} echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:5885: checking how to build libraries" >&5 +echo "configure:5897: 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" diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 6fba598..571597a 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -821,6 +821,18 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ if test "`uname -m`" = "alpha" ; then EXTRA_CFLAGS="-mieee" fi + + # The combo of gcc + glibc has a bug related + # to inlining of functions like strtod(). The + # -fno-builtin flag should address this problem + # but it does not work. The -fno-inline flag + # is kind of overkill but it works. + # Disable inlining only when one of the + # files in compat/*.c is being linked in. + if test x"${LIBOBJS}" != x ; then + EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline" + fi + ;; GNU*) SHLIB_CFLAGS="-fPIC" |