Blob Blame Raw
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.12-42) unstable; urgency=medium
 .
   * pathnames1.6
   * Bug fix: "FTBFS with bindnow and PIE enabled", thanks to Balint Reczey
     (Closes: #837481).
   * Bug fix: "FTBFS with compilers that default to -fPIE (patch
     attached)", thanks to Adam Conrad (Closes: #822820).
Author: Camm Maguire <camm@debian.org>
Bug-Debian: https://bugs.debian.org/822820
Bug-Debian: https://bugs.debian.org/837481

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2016-10-27

--- gcl-2.6.12.orig/configure
+++ gcl-2.6.12/configure
@@ -3853,9 +3853,8 @@ if echo $GCL_CC |grep gcc |grep -q win;
 fi
 
 
-add_arg_to_tcflags() {
+add_arg_to_cflags() {
 
-    local i=1
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAG $1" >&5
 $as_echo_n "checking for CFLAG $1... " >&6; }
     CFLAGS_ORI=$CFLAGS
@@ -3877,8 +3876,8 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  TCFLAGS="$TCFLAGS $1";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };i=0
+  CFLAGS="$CFLAGS_ORI $1";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; };return 0
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -3888,27 +3887,26 @@ rm -f core *.core core.conftest.* gmon.o
 fi
 
     CFLAGS=$CFLAGS_ORI
-    return $i
+    return 1
 
 }
 
-assert_arg_to_tcflags() {
-    if ! add_arg_to_tcflags $1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot add $1 to CFLAGS" >&5
+assert_arg_to_cflags() {
+    if ! add_arg_to_cflags $1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot add $1 to CFLAGS" >&5
 $as_echo "cannot add $1 to CFLAGS" >&6; }; exit 1 ; fi
     return 0
 }
 
-add_args_to_tcflags() {
+add_args_to_cflags() {
 
     while test "$#" -ge 1 ; do
-  	add_arg_to_tcflags $1
+  	add_arg_to_cflags $1
 	shift
     done
 }
 
-add_arg_to_tldflags() {
+add_arg_to_ldflags() {
 
-    local i=1
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDFLAG $1" >&5
 $as_echo_n "checking for LDFLAG $1... " >&6; }
     LDFLAGS_ORI=$LDFLAGS
@@ -3929,8 +3927,8 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  TLDFLAGS="$TLDFLAGS $1";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };i=0
+  LDFLAGS="$LDFLAGS_ORI $1";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; };return 0
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -3940,20 +3938,20 @@ rm -f core *.core core.conftest.* gmon.o
 fi
 
     LDFLAGS=$LDFLAGS_ORI
-    return $i
+    return 1
 
 }
 
-assert_arg_to_tldflags() {
-    if ! add_arg_to_tldflags $1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot add $1 to LDFLAGS" >&5
+assert_arg_to_ldflags() {
+    if ! add_arg_to_ldflags $1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot add $1 to LDFLAGS" >&5
 $as_echo "cannot add $1 to LDFLAGS" >&6; }; exit 1 ; fi
     return 0
 }
 
-add_args_to_tldflags() {
+add_args_to_ldflags() {
 
     while test "$#" -ge 1 ; do
-  	add_arg_to_tldflags $1
+  	add_arg_to_ldflags $1
 	shift
     done
 }
@@ -3975,16 +3973,14 @@ $as_echo "removing $1 from LDFLAGS" >&6;
 
 }
 
-TCFLAGS=""
-add_args_to_tcflags -fsigned-char -pipe \
+add_args_to_cflags -fsigned-char -pipe \
                     -fno-builtin-malloc -fno-builtin-free \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
 	            -Wall \
 	            -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
 	            -Wno-unused-but-set-variable -Wno-misleading-indentation
 
-TLDFLAGS=""
-add_args_to_tldflags -Wl,-no_pie -no-pie -Wl,-z,lazy
+add_args_to_ldflags -Wl,-no_pie -no-pie -Wl,-z,lazy
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
 $as_echo_n "checking for clang... " >&6; }
@@ -4032,29 +4028,29 @@ fi
 
 case $use in
     *mingw*)
-	assert_arg_to_tcflags -fno-zero-initialized-in-bss
-	assert_arg_to_tcflags -mms-bitfields;;
+	assert_arg_to_cflags -fno-zero-initialized-in-bss
+	assert_arg_to_cflags -mms-bitfields;;
     *gnuwin*)
