configure.in: new flags --with-ld and --with-as...

* configure.in: new flags --with-ld and --with-as, equivalent
	to setting LD and AS environment variables.  Test whether
	specified arguments are GNU commands, and report them with
	checking messages.  Use the specified AS for configure
	tests too.
	* configure: ditto
	* acconfig.h: add DEFAULT_ASSEMBLER and DEFAULT_LINKER
	* config.in: ditto
	* gcc.c (find_a_file): when looking for `as' and `ld', return
	the DEFAULT program if it exists
	* collect2.c (main): use DEFAULT_LINKER if it exists
	* gcc.c (find_a_file): the test for existence of a full
	pathname was reversed

From-SVN: r22629
This commit is contained in:
Alexandre Oliva 1998-09-28 15:52:01 +00:00 committed by Alexandre Oliva
parent 42820a49dd
commit ab339d62c0
7 changed files with 261 additions and 89 deletions

View File

@ -1,3 +1,20 @@
Mon Sep 28 19:41:24 1998 Alexandre Oliva <oliva@dcc.unicamp.br>
* configure.in: new flags --with-ld and --with-as, equivalent
to setting LD and AS environment variables. Test whether
specified arguments are GNU commands, and report them with
checking messages. Use the specified AS for configure
tests too.
* configure: ditto
* acconfig.h: add DEFAULT_ASSEMBLER and DEFAULT_LINKER
* config.in: ditto
* gcc.c (find_a_file): when looking for `as' and `ld', return
the DEFAULT program if it exists
* collect2.c (main): use DEFAULT_LINKER if it exists
* gcc.c (find_a_file): the test for existence of a full
pathname was reversed
Mon Sep 28 17:34:35 1998 Michael Meissner <meissner@cygnus.com>
* rs6000.h (ASM_OUTPUT_MI_THUNK): Only define on ELF systems.

View File

@ -86,4 +86,11 @@
/* Define if you want expensive run-time checks. */
#undef ENABLE_CHECKING
/* Define to enable the use of a default assembler. */
#undef DEFAULT_ASSEMBLER
/* Define to enable the use of a default linker. */
#undef DEFAULT_LINKER
@TOP@

View File

@ -1075,6 +1075,11 @@ main (argc, argv)
/* Try to discover a valid linker/nm/strip to use. */
/* Maybe we know the right file to use (if not cross). */
#ifdef DEFAULT_LINKER
if (access (DEFAULT_LINKER, X_OK) == 0)
ld_file_name = DEFAULT_LINKER;
if (ld_file_name == 0)
#endif
#ifdef REAL_LD_FILE_NAME
ld_file_name = find_a_file (&path, REAL_LD_FILE_NAME);
if (ld_file_name == 0)

View File

@ -88,6 +88,13 @@
/* Define if you want expensive run-time checks. */
#undef ENABLE_CHECKING
/* Define to enable the use of a default assembler. */
#undef DEFAULT_ASSEMBLER
/* Define to enable the use of a default linker. */
#undef DEFAULT_LINKER
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT

241
gcc/configure vendored
View File

