2003-04-03 Roland McGrath <roland@redhat.com>

* configure.in: Fix up use of compilation flags to match the build:
	For .s files, $ASFLAGS;
	For .S files, $CPPFLAGS $ASFLAGS;
	For .c files, $CFLAGS $CPPFLAGS;
	when linking, add $LDFLAGS.
	* configure: Regenerated.
This commit is contained in:
Roland McGrath 2003-04-04 03:03:58 +00:00
parent dd59050d0a
commit 3217788f60
2 changed files with 88 additions and 72 deletions

84
configure vendored
View File

@ -1834,7 +1834,7 @@ m68k) base_machine=m68k machine=m68k/m68020 ;;
m88???) base_machine=m88k machine=m88k/$machine ;; m88???) base_machine=m88k machine=m88k/$machine ;;
m88k) base_machine=m88k machine=m88k/m88100 ;; m88k) base_machine=m88k machine=m88k/m88100 ;;
mips64*) base_machine=mips64 mips64*) base_machine=mips64
case "$CC $CPPFLAGS $CFLAGS " in case "$CC $CFLAGS $CPPFLAGS " in
*" -mabi=n32 "*) mips_cc_abi=n32 ;; *" -mabi=n32 "*) mips_cc_abi=n32 ;;
*" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;; *" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;;
*" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;; *" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;;
@ -3931,7 +3931,7 @@ int a;
char b; char b;
void c(void) {} void c(void) {}
EOF EOF
$CC $CFLAGS -c conftest.c $CC $CFLAGS $CPPFLAGS -c conftest.c
$AR cr conftest.a conftest.o $AR cr conftest.a conftest.o
cp conftest.a conftest2.a cp conftest.a conftest2.a
$RANLIB conftest.a $RANLIB conftest.a
@ -4389,7 +4389,7 @@ else
#include "confdefs.h" #include "confdefs.h"
/* Nothing whatsoever. */ /* Nothing whatsoever. */
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -c conftest.S 1>&5' if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -c conftest.S 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4417,7 +4417,7 @@ else
.text .text
EOF EOF
libc_cv_dot_text= libc_cv_dot_text=
if { ac_try='${CC-cc} $CFLAGS -c conftest.s 1>&5' if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4448,7 +4448,7 @@ for ac_globl in .globl .global .EXPORT; do
${ac_globl} foo ${ac_globl} foo
foo: foo:
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -c conftest.s 1>&5' if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4523,7 +4523,7 @@ for ac_try_prefix in '@' '%' '#'; do
foo: foo:
.byte 1 .byte 1
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -c conftest.s 1>&5' if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4564,7 +4564,7 @@ ${libc_cv_dot_text}
_sym: _sym:
.symver _sym,sym@VERS .symver _sym,sym@VERS
EOF EOF
if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5; then
libc_cv_asm_symver_directive=yes libc_cv_asm_symver_directive=yes
else else
libc_cv_asm_symver_directive=no libc_cv_asm_symver_directive=no
@ -4593,10 +4593,11 @@ VERS_2 {
global: sym; global: sym;
} VERS_1; } VERS_1;
EOF EOF
if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5; then
if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o if { ac_try='${CC-cc} $CFLAGS $LDFLAGS -shared
-nostartfiles -nostdlib -o conftest.so conftest.o
-Wl,--version-script,conftest.map -nostartfiles -nostdlib
-Wl,--version-script,conftest.map
1>&5' 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
@ -4649,7 +4650,7 @@ else
.section foo_section .section foo_section
.previous .previous
EOF EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4678,7 +4679,7 @@ else
.pushsection foo_section .pushsection foo_section
.popsection .popsection
EOF EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4710,7 +4711,7 @@ foo:
.hidden bar .hidden bar
bar: bar:
EOF EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -4850,7 +4851,7 @@ if test "${libc_cv_have_sdata_section+set}" = set; then
else else
echo "int i;" > conftest.c echo "int i;" > conftest.c
libc_cv_have_sdata_section=no libc_cv_have_sdata_section=no
if ${CC-cc} -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \ if ${CC-cc} $LDFLAGS -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \
| grep '\.sdata' >/dev/null; then | grep '\.sdata' >/dev/null; then
libc_cv_have_sdata_section=yes libc_cv_have_sdata_section=yes
fi fi
@ -4878,7 +4879,7 @@ int __start (void) { return 0; }
int foo (void) { return 1; } int foo (void) { return 1; }
int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
EOF EOF
if { ac_try='${CC-cc} -o conftest conftest.c if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
-static -nostartfiles -nostdlib 1>&5' -static -nostartfiles -nostdlib 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
@ -4914,7 +4915,8 @@ else
cat > conftest.c <<EOF cat > conftest.c <<EOF
int _start (void) { return 42; } int _start (void) { return 42; }
EOF EOF
if { ac_try='${CC-cc} -shared -o conftest.so conftest.c if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-nostartfiles -nostdlib -nostartfiles -nostdlib
-Wl,--enable-new-dtags,-z,nodelete 1>&5' -Wl,--enable-new-dtags,-z,nodelete 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
@ -4941,7 +4943,8 @@ else
cat > conftest.c <<EOF cat > conftest.c <<EOF
int _start (void) { return 42; } int _start (void) { return 42; }
EOF EOF
if { ac_try='${CC-cc} -shared -o conftest.so conftest.c if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-nostartfiles -nostdlib -nostartfiles -nostdlib
-Wl,--enable-new-dtags,-z,nodlopen 1>&5' -Wl,--enable-new-dtags,-z,nodlopen 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
@ -4968,7 +4971,8 @@ else
cat > conftest.c <<EOF cat > conftest.c <<EOF
int _start (void) { return 42; } int _start (void) { return 42; }
EOF EOF
if { ac_try='${CC-cc} -shared -o conftest.so conftest.c if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-nostartfiles -nostdlib -nostartfiles -nostdlib
-Wl,--enable-new-dtags,-z,initfirst 1>&5' -Wl,--enable-new-dtags,-z,initfirst 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
@ -4995,7 +4999,9 @@ else
cat > conftest.c <<EOF cat > conftest.c <<EOF
int _start (void) { return 42; } int _start (void) { return 42; }
EOF EOF
if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -Wl,-Bgroup -nostdlib 1>&5' if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-Wl,-Bgroup -nostdlib 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5022,7 +5028,8 @@ extern int bar (int);
extern int mumble; extern int mumble;
int foo (void) { return bar (mumble); } int foo (void) { return bar (mumble); }
EOF EOF
if { ac_try='${CC-cc} -shared -o conftest.so conftest.c if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-nostdlib -nostartfiles -nostdlib -nostartfiles
-Wl,-z,combreloc 1>&5' -Wl,-z,combreloc 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
@ -5196,7 +5203,7 @@ if test "${libc_cv_asm_underscores+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5199 "configure" #line 5206 "configure"
#include "confdefs.h" #include "confdefs.h"
void underscore_test(void) { void underscore_test(void) {
return; } return; }
@ -5248,7 +5255,7 @@ foo:
.weak foo .weak foo
.weak bar; bar = foo .weak bar; bar = foo
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -c conftest.s 1>&5' if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5278,7 +5285,7 @@ foo:
${libc_cv_asm_global_directive} baz ${libc_cv_asm_global_directive} baz
baz: baz:
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -c conftest.s 1>&5' if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5324,7 +5331,7 @@ else
cat > conftest.s <<EOF cat > conftest.s <<EOF
nop ; is_old_puffin nop ; is_old_puffin
EOF EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5372,7 +5379,7 @@ foo:
/* comment */ /* comment */
nop nop
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -g -c conftest.S 1>&5' if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5411,7 +5418,7 @@ _start () {}
int __eh_pc; int __eh_pc;
__throw () {} __throw () {}
EOF EOF
if { ac_try='${CC-cc} $CFLAGS if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive -nostdlib -nostartfiles -Wl,--no-whole-archive
-o conftest conftest.c 1>&5' -o conftest conftest.c 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
@ -5441,7 +5448,7 @@ _start () {}
int __eh_pc; int __eh_pc;
__throw () {} __throw () {}
EOF EOF
if { ac_try='${CC-cc} $CFLAGS if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-nostdlib -nostartfiles -fexceptions -nostdlib -nostartfiles -fexceptions
-o conftest conftest.c 1>&5' -o conftest conftest.c 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
@ -5522,7 +5529,7 @@ if test "${libc_cv_gcc_dwarf2_unwind_info+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat > conftest.c <<EOF cat > conftest.c <<EOF
#line 5525 "configure" #line 5532 "configure"
static char *__EH_FRAME_BEGIN__; static char *__EH_FRAME_BEGIN__;
_start () _start ()
{ {
@ -5548,7 +5555,8 @@ abort () {}
__bzero () {} __bzero () {}
dl_iterate_phdr () {} dl_iterate_phdr () {}
EOF EOF
libc_unwind_check="${CC-cc} $CFLAGS -DCHECK__register_frame_info \ libc_unwind_check="${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame_info \
$LDFLAGS \
-nostdlib -nostartfiles -o conftest conftest.c \ -nostdlib -nostartfiles -o conftest conftest.c \
-lgcc" -lgcc"
# Some platforms' specs put -lgcc first. The second one doesn't hurt. # Some platforms' specs put -lgcc first. The second one doesn't hurt.
@ -5575,8 +5583,8 @@ else
libc_cv_gcc_dwarf2_unwind_info=no libc_cv_gcc_dwarf2_unwind_info=no
fi fi
if test $libc_cv_gcc_dwarf2_unwind_info = no; then if test $libc_cv_gcc_dwarf2_unwind_info = no; then
if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame
-nostdlib -nostartfiles $LDFLAGS -nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&5' -o conftest conftest.c -lgcc >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
@ -5617,14 +5625,14 @@ if test "${libc_cv_gcc_builtin_expect+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat > conftest.c <<EOF cat > conftest.c <<EOF
#line 5620 "configure" #line 5628 "configure"
int foo (int a) int foo (int a)
{ {
a = __builtin_expect (a, 10); a = __builtin_expect (a, 10);
return a == 10 ? 0 : 1; return a == 10 ? 0 : 1;
} }
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&5' -o conftest conftest.c -lgcc >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
@ -5685,7 +5693,7 @@ if test "${libc_cv_gcc_subtract_local_labels+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat > conftest.c <<EOF cat > conftest.c <<EOF
#line 5688 "configure" #line 5696 "configure"
int foo (int a) int foo (int a)
{ {
static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 }; static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
@ -5697,7 +5705,7 @@ int foo (int a)
return 2; return 2;
} }
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&5' -o conftest conftest.c -lgcc >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
@ -5728,7 +5736,7 @@ else
cat > conftest.c <<\EOF cat > conftest.c <<\EOF
__thread int a = 42; __thread int a = 42;
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -c conftest.c >&5' if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
@ -5761,7 +5769,7 @@ else
cat > conftest.c <<\EOF cat > conftest.c <<\EOF
extern __thread int a __attribute__((tls_model ("initial-exec"))); extern __thread int a __attribute__((tls_model ("initial-exec")));
EOF EOF
if { ac_try='${CC-cc} $CFLAGS -S -Werror conftest.c >&5' if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?

View File

@ -387,7 +387,7 @@ m68k) base_machine=m68k machine=m68k/m68020 ;;
m88???) base_machine=m88k machine=m88k/$machine ;; m88???) base_machine=m88k machine=m88k/$machine ;;
m88k) base_machine=m88k machine=m88k/m88100 ;; m88k) base_machine=m88k machine=m88k/m88100 ;;
mips64*) base_machine=mips64 mips64*) base_machine=mips64
case "$CC $CPPFLAGS $CFLAGS " in case "$CC $CFLAGS $CPPFLAGS " in
*" -mabi=n32 "*) mips_cc_abi=n32 ;; *" -mabi=n32 "*) mips_cc_abi=n32 ;;
*" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;; *" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;;
*" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;; *" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;;
@ -766,7 +766,7 @@ int a;
char b; char b;
void c(void) {} void c(void) {}
EOF EOF
$CC $CFLAGS -c conftest.c $CC $CFLAGS $CPPFLAGS -c conftest.c
$AR cr conftest.a conftest.o $AR cr conftest.a conftest.o
cp conftest.a conftest2.a cp conftest.a conftest2.a
$RANLIB conftest.a $RANLIB conftest.a
@ -918,7 +918,7 @@ cat > conftest.S <<EOF
#include "confdefs.h" #include "confdefs.h"
/* Nothing whatsoever. */ /* Nothing whatsoever. */
EOF EOF
if AC_TRY_COMMAND(${CC-cc} $CFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} $CPPFLAGS $ASFLAGS -c conftest.S 1>&AS_MESSAGE_LOG_FD); then
libc_cv_need_minus_P=no libc_cv_need_minus_P=no
else else
libc_cv_need_minus_P=yes libc_cv_need_minus_P=yes
@ -935,7 +935,7 @@ cat > conftest.s <<EOF
.text .text
EOF EOF
libc_cv_dot_text= libc_cv_dot_text=
if AC_TRY_COMMAND(${CC-cc} $CFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_dot_text=.text libc_cv_dot_text=.text
fi fi
rm -f conftest*]) rm -f conftest*])
@ -954,7 +954,7 @@ for ac_globl in .globl .global .EXPORT; do
${ac_globl} foo ${ac_globl} foo
foo: foo:
EOF EOF
if AC_TRY_COMMAND(${CC-cc} $CFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_asm_global_directive=${ac_globl} libc_cv_asm_global_directive=${ac_globl}
fi fi
rm -f conftest* rm -f conftest*
@ -1003,7 +1003,7 @@ for ac_try_prefix in '@' '%' '#'; do
foo: foo:
.byte 1 .byte 1
EOF EOF
if AC_TRY_COMMAND(${CC-cc} $CFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_asm_type_prefix=${ac_try_prefix} libc_cv_asm_type_prefix=${ac_try_prefix}
fi fi
rm -f conftest* rm -f conftest*
@ -1026,7 +1026,7 @@ ${libc_cv_dot_text}
_sym: _sym:
.symver _sym,sym@VERS .symver _sym,sym@VERS
EOF EOF
if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
libc_cv_asm_symver_directive=yes libc_cv_asm_symver_directive=yes
else else
libc_cv_asm_symver_directive=no libc_cv_asm_symver_directive=no
@ -1048,10 +1048,11 @@ VERS_2 {
global: sym; global: sym;
} VERS_1; } VERS_1;
EOF EOF
if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
if AC_TRY_COMMAND([${CC-cc} $CFLAGS -shared -o conftest.so conftest.o if AC_TRY_COMMAND([${CC-cc} $CFLAGS $LDFLAGS -shared
-nostartfiles -nostdlib -o conftest.so conftest.o
-Wl,--version-script,conftest.map -nostartfiles -nostdlib
-Wl,--version-script,conftest.map
1>&AS_MESSAGE_LOG_FD]); 1>&AS_MESSAGE_LOG_FD]);
then then
libc_cv_ld_version_script_option=yes libc_cv_ld_version_script_option=yes
@ -1090,7 +1091,7 @@ if test $elf = yes; then
.section foo_section .section foo_section
.previous .previous
EOF EOF
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_asm_previous_directive=yes libc_cv_asm_previous_directive=yes
else else
libc_cv_asm_previous_directive=no libc_cv_asm_previous_directive=no
@ -1105,7 +1106,7 @@ EOF
.pushsection foo_section .pushsection foo_section
.popsection .popsection
EOF EOF
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_asm_popsection_directive=yes libc_cv_asm_popsection_directive=yes
else else
libc_cv_asm_popsection_directive=no libc_cv_asm_popsection_directive=no
@ -1123,7 +1124,7 @@ foo:
.hidden bar .hidden bar
bar: bar:
EOF EOF
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_asm_protected_directive=yes libc_cv_asm_protected_directive=yes
else else
libc_cv_asm_protected_directive=no libc_cv_asm_protected_directive=no
@ -1206,7 +1207,7 @@ EOF
libc_cv_have_sdata_section, libc_cv_have_sdata_section,
[echo "int i;" > conftest.c [echo "int i;" > conftest.c
libc_cv_have_sdata_section=no libc_cv_have_sdata_section=no
if ${CC-cc} -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \ if ${CC-cc} $LDFLAGS -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \
| grep '\.sdata' >/dev/null; then | grep '\.sdata' >/dev/null; then
libc_cv_have_sdata_section=yes libc_cv_have_sdata_section=yes
fi fi
@ -1225,7 +1226,7 @@ int __start (void) { return 0; }
int foo (void) { return 1; } int foo (void) { return 1; }
int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
EOF EOF
if AC_TRY_COMMAND([${CC-cc} -o conftest conftest.c if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
-static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD]) -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
then then
if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
@ -1247,7 +1248,8 @@ EOF
cat > conftest.c <<EOF cat > conftest.c <<EOF
int _start (void) { return 42; } int _start (void) { return 42; }
EOF EOF
if AC_TRY_COMMAND([${CC-cc} -shared -o conftest.so conftest.c if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-nostartfiles -nostdlib -nostartfiles -nostdlib
-Wl,--enable-new-dtags,-z,nodelete 1>&AS_MESSAGE_LOG_FD]) -Wl,--enable-new-dtags,-z,nodelete 1>&AS_MESSAGE_LOG_FD])
then then
@ -1263,7 +1265,8 @@ EOF
cat > conftest.c <<EOF cat > conftest.c <<EOF
int _start (void) { return 42; } int _start (void) { return 42; }
EOF EOF
if AC_TRY_COMMAND([${CC-cc} -shared -o conftest.so conftest.c if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-nostartfiles -nostdlib -nostartfiles -nostdlib
-Wl,--enable-new-dtags,-z,nodlopen 1>&AS_MESSAGE_LOG_FD]) -Wl,--enable-new-dtags,-z,nodlopen 1>&AS_MESSAGE_LOG_FD])
then then
@ -1279,7 +1282,8 @@ EOF
cat > conftest.c <<EOF cat > conftest.c <<EOF
int _start (void) { return 42; } int _start (void) { return 42; }
EOF EOF
if AC_TRY_COMMAND([${CC-cc} -shared -o conftest.so conftest.c if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-nostartfiles -nostdlib -nostartfiles -nostdlib
-Wl,--enable-new-dtags,-z,initfirst 1>&AS_MESSAGE_LOG_FD]) -Wl,--enable-new-dtags,-z,initfirst 1>&AS_MESSAGE_LOG_FD])
then then
@ -1295,7 +1299,9 @@ EOF
cat > conftest.c <<EOF cat > conftest.c <<EOF
int _start (void) { return 42; } int _start (void) { return 42; }
EOF EOF
if AC_TRY_COMMAND([${CC-cc} -shared -o conftest.so conftest.c -Wl,-Bgroup -nostdlib 1>&AS_MESSAGE_LOG_FD]) if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-Wl,-Bgroup -nostdlib 1>&AS_MESSAGE_LOG_FD])
then then
libc_cv_Bgroup=yes libc_cv_Bgroup=yes
else else
@ -1311,7 +1317,8 @@ extern int bar (int);
extern int mumble; extern int mumble;
int foo (void) { return bar (mumble); } int foo (void) { return bar (mumble); }
EOF EOF
if AC_TRY_COMMAND([${CC-cc} -shared -o conftest.so conftest.c if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-shared -o conftest.so conftest.c
-nostdlib -nostartfiles -nostdlib -nostartfiles
-Wl,-z,combreloc 1>&AS_MESSAGE_LOG_FD]) -Wl,-z,combreloc 1>&AS_MESSAGE_LOG_FD])
then then
@ -1428,7 +1435,7 @@ foo:
.weak foo .weak foo
.weak bar; bar = foo .weak bar; bar = foo
EOF EOF
if AC_TRY_COMMAND(${CC-cc} $CFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_asm_weak_directive=yes libc_cv_asm_weak_directive=yes
else else
libc_cv_asm_weak_directive=no libc_cv_asm_weak_directive=no
@ -1448,7 +1455,7 @@ foo:
${libc_cv_asm_global_directive} baz ${libc_cv_asm_global_directive} baz
baz: baz:
EOF EOF
if AC_TRY_COMMAND(${CC-cc} $CFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_asm_weakext_directive=yes libc_cv_asm_weakext_directive=yes
else else
libc_cv_asm_weakext_directive=no libc_cv_asm_weakext_directive=no
@ -1477,7 +1484,7 @@ case "${host_cpu}-${host_os}" in
cat > conftest.s <<EOF cat > conftest.s <<EOF
nop ; is_old_puffin nop ; is_old_puffin
EOF EOF
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_asm_line_sep='!' libc_cv_asm_line_sep='!'
else else
if test -z "$enable_hacker_mode"; then if test -z "$enable_hacker_mode"; then
@ -1511,7 +1518,7 @@ foo:
/* comment */ /* comment */
nop nop
EOF EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) &&
ac_pattern='conftest\.S' ac_pattern='conftest\.S'
AC_TRY_COMMAND([readelf --debug-dump=line conftest.o | AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
grep $ac_pattern 1>&AS_MESSAGE_LOG_FD]); then grep $ac_pattern 1>&AS_MESSAGE_LOG_FD]); then
@ -1531,7 +1538,7 @@ int __eh_pc;
__throw () {} __throw () {}
EOF EOF
dnl No \ in command here because it ends up inside ''. dnl No \ in command here because it ends up inside ''.
if AC_TRY_COMMAND([${CC-cc} $CFLAGS if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive -nostdlib -nostartfiles -Wl,--no-whole-archive
-o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then
libc_cv_ld_no_whole_archive=yes libc_cv_ld_no_whole_archive=yes
@ -1551,7 +1558,7 @@ int __eh_pc;
__throw () {} __throw () {}
EOF EOF
dnl No \ in command here because it ends up inside ''. dnl No \ in command here because it ends up inside ''.
if AC_TRY_COMMAND([${CC-cc} $CFLAGS if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-nostdlib -nostartfiles -fexceptions -nostdlib -nostartfiles -fexceptions
-o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then
libc_cv_gcc_exceptions=yes libc_cv_gcc_exceptions=yes
@ -1604,7 +1611,8 @@ abort () {}
__bzero () {} __bzero () {}
dl_iterate_phdr () {} dl_iterate_phdr () {}
EOF EOF
libc_unwind_check="${CC-cc} $CFLAGS -DCHECK__register_frame_info \ libc_unwind_check="${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame_info \
$LDFLAGS \
-nostdlib -nostartfiles -o conftest conftest.c \ -nostdlib -nostartfiles -o conftest conftest.c \
-lgcc" -lgcc"
# Some platforms' specs put -lgcc first. The second one doesn't hurt. # Some platforms' specs put -lgcc first. The second one doesn't hurt.
@ -1621,8 +1629,8 @@ else
libc_cv_gcc_dwarf2_unwind_info=no libc_cv_gcc_dwarf2_unwind_info=no
fi fi
if test $libc_cv_gcc_dwarf2_unwind_info = no; then if test $libc_cv_gcc_dwarf2_unwind_info = no; then
if AC_TRY_COMMAND([${CC-cc} $CFLAGS -DCHECK__register_frame if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame
-nostdlib -nostartfiles $LDFLAGS -nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then -o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
libc_cv_gcc_dwarf2_unwind_info=yes libc_cv_gcc_dwarf2_unwind_info=yes
else else
@ -1651,7 +1659,7 @@ int foo (int a)
} }
EOF EOF
dnl No \ in command here because it ends up inside ''. dnl No \ in command here because it ends up inside ''.
if AC_TRY_COMMAND([${CC-cc} $CFLAGS -nostdlib -nostartfiles if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then -o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
libc_cv_gcc_builtin_expect=yes libc_cv_gcc_builtin_expect=yes
else else
@ -1699,7 +1707,7 @@ int foo (int a)
changequote([,])dnl changequote([,])dnl
EOF EOF
dnl No \ in command here because it ends up inside ''. dnl No \ in command here because it ends up inside ''.
if AC_TRY_COMMAND([${CC-cc} $CFLAGS -nostdlib -nostartfiles if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then -o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
libc_cv_gcc_subtract_local_labels=yes libc_cv_gcc_subtract_local_labels=yes
else else
@ -1716,7 +1724,7 @@ if test "x$use__thread" != xno; then
[cat > conftest.c <<\EOF [cat > conftest.c <<\EOF
__thread int a = 42; __thread int a = 42;
EOF EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
libc_cv_gcc___thread=yes libc_cv_gcc___thread=yes
else else
libc_cv_gcc___thread=no libc_cv_gcc___thread=no
@ -1735,7 +1743,7 @@ if test "$libc_cv_gcc___thread" = yes; then
cat > conftest.c <<\EOF cat > conftest.c <<\EOF
extern __thread int a __attribute__((tls_model ("initial-exec"))); extern __thread int a __attribute__((tls_model ("initial-exec")));
EOF EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS -S -Werror conftest.c >&AS_MESSAGE_LOG_FD]); then if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&AS_MESSAGE_LOG_FD]); then
libc_cv_gcc_tls_model_attr=yes libc_cv_gcc_tls_model_attr=yes
else else
libc_cv_gcc_tls_model_attr=no libc_cv_gcc_tls_model_attr=no