-	assert_arg_to_tcflags -fno-zero-initialized-in-bss
-	assert_arg_to_tcflags -mms-bitfields
-        assert_arg_to_tldflags -Wl,--stack,8000000;;
+	assert_arg_to_cflags -fno-zero-initialized-in-bss
+	assert_arg_to_cflags -mms-bitfields
+        assert_arg_to_ldflags -Wl,--stack,8000000;;
     386-macosx)
-	assert_arg_to_tldflags -Wl,-no_pie
+	assert_arg_to_ldflags -Wl,-no_pie
 	if test "$build_cpu" = "x86_64" ; then
-	    assert_arg_to_tcflags -m64
-	    assert_arg_to_tldflags -m64
-	    assert_arg_to_tldflags -Wl,-headerpad,72
+	    assert_arg_to_cflags -m64
+	    assert_arg_to_ldflags -m64
+	    assert_arg_to_ldflags -Wl,-headerpad,72
         else
-	    assert_arg_to_tcflags -m32
-	    assert_arg_to_tldflags -m32
-	    assert_arg_to_tldflags -Wl,-headerpad,56
+	    assert_arg_to_cflags -m32
+	    assert_arg_to_ldflags -m32
+	    assert_arg_to_ldflags -Wl,-headerpad,56
         fi;;
-    FreeBSD) assert_arg_to_tldflags -Z;;
+    FreeBSD) assert_arg_to_ldflags -Z;;
 esac
 
 if test "$enable_static" = "yes" ; then
-    assert_arg_to_tldflags -static
-    assert_arg_to_tldflags -Wl,-zmuldefs
+    assert_arg_to_ldflags -static
+    assert_arg_to_ldflags -Wl,-zmuldefs
 
 $as_echo "#define STATIC_LINKING 1" >>confdefs.h
 
@@ -4148,7 +4144,7 @@ cat >>confdefs.h <<_ACEOF
 #define GCL_GPROF_START $GCL_GPROF_START
 _ACEOF
 
-			   assert_arg_to_tcflags -pg
+			   assert_arg_to_cflags -pg
 			   case $use in
 			       s390*) ;; # relocation truncation bug in gcc
 			       *) TLIBS="$TLIBS -pg";;
@@ -4164,7 +4160,7 @@ fi
 
 
 if test "$enable_debug" = "yes" ; then
-    assert_arg_to_tcflags -g
+    assert_arg_to_cflags -g
     # for subconfigurations
     CFLAGS="$CFLAGS -g"
 else
@@ -4175,41 +4171,41 @@ fi
 # gcc on ppc cannot compile our new_init.c with full opts --CM
 TONIFLAGS=""
 case $use in
-    powerpc*macosx) assert_arg_to_tcflags -mlongcall;;
+    powerpc*macosx) assert_arg_to_cflags -mlongcall;;
     *linux)
 	case $use in
 	    alpha*)
-		assert_arg_to_tcflags -mieee
+		assert_arg_to_cflags -mieee
 		if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
 		;;
 	    aarch64*)
 		TLIBS="$TLIBS -lgcc_s";;
 	    hppa*)
-		assert_arg_to_tcflags -mlong-calls
+		assert_arg_to_cflags -mlong-calls
 		TLIBS="$TLIBS -lgcc_s" # workaround hppa __moddi3 local func symbols with default linker flags
 		if test "$enable_debug" != "yes" ; then TO3FLAGS="-O2" ; TFPFLAG=""; fi #FIXME needed asof gcc 4.8.1
 		;;
 	    mips*)
 		case $canonical in
 		    mips64*linux*)
-			assert_arg_to_tldflags -Wl,-z,now;;
+			assert_arg_to_ldflags -Wl,-z,now;;
 		esac
 		;;
 	    ia64*)
 		if test "$enable_debug" != "yes" ; then TO3FLAGS="-O" ; fi #FIXME needed asof gcc 4.8.1
 		;;
 	    arm*)
-		assert_arg_to_tcflags -mlong-calls
-		assert_arg_to_tcflags -fdollars-in-identifiers
-		assert_arg_to_tcflags -g #?
+		assert_arg_to_cflags -mlong-calls
+		assert_arg_to_cflags -fdollars-in-identifiers
+		assert_arg_to_cflags -g #?
 		;;
 	    powerpc*)
-		assert_arg_to_tcflags -mlongcall
+		assert_arg_to_cflags -mlongcall
 		;;
 	esac;;
 esac
 if test "$enable_pic" = "yes" ; then