@ -13,8 +13,12 @@ ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--with-gnu-ld arrange to work with GNU ld."
ac_help="$ac_help
--with-ld arrange to use the specified ld (full pathname)."
ac_help="$ac_help
--with-gnu-as arrange to work with GNU as."
ac_help="$ac_help
--with-as arrange to use the specified as (full pathname)."
ac_help="$ac_help
--with-stabs arrange to use stabs instead of host debug format."
ac_help="$ac_help
@ -570,7 +574,7 @@ copy=cp
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
echo "configure:574: checking LIBRARY_PATH variable" >&5
echo "configure:578: checking LIBRARY_PATH variable" >&5
case ${LIBRARY_PATH} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
library_path_setting="contains current directory"
@ -595,7 +599,7 @@ fi
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
echo "configure:599: checking GCC_EXEC_PREFIX variable" >&5
echo "configure:603: checking GCC_EXEC_PREFIX variable" >&5
case ${GCC_EXEC_PREFIX} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
gcc_exec_prefix_setting="contains current directory"
@ -624,6 +628,25 @@ else
fi
# With pre-defined ld
# Check whether --with-ld or --without-ld was given.
if test "${with_ld+set}" = set; then
withval="$with_ld"
LD="$with_ld"
fi
if test x"${LD+set}" = x"set"; then
if test ! -x "$LD"; then
echo "configure: warning: cannot execute: $LD: check --with-ld or env. var. LD" 1>&2
elif test "GNU" = `$LD -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
gnu_ld_flag=yes
fi
cat >> confdefs.h <<EOF
#define DEFAULT_LINKER "$LD"
EOF
fi
# With GNU as
# Check whether --with-gnu-as or --without-gnu-as was given.
if test "${with_gnu_as+set}" = set; then
@ -634,6 +657,24 @@ else
fi
# Check whether --with-as or --without-as was given.
if test "${with_as+set}" = set; then
withval="$with_as"
AS="$with_as"
fi
if test x"${AS+set}" = x"set"; then
if test ! -x "$AS"; then
echo "configure: warning: cannot execute: $AS: check --with-as or env. var. AS" 1>&2
elif test "GNU" = `$AS -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
gas_flag=yes
fi
cat >> confdefs.h <<EOF
#define DEFAULT_ASSEMBLER "$AS"
EOF
fi
# With stabs
# Check whether --with-stabs or --without-stabs was given.
if test "${with_stabs+set}" = set; then
@ -859,7 +900,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:863: checking host system type" >&5
echo "configure:904: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@ -880,7 +921,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:884: checking target system type" >&5
echo "configure:925: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@ -898,7 +939,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:902: checking build system type" >&5
echo "configure:943: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@ -925,7 +966,7 @@ test "$host_alias" != "$target_alias" &&
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:929: checking for $ac_word" >&5
echo "configure:970: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -954,7 +995,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:958: checking for $ac_word" >&5
echo "configure:999: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1002,7 +1043,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1006: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:1047: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1012,11 +1053,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 1016 "configure"
#line 1057 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -1036,12 +1077,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1081: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1045: checking whether we are using GNU C" >&5
echo "configure:1086: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1050,7 +1091,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -1065,7 +1106,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1069: checking whether ${CC-cc} accepts -g" >&5
echo "configure:1110: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1104,7 +1145,7 @@ fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1108: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:1149: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1131,13 +1172,37 @@ else
fi
echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
echo "configure:1177: checking whether a default assembler was specified" >&5
if test x"${AS+set}" = x"set"; then
if test x"$with_gas" = x"no"; then
echo "$ac_t""yes ($AS)" 1>&6
else
echo "$ac_t""yes ($AS - GNU as)" 1>&6
fi
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
echo "configure:1189: checking whether a default linker was specified" >&5
if test x"${LD+set}" = x"set"; then
if test x"$with_gnu_ld" = x"no"; then
echo "$ac_t""yes ($LD)" 1>&6
else
echo "$ac_t""yes ($LD - GNU ld)" 1>&6
fi
else
echo "$ac_t""no" 1>&6
fi
# Find some useful tools
for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1141: checking for $ac_word" >&5
echo "configure:1206: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1168,7 +1233,7 @@ done
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1172: checking for $ac_word" >&5
echo "configure:1237: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1201,7 +1266,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
echo "configure:1205: checking for yywrap in -l$ac_lib" >&5
echo "configure:1270: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1209,7 +1274,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1213 "configure"
#line 1278 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1220,7 +1285,7 @@ int main() {
yywrap()
; return 0; }
EOF
if { (eval echo configure:1224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1243,7 +1308,7 @@ fi
fi
echo $ac_n "checking whether ln works""... $ac_c" 1>&6
echo "configure:1247: checking whether ln works" >&5
echo "configure:1312: checking whether ln works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1275,7 +1340,7 @@ else
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:1279: checking whether ln -s works" >&5
echo "configure:1344: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1307,19 +1372,19 @@ else
fi
echo $ac_n "checking for volatile""... $ac_c" 1>&6
echo "configure:1311: checking for volatile" >&5
echo "configure:1376: checking for volatile" >&5
if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1316 "configure"
#line 1381 "configure"
#include "confdefs.h"
int main() {
volatile int foo;
; return 0; }
EOF
if { (eval echo configure:1323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c_volatile=yes
else
@ -1342,7 +1407,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1346: checking for $ac_word" >&5
echo "configure:1411: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1373,7 +1438,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1377: checking for $ac_word" >&5
echo "configure:1442: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1413,7 +1478,7 @@ test -n "$YACC" || YACC="yacc"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1417: checking for a BSD compatible install" >&5
echo "configure:1482: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1464,7 +1529,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1468: checking how to run the C preprocessor" >&5
echo "configure:1533: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -1479,13 +1544,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1483 "configure"
#line 1548 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@ -1496,13 +1561,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1500 "configure"
#line 1565 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@ -1525,12 +1590,12 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1529: checking for ANSI C header files" >&5
echo "configure:1594: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1534 "configure"
#line 1599 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -1538,7 +1603,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1555,7 +1620,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 1559 "configure"
#line 1624 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -1573,7 +1638,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 1577 "configure"
#line 1642 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -1594,7 +1659,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 1598 "configure"
#line 1663 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -1605,7 +1670,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:1609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@ -1629,12 +1694,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:1633: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:1698: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1638 "configure"
#line 1703 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@ -1643,7 +1708,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@ -1664,12 +1729,12 @@ EOF
fi
echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
echo "configure:1668: checking whether string.h and strings.h may both be included" >&5
echo "configure:1733: checking whether string.h and strings.h may both be included" >&5
if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1673 "configure"
#line 1738 "configure"
#include "confdefs.h"
#include <string.h>
#include <strings.h>
@ -1677,7 +1742,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:1681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_header_string=yes
else
@ -1701,17 +1766,17 @@ for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unist
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1705: checking for $ac_hdr" >&5
echo "configure:1770: 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 1710 "configure"
#line 1775 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1741,17 +1806,17 @@ done
# Check for thread headers.
ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for thread.h""... $ac_c" 1>&6
echo "configure:1745: checking for thread.h" >&5
echo "configure:1810: checking for thread.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 1750 "configure"
#line 1815 "configure"
#include "confdefs.h"
#include <thread.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1775,17 +1840,17 @@ fi
ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
echo "configure:1779: checking for pthread.h" >&5
echo "configure:1844: checking for pthread.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 1784 "configure"
#line 1849 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1812,7 +1877,7 @@ fi
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1816: checking for $ac_word" >&5
echo "configure:1881: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1842,12 +1907,12 @@ fi
# See if the system preprocessor understands the ANSI C preprocessor
# stringification operator.
echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6
echo "configure:1846: checking whether cpp understands the stringify operator" >&5
echo "configure:1911: checking whether cpp understands the stringify operator" >&5
if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1851 "configure"
#line 1916 "configure"
#include "confdefs.h"
int main() {
@ -1855,7 +1920,7 @@ int main() {
char *test = S(foo);
; return 0; }
EOF
if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c_have_stringify=yes
else
@ -1878,12 +1943,12 @@ fi
# Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t.
echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
echo "configure:1882: checking for inttypes.h" >&5
echo "configure:1947: checking for inttypes.h" >&5
if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1887 "configure"
#line 1952 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <inttypes.h>
@ -1891,7 +1956,7 @@ int main() {
intmax_t i = -1;
; return 0; }
EOF
if { (eval echo configure:1895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<EOF
#define HAVE_INTTYPES_H 1
@ -1914,12 +1979,12 @@ for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \
sysconf isascii gettimeofday strsignal
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1918: checking for $ac_func" >&5
echo "configure:1983: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1923 "configure"
#line 1988 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1942,7 +2007,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -1971,12 +2036,12 @@ done
#AC_CHECK_TYPE(wchar_t, unsigned int)
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:1975: checking for vprintf" >&5
echo "configure:2040: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1980 "configure"
#line 2045 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@ -1999,7 +2064,7 @@ vprintf();
; return 0; }
EOF
if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
@ -2023,12 +2088,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:2027: checking for _doprnt" >&5
echo "configure:2092: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2032 "configure"
#line 2097 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@ -2051,7 +2116,7 @@ _doprnt();
; return 0; }
EOF
if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
@ -2087,7 +2152,7 @@ fi
echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
echo "configure:2091: checking whether the printf functions support %p" >&5
echo "configure:2156: checking whether the printf functions support %p" >&5
if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2095,7 +2160,7 @@ else
gcc_cv_func_printf_ptr=no
else
cat > conftest.$ac_ext <<EOF
#line 2099 "configure"
#line 2164 "configure"
#include "confdefs.h"
#include <stdio.h>
@ -2108,7 +2173,7 @@ main()
exit (p != q);
}
EOF
if { (eval echo configure:2112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
gcc_cv_func_printf_ptr=yes
else
@ -2137,12 +2202,12 @@ for ac_func in malloc realloc calloc free bcopy bzero bcmp \
strsignal
do
echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
echo "configure:2141: checking whether $ac_func must be declared" >&5
echo "configure:2206: checking whether $ac_func must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2146 "configure"
#line 2211 "configure"
#include "confdefs.h"
#include <stdio.h>
@ -2175,7 +2240,7 @@ int main() {
char *(*pfn) = (char *(*)) $ac_func
; return 0; }
EOF
if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_decl_needed_$ac_func=no"
else
@ -2204,12 +2269,12 @@ done
for ac_func in getrlimit setrlimit
do
echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
echo "configure:2208: checking whether $ac_func must be declared" >&5
echo "configure:2273: checking whether $ac_func must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2213 "configure"
#line 2278 "configure"
#include "confdefs.h"
#include <stdio.h>
@ -2246,7 +2311,7 @@ int main() {
char *(*pfn) = (char *(*)) $ac_func
; return 0; }
EOF
if { (eval echo configure:2250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_decl_needed_$ac_func=no"
else
@ -2273,12 +2338,12 @@ done
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
echo "configure:2277: checking for sys_siglist declaration in signal.h or unistd.h" >&5
echo "configure:2342: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2282 "configure"
#line 2347 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@ -2290,7 +2355,7 @@ int main() {
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
@ -5474,11 +5539,13 @@ fi
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:5478: checking assembler alignment features" >&5
echo "configure:5543: checking assembler alignment features" >&5
gcc_cv_as=
gcc_cv_as_alignment_features=
gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
if test -x as$host_exeext; then
if test -x "$AS"; then
gcc_cv_as=$AS
elif test -x as$host_exeext; then
# Build using assembler in the current directory.
gcc_cv_as=./as$host_exeext
elif test -f $gcc_cv_as_gas_srcdir/configure.in; then
@ -5543,7 +5610,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:5547: checking assembler subsection support" >&5
echo "configure:5614: checking assembler subsection support" >&5
gcc_cv_as_subsections=
if test x$gcc_cv_as != x; then
# Check if we have .subsection
@ -5779,7 +5846,7 @@ fi
# Warn if using init_priority.
echo $ac_n "checking whether to enable init_priority by default""... $ac_c" 1>&6
echo "configure:5783: checking whether to enable init_priority by default" >&5
echo "configure:5850: checking whether to enable init_priority by default" >&5
if test x$enable_init_priority != xyes; then
enable_init_priority=no
fi

View File

@ -90,12 +90,37 @@ AC_ARG_WITH(gnu-ld,
gnu_ld_flag="$with_gnu_ld",
gnu_ld_flag=no)
# With pre-defined ld
AC_ARG_WITH(ld,
[ --with-ld arrange to use the specified ld (full pathname).],
LD="$with_ld")
if test x"${LD+set}" = x"set"; then
if test ! -x "$LD"; then
AC_MSG_WARN([cannot execute: $LD: check --with-ld or env. var. LD])
elif test "GNU" = `$LD -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
gnu_ld_flag=yes
fi
AC_DEFINE_UNQUOTED(DEFAULT_LINKER,"$LD")
fi
# With GNU as
AC_ARG_WITH(gnu-as,
[ --with-gnu-as arrange to work with GNU as.],
gas_flag="$with_gnu_as",
gas_flag=no)
AC_ARG_WITH(as,
[ --with-as arrange to use the specified as (full pathname).],
AS="$with_as")
if test x"${AS+set}" = x"set"; then
if test ! -x "$AS"; then
AC_MSG_WARN([cannot execute: $AS: check --with-as or env. var. AS])
elif test "GNU" = `$AS -v </dev/null 2>&1 | sed '1s/^GNU.*/GNU/;q'`; then
gas_flag=yes
fi
AC_DEFINE_UNQUOTED(DEFAULT_ASSEMBLER,"$AS")
fi
# With stabs
AC_ARG_WITH(stabs,
[ --with-stabs arrange to use stabs instead of host debug format.],
@ -254,6 +279,28 @@ AC_SUBST(stage1_warn_cflags)
AC_PROG_MAKE_SET
AC_MSG_CHECKING([whether a default assembler was specified])
if test x"${AS+set}" = x"set"; then
if test x"$with_gas" = x"no"; then
AC_MSG_RESULT([yes ($AS)])
else
AC_MSG_RESULT([yes ($AS - GNU as)])
fi
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING([whether a default linker was specified])
if test x"${LD+set}" = x"set"; then
if test x"$with_gnu_ld" = x"no"; then
AC_MSG_RESULT([yes ($LD)])
else
AC_MSG_RESULT([yes ($LD - GNU ld)])
fi
else
AC_MSG_RESULT(no)
fi
# Find some useful tools
AC_PROG_AWK
AC_PROG_LEX
@ -3621,7 +3668,9 @@ AC_MSG_CHECKING(assembler alignment features)
gcc_cv_as=
gcc_cv_as_alignment_features=
gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
if test -x as$host_exeext; then
if test -x "$AS"; then
gcc_cv_as=$AS
elif test -x as$host_exeext; then
# Build using assembler in the current directory.
gcc_cv_as=./as$host_exeext
elif test -f $gcc_cv_as_gas_srcdir/configure.in; then

View File

@ -1983,6 +1983,26 @@ find_a_file (pprefix, name, mode)
struct prefix_list *pl;
int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1;
#ifdef DEFAULT_ASSEMBLER
if (! strcmp(name, "as") && access (DEFAULT_ASSEMBLER, mode) == 0) {
name = DEFAULT_ASSEMBLER;
len = strlen(name)+1;
temp = xmalloc (len);
strcpy (temp, name);
return temp;
}
#endif
#ifdef DEFAULT_LINKER
if (! strcmp(name, "ld") && access (DEFAULT_LINKER, mode) == 0) {
name = DEFAULT_LINKER;
len = strlen(name)+1;
temp = xmalloc (len);
strcpy (temp, name);
return temp;
}
#endif
if (machine_suffix)
len += strlen (machine_suffix);
@ -1995,7 +2015,7 @@ find_a_file (pprefix, name, mode)
|| (DIR_SEPARATOR == '\\' && name[1] == ':'
&& (name[2] == DIR_SEPARATOR || name[2] == '/')))
{
if (access (name, mode))
if (access (name, mode) == 0)
{
strcpy (temp, name);
return temp;