|
|
385abae |
Description: <short summary of the patch>
|
|
|
385abae |
TODO: Put a short summary on the line above and replace this paragraph
|
|
|
385abae |
with a longer explanation of this change. Complete the meta-information
|
|
|
385abae |
with other relevant fields (see below for details). To make it easier, the
|
|
|
385abae |
information below has been extracted from the changelog. Adjust it or drop
|
|
|
385abae |
it.
|
|
|
385abae |
.
|
|
|
385abae |
gcl (2.6.12-42) unstable; urgency=medium
|
|
|
385abae |
.
|
|
|
385abae |
* pathnames1.6
|
|
|
385abae |
* Bug fix: "FTBFS with bindnow and PIE enabled", thanks to Balint Reczey
|
|
|
385abae |
(Closes: #837481).
|
|
|
385abae |
* Bug fix: "FTBFS with compilers that default to -fPIE (patch
|
|
|
385abae |
attached)", thanks to Adam Conrad (Closes: #822820).
|
|
|
385abae |
Author: Camm Maguire <camm@debian.org>
|
|
|
385abae |
Bug-Debian: https://bugs.debian.org/822820
|
|
|
385abae |
Bug-Debian: https://bugs.debian.org/837481
|
|
|
385abae |
|
|
|
385abae |
---
|
|
|
385abae |
The information above should follow the Patch Tagging Guidelines, please
|
|
|
385abae |
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
|
385abae |
are templates for supplementary fields that you might want to add:
|
|
|
385abae |
|
|
|
385abae |
Origin: <vendor|upstream|other>, <url of original patch>
|
|
|
385abae |
Bug: <url in upstream bugtracker>
|
|
|
385abae |
Bug-Debian: https://bugs.debian.org/<bugnumber>
|
|
|
385abae |
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
|
385abae |
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
|
385abae |
Reviewed-By: <name and email of someone who approved the patch>
|
|
|
385abae |
Last-Update: 2016-10-27
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/configure
|
|
|
385abae |
+++ gcl-2.6.12/configure
|
|
|
385abae |
@@ -3853,9 +3853,8 @@ if echo $GCL_CC |grep gcc |grep -q win;
|
|
|
385abae |
fi
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
-add_arg_to_tcflags() {
|
|
|
385abae |
+add_arg_to_cflags() {
|
|
|
385abae |
|
|
|
385abae |
- local i=1
|
|
|
385abae |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAG $1" >&5
|
|
|
385abae |
$as_echo_n "checking for CFLAG $1... " >&6; }
|
|
|
385abae |
CFLAGS_ORI=$CFLAGS
|
|
|
385abae |
@@ -3877,8 +3876,8 @@ main ()
|
|
|
385abae |
}
|
|
|
385abae |
_ACEOF
|
|
|
385abae |
if ac_fn_c_try_run "$LINENO"; then :
|
|
|
385abae |
- TCFLAGS="$TCFLAGS $1";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
385abae |
-$as_echo "yes" >&6; };i=0
|
|
|
385abae |
+ CFLAGS="$CFLAGS_ORI $1";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
385abae |
+$as_echo "yes" >&6; };return 0
|
|
|
385abae |
else
|
|
|
385abae |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
385abae |
$as_echo "no" >&6; }
|
|
|
385abae |
@@ -3888,27 +3887,26 @@ rm -f core *.core core.conftest.* gmon.o
|
|
|
385abae |
fi
|
|
|
385abae |
|
|
|
385abae |
CFLAGS=$CFLAGS_ORI
|
|
|
385abae |
- return $i
|
|
|
385abae |
+ return 1
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-assert_arg_to_tcflags() {
|
|
|
385abae |
- if ! add_arg_to_tcflags $1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot add $1 to CFLAGS" >&5
|
|
|
385abae |
+assert_arg_to_cflags() {
|
|
|
385abae |
+ if ! add_arg_to_cflags $1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot add $1 to CFLAGS" >&5
|
|
|
385abae |
$as_echo "cannot add $1 to CFLAGS" >&6; }; exit 1 ; fi
|
|
|
385abae |
return 0
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-add_args_to_tcflags() {
|
|
|
385abae |
+add_args_to_cflags() {
|
|
|
385abae |
|
|
|
385abae |
while test "$#" -ge 1 ; do
|
|
|
385abae |
- add_arg_to_tcflags $1
|
|
|
385abae |
+ add_arg_to_cflags $1
|
|
|
385abae |
shift
|
|
|
385abae |
done
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-add_arg_to_tldflags() {
|
|
|
385abae |
+add_arg_to_ldflags() {
|
|
|
385abae |
|
|
|
385abae |
- local i=1
|
|
|
385abae |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDFLAG $1" >&5
|
|
|
385abae |
$as_echo_n "checking for LDFLAG $1... " >&6; }
|
|
|
385abae |
LDFLAGS_ORI=$LDFLAGS
|
|
|
385abae |
@@ -3929,8 +3927,8 @@ main ()
|
|
|
385abae |
}
|
|
|
385abae |
_ACEOF
|
|
|
385abae |
if ac_fn_c_try_run "$LINENO"; then :
|
|
|
385abae |
- TLDFLAGS="$TLDFLAGS $1";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
385abae |
-$as_echo "yes" >&6; };i=0
|
|
|
385abae |
+ LDFLAGS="$LDFLAGS_ORI $1";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
385abae |
+$as_echo "yes" >&6; };return 0
|
|
|
385abae |
else
|
|
|
385abae |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
385abae |
$as_echo "no" >&6; }
|
|
|
385abae |
@@ -3940,20 +3938,20 @@ rm -f core *.core core.conftest.* gmon.o
|
|
|
385abae |
fi
|
|
|
385abae |
|
|
|
385abae |
LDFLAGS=$LDFLAGS_ORI
|
|
|
385abae |
- return $i
|
|
|
385abae |
+ return 1
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-assert_arg_to_tldflags() {
|
|
|
385abae |
- if ! add_arg_to_tldflags $1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot add $1 to LDFLAGS" >&5
|
|
|
385abae |
+assert_arg_to_ldflags() {
|
|
|
385abae |
+ if ! add_arg_to_ldflags $1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot add $1 to LDFLAGS" >&5
|
|
|
385abae |
$as_echo "cannot add $1 to LDFLAGS" >&6; }; exit 1 ; fi
|
|
|
385abae |
return 0
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-add_args_to_tldflags() {
|
|
|
385abae |
+add_args_to_ldflags() {
|
|
|
385abae |
|
|
|
385abae |
while test "$#" -ge 1 ; do
|
|
|
385abae |
- add_arg_to_tldflags $1
|
|
|
385abae |
+ add_arg_to_ldflags $1
|
|
|
385abae |
shift
|
|
|
385abae |
done
|
|
|
385abae |
}
|
|
|
385abae |
@@ -3975,16 +3973,14 @@ $as_echo "removing $1 from LDFLAGS" >&6;
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-TCFLAGS=""
|
|
|
385abae |
-add_args_to_tcflags -fsigned-char -pipe \
|
|
|
385abae |
+add_args_to_cflags -fsigned-char -pipe \
|
|
|
385abae |
-fno-builtin-malloc -fno-builtin-free \
|
|
|
385abae |
-fno-PIE -fno-pie -fno-PIC -fno-pic \
|
|
|
385abae |
-Wall \
|
|
|
385abae |
-Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
|
|
|
385abae |
-Wno-unused-but-set-variable -Wno-misleading-indentation
|
|
|
385abae |
|
|
|
385abae |
-TLDFLAGS=""
|
|
|
385abae |
-add_args_to_tldflags -Wl,-no_pie -no-pie -Wl,-z,lazy
|
|
|
385abae |
+add_args_to_ldflags -Wl,-no_pie -no-pie -Wl,-z,lazy
|
|
|
385abae |
|
|
|
385abae |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
|
|
|
385abae |
$as_echo_n "checking for clang... " >&6; }
|
|
|
385abae |
@@ -4032,29 +4028,29 @@ fi
|
|
|
385abae |
|
|
|
385abae |
case $use in
|
|
|
385abae |
*mingw*)
|
|
|
385abae |
- assert_arg_to_tcflags -fno-zero-initialized-in-bss
|
|
|
385abae |
- assert_arg_to_tcflags -mms-bitfields;;
|
|
|
385abae |
+ assert_arg_to_cflags -fno-zero-initialized-in-bss
|
|
|
385abae |
+ assert_arg_to_cflags -mms-bitfields;;
|
|
|
385abae |
*gnuwin*)
|
|
|
385abae |
- assert_arg_to_tcflags -fno-zero-initialized-in-bss
|
|
|
385abae |
- assert_arg_to_tcflags -mms-bitfields
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,--stack,8000000;;
|
|
|
385abae |
+ assert_arg_to_cflags -fno-zero-initialized-in-bss
|
|
|
385abae |
+ assert_arg_to_cflags -mms-bitfields
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,--stack,8000000;;
|
|
|
385abae |
386-macosx)
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-no_pie
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-no_pie
|
|
|
385abae |
if test "$build_cpu" = "x86_64" ; then
|
|
|
385abae |
- assert_arg_to_tcflags -m64
|
|
|
385abae |
- assert_arg_to_tldflags -m64
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-headerpad,72
|
|
|
385abae |
+ assert_arg_to_cflags -m64
|
|
|
385abae |
+ assert_arg_to_ldflags -m64
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-headerpad,72
|
|
|
385abae |
else
|
|
|
385abae |
- assert_arg_to_tcflags -m32
|
|
|
385abae |
- assert_arg_to_tldflags -m32
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-headerpad,56
|
|
|
385abae |
+ assert_arg_to_cflags -m32
|
|
|
385abae |
+ assert_arg_to_ldflags -m32
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-headerpad,56
|
|
|
385abae |
fi;;
|
|
|
385abae |
- FreeBSD) assert_arg_to_tldflags -Z;;
|
|
|
385abae |
+ FreeBSD) assert_arg_to_ldflags -Z;;
|
|
|
385abae |
esac
|
|
|
385abae |
|
|
|
385abae |
if test "$enable_static" = "yes" ; then
|
|
|
385abae |
- assert_arg_to_tldflags -static
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-zmuldefs
|
|
|
385abae |
+ assert_arg_to_ldflags -static
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-zmuldefs
|
|
|
385abae |
|
|
|
385abae |
$as_echo "#define STATIC_LINKING 1" >>confdefs.h
|
|
|
385abae |
|
|
|
385abae |
@@ -4148,7 +4144,7 @@ cat >>confdefs.h <<_ACEOF
|
|
|
385abae |
#define GCL_GPROF_START $GCL_GPROF_START
|
|
|
385abae |
_ACEOF
|
|
|
385abae |
|
|
|
385abae |
- assert_arg_to_tcflags -pg
|
|
|
385abae |
+ assert_arg_to_cflags -pg
|
|
|
385abae |
case $use in
|
|
|
385abae |
s390*) ;; # relocation truncation bug in gcc
|
|
|
385abae |
*) TLIBS="$TLIBS -pg";;
|
|
|
385abae |
@@ -4164,7 +4160,7 @@ fi
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
if test "$enable_debug" = "yes" ; then
|
|
|
385abae |
- assert_arg_to_tcflags -g
|
|
|
385abae |
+ assert_arg_to_cflags -g
|
|
|
385abae |
# for subconfigurations
|
|
|
385abae |
CFLAGS="$CFLAGS -g"
|
|
|
385abae |
else
|
|
|
385abae |
@@ -4175,41 +4171,41 @@ fi
|
|
|
385abae |
# gcc on ppc cannot compile our new_init.c with full opts --CM
|
|
|
385abae |
TONIFLAGS=""
|
|
|
385abae |
case $use in
|
|
|
385abae |
- powerpc*macosx) assert_arg_to_tcflags -mlongcall;;
|
|
|
385abae |
+ powerpc*macosx) assert_arg_to_cflags -mlongcall;;
|
|
|
385abae |
*linux)
|
|
|
385abae |
case $use in
|
|
|
385abae |
alpha*)
|
|
|
385abae |
- assert_arg_to_tcflags -mieee
|
|
|
385abae |
+ assert_arg_to_cflags -mieee
|
|
|
385abae |
if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
|
|
|
385abae |
;;
|
|
|
385abae |
aarch64*)
|
|
|
385abae |
TLIBS="$TLIBS -lgcc_s";;
|
|
|
385abae |
hppa*)
|
|
|
385abae |
- assert_arg_to_tcflags -mlong-calls
|
|
|
385abae |
+ assert_arg_to_cflags -mlong-calls
|
|
|
385abae |
TLIBS="$TLIBS -lgcc_s" # workaround hppa __moddi3 local func symbols with default linker flags
|
|
|
385abae |
if test "$enable_debug" != "yes" ; then TO3FLAGS="-O2" ; TFPFLAG=""; fi #FIXME needed asof gcc 4.8.1
|
|
|
385abae |
;;
|
|
|
385abae |
mips*)
|
|
|
385abae |
case $canonical in
|
|
|
385abae |
mips64*linux*)
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-z,now;;
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-z,now;;
|
|
|
385abae |
esac
|
|
|
385abae |
;;
|
|
|
385abae |
ia64*)
|
|
|
385abae |
if test "$enable_debug" != "yes" ; then TO3FLAGS="-O" ; fi #FIXME needed asof gcc 4.8.1
|
|
|
385abae |
;;
|
|
|
385abae |
arm*)
|
|
|
385abae |
- assert_arg_to_tcflags -mlong-calls
|
|
|
385abae |
- assert_arg_to_tcflags -fdollars-in-identifiers
|
|
|
385abae |
- assert_arg_to_tcflags -g #?
|
|
|
385abae |
+ assert_arg_to_cflags -mlong-calls
|
|
|
385abae |
+ assert_arg_to_cflags -fdollars-in-identifiers
|
|
|
385abae |
+ assert_arg_to_cflags -g #?
|
|
|
385abae |
;;
|
|
|
385abae |
powerpc*)
|
|
|
385abae |
- assert_arg_to_tcflags -mlongcall
|
|
|
385abae |
+ assert_arg_to_cflags -mlongcall
|
|
|
385abae |
;;
|
|
|
385abae |
esac;;
|
|
|
385abae |
esac
|
|
|
385abae |
if test "$enable_pic" = "yes" ; then
|
|
|
385abae |
- assert_arg_to_tcflags -fPIC
|
|
|
385abae |
+ assert_arg_to_cflags -fPIC
|
|
|
385abae |
fi
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
@@ -5385,7 +5381,7 @@ fi
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
TLIBS="$TLIBS -ldl -rdynamic"
|
|
|
385abae |
- assert_arg_to_tcflags -fPIC
|
|
|
385abae |
+ assert_arg_to_cflags -fPIC
|
|
|
385abae |
|
|
|
385abae |
$as_echo "#define USE_DLOPEN 1" >>confdefs.h
|
|
|
385abae |
|
|
|
385abae |
@@ -5869,7 +5865,7 @@ $as_echo "#define HAVE_XDR 1" >>confdefs
|
|
|
385abae |
|
|
|
385abae |
if test "$XDR_LIB" != " "; then
|
|
|
385abae |
TLIBS="$TLIBS -l$XDR_LIB"
|
|
|
385abae |
- add_arg_to_tcflags -I/usr/include/$XDR_LIB
|
|
|
385abae |
+ add_arg_to_cflags -I/usr/include/$XDR_LIB
|
|
|
385abae |
fi
|
|
|
385abae |
fi
|
|
|
385abae |
fi
|
|
|
385abae |
@@ -6935,7 +6931,7 @@ if test "$use" != "386-gnu" ; then #hurd
|
|
|
385abae |
$as_echo_n "checking finding default linker script... " >&6; }
|
|
|
385abae |
touch unixport/gcl.script
|
|
|
385abae |
echo "int main() {return 0;}" >foo.c
|
|
|
385abae |
- $CC $TLDFLAGS -Wl,--verbose foo.c -o foo 2>&1 | \
|
|
|
385abae |
+ $CC $LDFLAGS -Wl,--verbose foo.c -o foo 2>&1 | \
|
|
|
385abae |
$AWK '/\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=/ {i=1-i;next} {if (i) print}' >gcl.script
|
|
|
385abae |
rm -rf foo.c foo
|
|
|
385abae |
|
|
|
385abae |
@@ -6956,7 +6952,7 @@ $as_echo "$as_me: trying to adjust text
|
|
|
385abae |
cat gcl.script.def | $AWK '/SIZEOF_HEADERS/ {gsub("0x[0-9]*","0x" j,$0);} {print}' j=$j >gcl.script
|
|
|
385abae |
# diff -u gcl.script.def gcl.script
|
|
|
385abae |
echo "int main() {return 0;}" >foo.c
|
|
|
385abae |
- if ( $CC $TLDFLAGS -Wl,-T gcl.script foo.c -o foo && ./foo ) >/dev/null 2>&1 ; then
|
|
|
385abae |
+ if ( $CC $LDFLAGS -Wl,-T gcl.script foo.c -o foo && ./foo ) >/dev/null 2>&1 ; then
|
|
|
385abae |
if test $n -lt $min ; then min=$n; fi;
|
|
|
385abae |
if test $n -gt $max; then max=$n; fi;
|
|
|
385abae |
elif test $max -gt 0 ; then
|
|
|
385abae |
@@ -7020,7 +7016,7 @@ $as_echo_n "checking our linker script..
|
|
|
385abae |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
|
|
|
385abae |
$as_echo "done" >&6; }
|
|
|
385abae |
rm -f gcl.script.def
|
|
|
385abae |
- LDFLAGS="$LDFLAGS -Wl,-T gcl.script "
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-T,gcl.script
|
|
|
385abae |
cp gcl.script unixport
|
|
|
385abae |
else
|
|
|
385abae |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none found or not needed" >&5
|
|
|
385abae |
@@ -9065,16 +9061,16 @@ fi
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
-LDFLAGS="`echo $LDFLAGS | sed 's,gcl.script,../unixport/gcl.script,g'` $TLDFLAGS"
|
|
|
385abae |
+LDFLAGS="`echo $LDFLAGS | sed 's,gcl.script,../unixport/gcl.script,g'`"
|
|
|
385abae |
|
|
|
385abae |
LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $LIBS $TLIBS"
|
|
|
385abae |
|
|
|
385abae |
-FINAL_CFLAGS="$CFLAGS $CPPFLAGS $X_CFLAGS $TCFLAGS"
|
|
|
385abae |
+FINAL_CFLAGS="$CFLAGS $CPPFLAGS $X_CFLAGS"
|
|
|
385abae |
|
|
|
385abae |
# Work around bug with gcc on ppc -- CM
|
|
|
385abae |
-NIFLAGS="$CFLAGS $CPPFLAGS $TCFLAGS $TONIFLAGS -I\$(GCLDIR)/o"
|
|
|
385abae |
+NIFLAGS="$CFLAGS $CPPFLAGS $TONIFLAGS -I\$(GCLDIR)/o"
|
|
|
385abae |
|
|
|
385abae |
-CFLAGS="$CFLAGS $CPPFLAGS $TCFLAGS $TO3FLAGS -I\$(GCLDIR)/o"
|
|
|
385abae |
+CFLAGS="$CFLAGS $CPPFLAGS $TO3FLAGS -I\$(GCLDIR)/o"
|
|
|
385abae |
|
|
|
385abae |
O3FLAGS=$TO3FLAGS
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/configure.in
|
|
|
385abae |
+++ gcl-2.6.12/configure.in
|
|
|
385abae |
@@ -185,60 +185,58 @@ if echo $GCL_CC |grep gcc |grep -q win;
|
|
|
385abae |
fi
|
|
|
385abae |
AC_SUBST(GCL_CC)
|
|
|
385abae |
|
|
|
385abae |
-add_arg_to_tcflags() {
|
|
|
385abae |
+add_arg_to_cflags() {
|
|
|
385abae |
|
|
|
385abae |
- local i=1
|
|
|
385abae |
AC_MSG_CHECKING([for CFLAG $1])
|
|
|
385abae |
CFLAGS_ORI=$CFLAGS
|
|
|
385abae |
CFLAGS="$CFLAGS -Werror $1 `echo $1|sed 's,-Wno-,-W,1'`"
|
|
|
385abae |
AC_RUN_IFELSE(
|
|
|
385abae |
[AC_LANG_PROGRAM([[]],[[]])],
|
|
|
385abae |
- [TCFLAGS="$TCFLAGS $1";AC_MSG_RESULT([yes]);i=0],
|
|
|
385abae |
+ [CFLAGS="$CFLAGS_ORI $1";AC_MSG_RESULT([yes]);return 0],
|
|
|
385abae |
[AC_MSG_RESULT([no])],
|
|
|
385abae |
[AC_MSG_RESULT([no])])
|
|
|
385abae |
CFLAGS=$CFLAGS_ORI
|
|
|
385abae |
- return $i
|
|
|
385abae |
+ return 1
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-assert_arg_to_tcflags() {
|
|
|
385abae |
- if ! add_arg_to_tcflags $1 ; then AC_MSG_RESULT([cannot add $1 to CFLAGS]); exit 1 ; fi
|
|
|
385abae |
+assert_arg_to_cflags() {
|
|
|
385abae |
+ if ! add_arg_to_cflags $1 ; then AC_MSG_RESULT([cannot add $1 to CFLAGS]); exit 1 ; fi
|
|
|
385abae |
return 0
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-add_args_to_tcflags() {
|
|
|
385abae |
+add_args_to_cflags() {
|
|
|
385abae |
|
|
|
385abae |
while test "$#" -ge 1 ; do
|
|
|
385abae |
- add_arg_to_tcflags $1
|
|
|
385abae |
+ add_arg_to_cflags $1
|
|
|
385abae |
shift
|
|
|
385abae |
done
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-add_arg_to_tldflags() {
|
|
|
385abae |
+add_arg_to_ldflags() {
|
|
|
385abae |
|
|
|
385abae |
- local i=1
|
|
|
385abae |
AC_MSG_CHECKING([for LDFLAG $1])
|
|
|
385abae |
LDFLAGS_ORI=$LDFLAGS
|
|
|
385abae |
LDFLAGS="$LDFLAGS -Werror $1"
|
|
|
385abae |
AC_RUN_IFELSE(
|
|
|
385abae |
[AC_LANG_PROGRAM([[]],[[]])],
|
|
|
385abae |
- [TLDFLAGS="$TLDFLAGS $1";AC_MSG_RESULT([yes]);i=0],
|
|
|
385abae |
+ [LDFLAGS="$LDFLAGS_ORI $1";AC_MSG_RESULT([yes]);return 0],
|
|
|
385abae |
[AC_MSG_RESULT([no])],
|
|
|
385abae |
[AC_MSG_RESULT([no])])
|
|
|
385abae |
LDFLAGS=$LDFLAGS_ORI
|
|
|
385abae |
- return $i
|
|
|
385abae |
+ return 1
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-assert_arg_to_tldflags() {
|
|
|
385abae |
- if ! add_arg_to_tldflags $1 ; then AC_MSG_RESULT([cannot add $1 to LDFLAGS]); exit 1 ; fi
|
|
|
385abae |
+assert_arg_to_ldflags() {
|
|
|
385abae |
+ if ! add_arg_to_ldflags $1 ; then AC_MSG_RESULT([cannot add $1 to LDFLAGS]); exit 1 ; fi
|
|
|
385abae |
return 0
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-add_args_to_tldflags() {
|
|
|
385abae |
+add_args_to_ldflags() {
|
|
|
385abae |
|
|
|
385abae |
while test "$#" -ge 1 ; do
|
|
|
385abae |
- add_arg_to_tldflags $1
|
|
|
385abae |
+ add_arg_to_ldflags $1
|
|
|
385abae |
shift
|
|
|
385abae |
done
|
|
|
385abae |
}
|
|
|
385abae |
@@ -259,16 +257,14 @@ remove_arg_from_ldflags() {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-TCFLAGS=""
|
|
|
385abae |
-add_args_to_tcflags -fsigned-char -pipe \
|
|
|
385abae |
+add_args_to_cflags -fsigned-char -pipe \
|
|
|
385abae |
-fno-builtin-malloc -fno-builtin-free \
|
|
|
385abae |
-fno-PIE -fno-pie -fno-PIC -fno-pic \
|
|
|
385abae |
-Wall \
|
|
|
385abae |
-Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
|
|
|
385abae |
-Wno-unused-but-set-variable -Wno-misleading-indentation
|
|
|
385abae |
|
|
|
385abae |
-TLDFLAGS=""
|
|
|
385abae |
-add_args_to_tldflags -Wl,-no_pie -no-pie -Wl,-z,lazy
|
|
|
385abae |
+add_args_to_ldflags -Wl,-no_pie -no-pie -Wl,-z,lazy
|
|
|
385abae |
|
|
|
385abae |
AC_MSG_CHECKING([for clang])
|
|
|
385abae |
AC_RUN_IFELSE(
|
|
|
385abae |
@@ -290,29 +286,29 @@ AC_RUN_IFELSE(
|
|
|
385abae |
|
|
|
385abae |
case $use in
|
|
|
385abae |
*mingw*)
|
|
|
385abae |
- assert_arg_to_tcflags -fno-zero-initialized-in-bss
|
|
|
385abae |
- assert_arg_to_tcflags -mms-bitfields;;
|
|
|
385abae |
+ assert_arg_to_cflags -fno-zero-initialized-in-bss
|
|
|
385abae |
+ assert_arg_to_cflags -mms-bitfields;;
|
|
|
385abae |
*gnuwin*)
|
|
|
385abae |
- assert_arg_to_tcflags -fno-zero-initialized-in-bss
|
|
|
385abae |
- assert_arg_to_tcflags -mms-bitfields
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,--stack,8000000;;
|
|
|
385abae |
+ assert_arg_to_cflags -fno-zero-initialized-in-bss
|
|
|
385abae |
+ assert_arg_to_cflags -mms-bitfields
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,--stack,8000000;;
|
|
|
385abae |
386-macosx)
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-no_pie
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-no_pie
|
|
|
385abae |
if test "$build_cpu" = "x86_64" ; then
|
|
|
385abae |
- assert_arg_to_tcflags -m64
|
|
|
385abae |
- assert_arg_to_tldflags -m64
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-headerpad,72
|
|
|
385abae |
+ assert_arg_to_cflags -m64
|
|
|
385abae |
+ assert_arg_to_ldflags -m64
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-headerpad,72
|
|
|
385abae |
else
|
|
|
385abae |
- assert_arg_to_tcflags -m32
|
|
|
385abae |
- assert_arg_to_tldflags -m32
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-headerpad,56
|
|
|
385abae |
+ assert_arg_to_cflags -m32
|
|
|
385abae |
+ assert_arg_to_ldflags -m32
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-headerpad,56
|
|
|
385abae |
fi;;
|
|
|
385abae |
- FreeBSD) assert_arg_to_tldflags -Z;;
|
|
|
385abae |
+ FreeBSD) assert_arg_to_ldflags -Z;;
|
|
|
385abae |
esac
|
|
|
385abae |
|
|
|
385abae |
if test "$enable_static" = "yes" ; then
|
|
|
385abae |
- assert_arg_to_tldflags -static
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-zmuldefs
|
|
|
385abae |
+ assert_arg_to_ldflags -static
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-zmuldefs
|
|
|
385abae |
AC_DEFINE(STATIC_LINKING,1,[staticly linked images])
|
|
|
385abae |
fi
|
|
|
385abae |
|
|
|
385abae |
@@ -353,7 +349,7 @@ AC_ARG_ENABLE([gprof],[ --enable-gprof
|
|
|
385abae |
if test "$GCL_GPROF_START" != "" ; then
|
|
|
385abae |
AC_MSG_RESULT($GCL_GPROF_START)
|
|
|
385abae |
AC_DEFINE_UNQUOTED(GCL_GPROF_START,$GCL_GPROF_START,[starting address for gprof])
|
|
|
385abae |
- assert_arg_to_tcflags -pg
|
|
|
385abae |
+ assert_arg_to_cflags -pg
|
|
|
385abae |
case $use in
|
|
|
385abae |
s390*) ;; # relocation truncation bug in gcc
|
|
|
385abae |
*) TLIBS="$TLIBS -pg";;
|
|
|
385abae |
@@ -365,7 +361,7 @@ AC_ARG_ENABLE([gprof],[ --enable-gprof
|
|
|
385abae |
fi])
|
|
|
385abae |
|
|
|
385abae |
if test "$enable_debug" = "yes" ; then
|
|
|
385abae |
- assert_arg_to_tcflags -g
|
|
|
385abae |
+ assert_arg_to_cflags -g
|
|
|
385abae |
# for subconfigurations
|
|
|
385abae |
CFLAGS="$CFLAGS -g"
|
|
|
385abae |
else
|
|
|
385abae |
@@ -376,41 +372,41 @@ fi
|
|
|
385abae |
# gcc on ppc cannot compile our new_init.c with full opts --CM
|
|
|
385abae |
TONIFLAGS=""
|
|
|
385abae |
case $use in
|
|
|
385abae |
- powerpc*macosx) assert_arg_to_tcflags -mlongcall;;
|
|
|
385abae |
+ powerpc*macosx) assert_arg_to_cflags -mlongcall;;
|
|
|
385abae |
*linux)
|
|
|
385abae |
case $use in
|
|
|
385abae |
alpha*)
|
|
|
385abae |
- assert_arg_to_tcflags -mieee
|
|
|
385abae |
+ assert_arg_to_cflags -mieee
|
|
|
385abae |
if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
|
|
|
385abae |
;;
|
|
|
385abae |
aarch64*)
|
|
|
385abae |
TLIBS="$TLIBS -lgcc_s";;
|
|
|
385abae |
hppa*)
|
|
|
385abae |
- assert_arg_to_tcflags -mlong-calls
|
|
|
385abae |
+ assert_arg_to_cflags -mlong-calls
|
|
|
385abae |
TLIBS="$TLIBS -lgcc_s" # workaround hppa __moddi3 local func symbols with default linker flags
|
|
|
385abae |
if test "$enable_debug" != "yes" ; then TO3FLAGS="-O2" ; TFPFLAG=""; fi #FIXME needed asof gcc 4.8.1
|
|
|
385abae |
;;
|
|
|
385abae |
mips*)
|
|
|
385abae |
case $canonical in
|
|
|
385abae |
mips64*linux*)
|
|
|
385abae |
- assert_arg_to_tldflags -Wl,-z,now;;
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-z,now;;
|
|
|
385abae |
esac
|
|
|
385abae |
;;
|
|
|
385abae |
ia64*)
|
|
|
385abae |
if test "$enable_debug" != "yes" ; then TO3FLAGS="-O" ; fi #FIXME needed asof gcc 4.8.1
|
|
|
385abae |
;;
|
|
|
385abae |
arm*)
|
|
|
385abae |
- assert_arg_to_tcflags -mlong-calls
|
|
|
385abae |
- assert_arg_to_tcflags -fdollars-in-identifiers
|
|
|
385abae |
- assert_arg_to_tcflags -g #?
|
|
|
385abae |
+ assert_arg_to_cflags -mlong-calls
|
|
|
385abae |
+ assert_arg_to_cflags -fdollars-in-identifiers
|
|
|
385abae |
+ assert_arg_to_cflags -g #?
|
|
|
385abae |
;;
|
|
|
385abae |
powerpc*)
|
|
|
385abae |
- assert_arg_to_tcflags -mlongcall
|
|
|
385abae |
+ assert_arg_to_cflags -mlongcall
|
|
|
385abae |
;;
|
|
|
385abae |
esac;;
|
|
|
385abae |
esac
|
|
|
385abae |
if test "$enable_pic" = "yes" ; then
|
|
|
385abae |
- assert_arg_to_tcflags -fPIC
|
|
|
385abae |
+ assert_arg_to_cflags -fPIC
|
|
|
385abae |
fi
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
@@ -715,7 +711,7 @@ if test "$enable_dlopen" = "yes" ; then
|
|
|
385abae |
AC_CHECK_LIB([dl],[dlopen],,AC_MSG_ERROR([Cannot find dlopen]))
|
|
|
385abae |
|
|
|
385abae |
TLIBS="$TLIBS -ldl -rdynamic"
|
|
|
385abae |
- assert_arg_to_tcflags -fPIC
|
|
|
385abae |
+ assert_arg_to_cflags -fPIC
|
|
|
385abae |
AC_DEFINE(USE_DLOPEN,1,[link compiled objects via libdl])
|
|
|
385abae |
|
|
|
385abae |
fi
|
|
|
385abae |
@@ -834,7 +830,7 @@ if test "$enable_xdr" != "no" ; then
|
|
|
385abae |
AC_DEFINE(HAVE_XDR,1,[have xdr extensions])
|
|
|
385abae |
if test "$XDR_LIB" != " "; then
|
|
|
385abae |
TLIBS="$TLIBS -l$XDR_LIB"
|
|
|
385abae |
- add_arg_to_tcflags -I/usr/include/$XDR_LIB
|
|
|
385abae |
+ add_arg_to_cflags -I/usr/include/$XDR_LIB
|
|
|
385abae |
fi
|
|
|
385abae |
fi
|
|
|
385abae |
fi
|
|
|
385abae |
@@ -1345,7 +1341,7 @@ if test "$use" != "386-gnu" ; then #hurd
|
|
|
385abae |
AC_MSG_CHECKING([finding default linker script])
|
|
|
385abae |
touch unixport/gcl.script
|
|
|
385abae |
echo "int main() {return 0;}" >foo.c
|
|
|
385abae |
- $CC $TLDFLAGS -Wl,--verbose foo.c -o foo 2>&1 | \
|
|
|
385abae |
+ $CC $LDFLAGS -Wl,--verbose foo.c -o foo 2>&1 | \
|
|
|
385abae |
$AWK '/\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=/ {i=1-i;next} {if (i) print}' >gcl.script
|
|
|
385abae |
rm -rf foo.c foo
|
|
|
385abae |
|
|
|
385abae |
@@ -1364,7 +1360,7 @@ if test "$use" != "386-gnu" ; then #hurd
|
|
|
385abae |
cat gcl.script.def | $AWK '/SIZEOF_HEADERS/ {gsub("0x[[0-9]]*","0x" j,$0);} {print}' j=$j >gcl.script
|
|
|
385abae |
# diff -u gcl.script.def gcl.script
|
|
|
385abae |
echo "int main() {return 0;}" >foo.c
|
|
|
385abae |
- if ( $CC $TLDFLAGS -Wl,-T gcl.script foo.c -o foo && ./foo ) >/dev/null 2>&1 ; then
|
|
|
385abae |
+ if ( $CC $LDFLAGS -Wl,-T gcl.script foo.c -o foo && ./foo ) >/dev/null 2>&1 ; then
|
|
|
385abae |
if test $n -lt $min ; then min=$n; fi;
|
|
|
385abae |
if test $n -gt $max; then max=$n; fi;
|
|
|
385abae |
elif test $max -gt 0 ; then
|
|
|
385abae |
@@ -1409,7 +1405,7 @@ if test "$use" != "386-gnu" ; then #hurd
|
|
|
385abae |
cat gcl.script.def | $AWK '/SIZEOF_HEADERS/ {gsub("0x[[0-9]]*","0x" j,$0);} {print}' j=$j >gcl.script
|
|
|
385abae |
AC_MSG_RESULT([done])
|
|
|
385abae |
rm -f gcl.script.def
|
|
|
385abae |
- LDFLAGS="$LDFLAGS -Wl,-T gcl.script "
|
|
|
385abae |
+ assert_arg_to_ldflags -Wl,-T,gcl.script
|
|
|
385abae |
cp gcl.script unixport
|
|
|
385abae |
else
|
|
|
385abae |
AC_MSG_RESULT([none found or not needed])
|
|
|
385abae |
@@ -2116,16 +2112,16 @@ AC_CHECK_HEADERS(alloca.h)
|
|
|
385abae |
AC_FUNC_ALLOCA
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
-LDFLAGS="`echo $LDFLAGS | sed 's,gcl.script,../unixport/gcl.script,g'` $TLDFLAGS"
|
|
|
385abae |
+LDFLAGS="`echo $LDFLAGS | sed 's,gcl.script,../unixport/gcl.script,g'`"
|
|
|
385abae |
AC_SUBST(LDFLAGS)
|
|
|
385abae |
LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $LIBS $TLIBS"
|
|
|
385abae |
AC_SUBST(LIBS)
|
|
|
385abae |
-FINAL_CFLAGS="$CFLAGS $CPPFLAGS $X_CFLAGS $TCFLAGS"
|
|
|
385abae |
+FINAL_CFLAGS="$CFLAGS $CPPFLAGS $X_CFLAGS"
|
|
|
385abae |
AC_SUBST(FINAL_CFLAGS)
|
|
|
385abae |
# Work around bug with gcc on ppc -- CM
|
|
|
385abae |
-NIFLAGS="$CFLAGS $CPPFLAGS $TCFLAGS $TONIFLAGS -I\$(GCLDIR)/o"
|
|
|
385abae |
+NIFLAGS="$CFLAGS $CPPFLAGS $TONIFLAGS -I\$(GCLDIR)/o"
|
|
|
385abae |
AC_SUBST(NIFLAGS)
|
|
|
385abae |
-CFLAGS="$CFLAGS $CPPFLAGS $TCFLAGS $TO3FLAGS -I\$(GCLDIR)/o"
|
|
|
385abae |
+CFLAGS="$CFLAGS $CPPFLAGS $TO3FLAGS -I\$(GCLDIR)/o"
|
|
|
385abae |
AC_SUBST(CFLAGS)
|
|
|
385abae |
O3FLAGS=$TO3FLAGS
|
|
|
385abae |
AC_SUBST(O3FLAGS)
|