-    assert_arg_to_tcflags -fPIC
+    assert_arg_to_cflags -fPIC
 fi
 
 
@@ -5385,7 +5381,7 @@ fi
 
 
     TLIBS="$TLIBS -ldl -rdynamic"
-    assert_arg_to_tcflags -fPIC
+    assert_arg_to_cflags -fPIC
 
 $as_echo "#define USE_DLOPEN 1" >>confdefs.h
 
@@ -5869,7 +5865,7 @@ $as_echo "#define HAVE_XDR 1" >>confdefs
 
 	if test "$XDR_LIB" != " "; then
 	    TLIBS="$TLIBS -l$XDR_LIB"
-	    add_arg_to_tcflags -I/usr/include/$XDR_LIB
+	    add_arg_to_cflags -I/usr/include/$XDR_LIB
 	fi
     fi
 fi
@@ -6935,7 +6931,7 @@ if test "$use" != "386-gnu" ; then #hurd
 $as_echo_n "checking finding default linker script... " >&6; }
     touch unixport/gcl.script
     echo "int main() {return 0;}" >foo.c
-    $CC $TLDFLAGS -Wl,--verbose foo.c -o foo 2>&1 | \
+    $CC $LDFLAGS -Wl,--verbose foo.c -o foo 2>&1 | \
 	$AWK '/\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=/ {i=1-i;next} {if (i) print}' >gcl.script
     rm -rf foo.c foo
 
@@ -6956,7 +6952,7 @@ $as_echo "$as_me: trying to adjust text
             cat gcl.script.def | $AWK '/SIZEOF_HEADERS/ {gsub("0x[0-9]*","0x" j,$0);} {print}' j=$j >gcl.script
 	    #        diff -u gcl.script.def gcl.script
             echo "int main() {return 0;}" >foo.c
-            if ( $CC $TLDFLAGS -Wl,-T gcl.script foo.c -o foo && ./foo ) >/dev/null 2>&1 ; then
+            if ( $CC $LDFLAGS -Wl,-T gcl.script foo.c -o foo && ./foo ) >/dev/null 2>&1 ; then
 		if test $n -lt $min ; then min=$n; fi;
 		if test $n -gt $max; then max=$n; fi;
 	    elif test $max -gt 0 ; then
@@ -7020,7 +7016,7 @@ $as_echo_n "checking our linker script..
 	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
 $as_echo "done" >&6; }
 	    rm -f gcl.script.def
-	    LDFLAGS="$LDFLAGS -Wl,-T gcl.script "
+	    assert_arg_to_ldflags -Wl,-T,gcl.script
 	    cp gcl.script unixport
 	else
 	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found or not needed" >&5
@@ -9065,16 +9061,16 @@ fi
 
 
 
-LDFLAGS="`echo $LDFLAGS | sed 's,gcl.script,../unixport/gcl.script,g'` $TLDFLAGS"
+LDFLAGS="`echo $LDFLAGS | sed 's,gcl.script,../unixport/gcl.script,g'`"
 
 LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $LIBS $TLIBS"
 
-FINAL_CFLAGS="$CFLAGS $CPPFLAGS $X_CFLAGS $TCFLAGS"
+FINAL_CFLAGS="$CFLAGS $CPPFLAGS $X_CFLAGS"
 
 # Work around bug with gcc on ppc -- CM
-NIFLAGS="$CFLAGS $CPPFLAGS $TCFLAGS $TONIFLAGS -I\$(GCLDIR)/o"
+NIFLAGS="$CFLAGS $CPPFLAGS $TONIFLAGS -I\$(GCLDIR)/o"
 
-CFLAGS="$CFLAGS $CPPFLAGS $TCFLAGS $TO3FLAGS -I\$(GCLDIR)/o"
+CFLAGS="$CFLAGS $CPPFLAGS $TO3FLAGS -I\$(GCLDIR)/o"
 
 O3FLAGS=$TO3FLAGS
 
--- gcl-2.6.12.orig/configure.in
+++ gcl-2.6.12/configure.in
@@ -185,60 +185,58 @@ if echo $GCL_CC |grep gcc |grep -q win;
 fi
 AC_SUBST(GCL_CC)
 
-add_arg_to_tcflags() {
+add_arg_to_cflags() {
     
-    local i=1
     AC_MSG_CHECKING([for CFLAG $1])
     CFLAGS_ORI=$CFLAGS
     CFLAGS="$CFLAGS -Werror $1 `echo $1|sed 's,-Wno-,-W,1'`"
     AC_RUN_IFELSE(
 	[AC_LANG_PROGRAM([[]],[[]])],
-	[TCFLAGS="$TCFLAGS $1";AC_MSG_RESULT([yes]);i=0],
+	[CFLAGS="$CFLAGS_ORI $1";AC_MSG_RESULT([yes]);return 0],
 	[AC_MSG_RESULT([no])],
 	[AC_MSG_RESULT([no])])
     CFLAGS=$CFLAGS_ORI
-    return $i
+    return 1
     
 }
 
-assert_arg_to_tcflags() {
-    if ! add_arg_to_tcflags $1 ; then AC_MSG_RESULT([cannot add $1 to CFLAGS]); exit 1 ; fi
+assert_arg_to_cflags() {
+    if ! add_arg_to_cflags $1 ; then AC_MSG_RESULT([cannot add $1 to CFLAGS]); exit 1 ; fi
     return 0
 }
 
-add_args_to_tcflags() {
+add_args_to_cflags() {
     
     while test "$#" -ge 1 ; do
-  	add_arg_to_tcflags $1
+  	add_arg_to_cflags $1
 	shift
     done
 }
 
-add_arg_to_tldflags() {
+add_arg_to_ldflags() {
     
-    local i=1
     AC_MSG_CHECKING([for LDFLAG $1])
     LDFLAGS_ORI=$LDFLAGS
     LDFLAGS="$LDFLAGS -Werror $1"
     AC_RUN_IFELSE(
 	[AC_LANG_PROGRAM([[]],[[]])],
-	[TLDFLAGS="$TLDFLAGS $1";AC_MSG_RESULT([yes]);i=0],
+	[LDFLAGS="$LDFLAGS_ORI $1";AC_MSG_RESULT([yes]);return 0],
 	[AC_MSG_RESULT([no])],
 	[AC_MSG_RESULT([no])])
     LDFLAGS=$LDFLAGS_ORI
-    return $i
+    return 1
     
 }
 
-assert_arg_to_tldflags() {
-    if ! add_arg_to_tldflags $1 ; then AC_MSG_RESULT([cannot add $1 to LDFLAGS]); exit 1 ; fi
+assert_arg_to_ldflags() {
+    if ! add_arg_to_ldflags $1 ; then AC_MSG_RESULT([cannot add $1 to LDFLAGS]); exit 1 ; fi
     return 0
 }
 
-add_args_to_tldflags() {
+add_args_to_ldflags() {
     
     while test "$#" -ge 1 ; do
-  	add_arg_to_tldflags $1
+  	add_arg_to_ldflags $1
 	shift
     done
 }
@@ -259,16 +257,14 @@ remove_arg_from_ldflags() {
     
 }
 
-TCFLAGS=""
-add_args_to_tcflags -fsigned-char -pipe \
+add_args_to_cflags -fsigned-char -pipe \
                     -fno-builtin-malloc -fno-builtin-free \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
 	            -Wall \
 	            -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
 	            -Wno-unused-but-set-variable -Wno-misleading-indentation
 
-TLDFLAGS=""
-add_args_to_tldflags -Wl,-no_pie -no-pie -Wl,-z,lazy
+add_args_to_ldflags -Wl,-no_pie -no-pie -Wl,-z,lazy
 
 AC_MSG_CHECKING([for clang])
 AC_RUN_IFELSE(
@@ -290,29 +286,29 @@ AC_RUN_IFELSE(
 
 case $use in
     *mingw*)
-	assert_arg_to_tcflags -fno-zero-initialized-in-bss
-	assert_arg_to_tcflags -mms-bitfields;;
+	assert_arg_to_cflags -fno-zero-initialized-in-bss
+	assert_arg_to_cflags -mms-bitfields;;
     *gnuwin*)
-	assert_arg_to_tcflags -fno-zero-initialized-in-bss
-	assert_arg_to_tcflags -mms-bitfields
-        assert_arg_to_tldflags -Wl,--stack,8000000;;
+	assert_arg_to_cflags -fno-zero-initialized-in-bss
+	assert_arg_to_cflags -mms-bitfields
+        assert_arg_to_ldflags -Wl,--stack,8000000;;
     386-macosx)
-	assert_arg_to_tldflags -Wl,-no_pie
+	assert_arg_to_ldflags -Wl,-no_pie
 	if test "$build_cpu" = "x86_64" ; then
-	    assert_arg_to_tcflags -m64
-	    assert_arg_to_tldflags -m64
-	    assert_arg_to_tldflags -Wl,-headerpad,72
+	    assert_arg_to_cflags -m64
+	    assert_arg_to_ldflags -m64
+	    assert_arg_to_ldflags -Wl,-headerpad,72
         else
-	    assert_arg_to_tcflags -m32
-	    assert_arg_to_tldflags -m32
-	    assert_arg_to_tldflags -Wl,-headerpad,56
+	    assert_arg_to_cflags -m32
+	    assert_arg_to_ldflags -m32
+	    assert_arg_to_ldflags -Wl,-headerpad,56
         fi;;
-    FreeBSD) assert_arg_to_tldflags -Z;;
+    FreeBSD) assert_arg_to_ldflags -Z;;
 esac
 
 if test "$enable_static" = "yes" ; then
-    assert_arg_to_tldflags -static
-    assert_arg_to_tldflags -Wl,-zmuldefs
+    assert_arg_to_ldflags -static
+    assert_arg_to_ldflags -Wl,-zmuldefs
     AC_DEFINE(STATIC_LINKING,1,[staticly linked images])
 fi
 
@@ -353,7 +349,7 @@ AC_ARG_ENABLE([gprof],[  --enable-gprof
 		       if test "$GCL_GPROF_START" != "" ; then
 			   AC_MSG_RESULT($GCL_GPROF_START)
 			   AC_DEFINE_UNQUOTED(GCL_GPROF_START,$GCL_GPROF_START,[starting address for gprof])
-			   assert_arg_to_tcflags -pg
+			   assert_arg_to_cflags -pg
 			   case $use in
 			       s390*) ;; # relocation truncation bug in gcc
 			       *) TLIBS="$TLIBS -pg";;
@@ -365,7 +361,7 @@ AC_ARG_ENABLE([gprof],[  --enable-gprof
 	       fi])
 
 if test "$enable_debug" = "yes" ; then
-    assert_arg_to_tcflags -g
+    assert_arg_to_cflags -g
     # for subconfigurations
     CFLAGS="$CFLAGS -g"
 else
@@ -376,41 +372,41 @@ fi
 # gcc on ppc cannot compile our new_init.c with full opts --CM
 TONIFLAGS=""
 case $use in 
-    powerpc*macosx) assert_arg_to_tcflags -mlongcall;;
+    powerpc*macosx) assert_arg_to_cflags -mlongcall;;
     *linux)
 	case $use in
 	    alpha*)
-		assert_arg_to_tcflags -mieee
+		assert_arg_to_cflags -mieee
 		if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
 		;;
 	    aarch64*)
 		TLIBS="$TLIBS -lgcc_s";;
 	    hppa*)
-		assert_arg_to_tcflags -mlong-calls
+		assert_arg_to_cflags -mlong-calls
 		TLIBS="$TLIBS -lgcc_s" # workaround hppa __moddi3 local func symbols with default linker flags
 		if test "$enable_debug" != "yes" ; then TO3FLAGS="-O2" ; TFPFLAG=""; fi #FIXME needed asof gcc 4.8.1
 		;;
 	    mips*)
 		case $canonical in
 		    mips64*linux*)
-			assert_arg_to_tldflags -Wl,-z,now;;
+			assert_arg_to_ldflags -Wl,-z,now;;
 		esac
 		;;
 	    ia64*)
 		if test "$enable_debug" != "yes" ; then TO3FLAGS="-O" ; fi #FIXME needed asof gcc 4.8.1
 		;;
 	    arm*)
-		assert_arg_to_tcflags -mlong-calls
-		assert_arg_to_tcflags -fdollars-in-identifiers
-		assert_arg_to_tcflags -g #?
+		assert_arg_to_cflags -mlong-calls
+		assert_arg_to_cflags -fdollars-in-identifiers
+		assert_arg_to_cflags -g #?
 		;;
 	    powerpc*) 
-		assert_arg_to_tcflags -mlongcall
+		assert_arg_to_cflags -mlongcall
 		;;
 	esac;;
 esac
 if test "$enable_pic" = "yes" ; then
-    assert_arg_to_tcflags -fPIC
+    assert_arg_to_cflags -fPIC
 fi
 
 
@@ -715,7 +711,7 @@ if test "$enable_dlopen" = "yes" ; then
     AC_CHECK_LIB([dl],[dlopen],,AC_MSG_ERROR([Cannot find dlopen]))
     
     TLIBS="$TLIBS -ldl -rdynamic"
-    assert_arg_to_tcflags -fPIC
+    assert_arg_to_cflags -fPIC
     AC_DEFINE(USE_DLOPEN,1,[link compiled objects via libdl])
 
 fi
@@ -834,7 +830,7 @@ if test "$enable_xdr" != "no" ; then
 	AC_DEFINE(HAVE_XDR,1,[have xdr extensions])
 	if test "$XDR_LIB" != " "; then
 	    TLIBS="$TLIBS -l$XDR_LIB"
-	    add_arg_to_tcflags -I/usr/include/$XDR_LIB
+	    add_arg_to_cflags -I/usr/include/$XDR_LIB
 	fi
     fi
 fi
@@ -1345,7 +1341,7 @@ if test "$use" != "386-gnu" ; then #hurd
     AC_MSG_CHECKING([finding default linker script])
     touch unixport/gcl.script
     echo "int main() {return 0;}" >foo.c
-    $CC $TLDFLAGS -Wl,--verbose foo.c -o foo 2>&1 | \
+    $CC $LDFLAGS -Wl,--verbose foo.c -o foo 2>&1 | \
 	$AWK '/\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=/ {i=1-i;next} {if (i) print}' >gcl.script
     rm -rf foo.c foo
     
@@ -1364,7 +1360,7 @@ if test "$use" != "386-gnu" ; then #hurd
             cat gcl.script.def | $AWK '/SIZEOF_HEADERS/ {gsub("0x[[0-9]]*","0x" j,$0);} {print}' j=$j >gcl.script
 	    #        diff -u gcl.script.def gcl.script
             echo "int main() {return 0;}" >foo.c
-            if ( $CC $TLDFLAGS -Wl,-T gcl.script foo.c -o foo && ./foo ) >/dev/null 2>&1 ; then
+            if ( $CC $LDFLAGS -Wl,-T gcl.script foo.c -o foo && ./foo ) >/dev/null 2>&1 ; then
 		if test $n -lt $min ; then min=$n; fi; 
 		if test $n -gt $max; then max=$n; fi; 
 	    elif test $max -gt 0 ; then
@@ -1409,7 +1405,7 @@ if test "$use" != "386-gnu" ; then #hurd
             cat gcl.script.def | $AWK '/SIZEOF_HEADERS/ {gsub("0x[[0-9]]*","0x" j,$0);} {print}' j=$j >gcl.script
 	    AC_MSG_RESULT([done])
 	    rm -f gcl.script.def
-	    LDFLAGS="$LDFLAGS -Wl,-T gcl.script "
+	    assert_arg_to_ldflags -Wl,-T,gcl.script
 	    cp gcl.script unixport
 	else
 	    AC_MSG_RESULT([none found or not needed])
@@ -2116,16 +2112,16 @@ AC_CHECK_HEADERS(alloca.h)
 AC_FUNC_ALLOCA
 
 
-LDFLAGS="`echo $LDFLAGS | sed 's,gcl.script,../unixport/gcl.script,g'` $TLDFLAGS"
+LDFLAGS="`echo $LDFLAGS | sed 's,gcl.script,../unixport/gcl.script,g'`"
 AC_SUBST(LDFLAGS)
 LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $LIBS $TLIBS"
 AC_SUBST(LIBS)
-FINAL_CFLAGS="$CFLAGS $CPPFLAGS $X_CFLAGS $TCFLAGS"
+FINAL_CFLAGS="$CFLAGS $CPPFLAGS $X_CFLAGS"
 AC_SUBST(FINAL_CFLAGS)
 # Work around bug with gcc on ppc -- CM
-NIFLAGS="$CFLAGS $CPPFLAGS $TCFLAGS $TONIFLAGS -I\$(GCLDIR)/o"
+NIFLAGS="$CFLAGS $CPPFLAGS $TONIFLAGS -I\$(GCLDIR)/o"
 AC_SUBST(NIFLAGS)
-CFLAGS="$CFLAGS $CPPFLAGS $TCFLAGS $TO3FLAGS -I\$(GCLDIR)/o"
+CFLAGS="$CFLAGS $CPPFLAGS $TO3FLAGS -I\$(GCLDIR)/o"
 AC_SUBST(CFLAGS)
 O3FLAGS=$TO3FLAGS
 AC_SUBST(O3FLAGS)