diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-16 12:49:06 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-16 12:49:06 +0000 |
commit | f32e3360d2a8ba7c4919e9c8145f014b4d598c8d (patch) | |
tree | 259f401a4d80b42ecd004c9a617f7771758b5f4c /gcc/configure | |
parent | cfd6448a6fe59fc94dedbc1dcd3ed4444303589a (diff) | |
download | gcc-f32e3360d2a8ba7c4919e9c8145f014b4d598c8d.tar.gz |
2005-06-16 Paolo Bonzini <bonzini@gnu.org>
Daniel Jacobowitz <dan@codesourcery.com>
Alan Modra <amodra.bigpond.net.au>
* configure.ac (gcc_version): Set near the beginning.
(as, ld, nm): Do not link in-tree tools. Set gcc_cv_* if tools are
found in the tree. Use gcc_AC_PROG to find the tools in the system.
(objdump): Do not look for it.
* Makefile.in (NM_FOR_TARGET): Point to ./nm.
(ORIGINAL_AS_FOR_TARGET, ORIGINAL_LD_FOR_TARGET,
ORIGINAL_NM_FOR_TARGET): Substitute from autoconf.
(as, ld, nm): New rules.
(libgcc.mk): Depend on them.
* aclocal.m4 (gcc_AC_TOOL_DIRS, gcc_AC_CHECK_TOOL,
gcc_AC_BUILD_EXEEXT): New.
(gcc_AC_CHECK_PROG_VER): Use gcc_AC_BUILD_EXEEXT.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101084 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 522 |
1 files changed, 382 insertions, 140 deletions
diff --git a/gcc/configure b/gcc/configure index d258e444d30..a5e04ec1c79 100755 --- a/gcc/configure +++ b/gcc/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' # Initialize some variables set by options. @@ -1385,6 +1385,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers auto-host.h:config.in" +gcc_version=`cat $srcdir/BASE-VER` + # Determine the host, build, and target systems ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -7359,6 +7361,9 @@ MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" # See if makeinfo has been installed and is modern enough # that we can use it. + +ac_executable_extensions="$build_exeext" + # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -7403,7 +7408,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then else ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - echo "configure:7406: version of makeinfo is $ac_prog_version" >&5 + echo "configure:7411: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; 4.[2-9]*) @@ -12791,8 +12796,6 @@ esac # If build != host, and we aren't building gas in-tree, we identify a # build->target assembler and hope that it will have the same features # as the host->target assembler we'll be using. -echo "$as_me:$LINENO: checking what assembler to use" >&5 -echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 in_tree_gas=no gcc_cv_as= gcc_cv_gas_major_version= @@ -12800,9 +12803,6 @@ gcc_cv_gas_minor_version= gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas if test -x "$DEFAULT_ASSEMBLER"; then gcc_cv_as="$DEFAULT_ASSEMBLER" -elif test -x as$build_exeext; then - # Build using assembler in the current directory. - gcc_cv_as=./as$build_exeext elif test -f $gcc_cv_as_gas_srcdir/configure.in \ && test -f ../gas/Makefile \ && test x$build = x$host; then @@ -12830,8 +12830,7 @@ gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ + $gcc_cv_gas_minor_version \) \* 1000 \ + $gcc_cv_gas_patch_version` - rm -f as$build_exeext - $LN_S ../gas/as-new$build_exeext as$build_exeext 2>/dev/null + gcc_cv_as=../gas/as-new$build_exeext in_tree_gas_is_elf=no if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ || (grep 'obj_format = multi' ../gas/Makefile \ @@ -12839,79 +12838,170 @@ gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ then in_tree_gas_is_elf=yes fi +elif test -x as$build_exeext; then + # Build using assembler in the current directory. + gcc_cv_as=./as$build_exeext elif test -x "$AS_FOR_TARGET"; then gcc_cv_as="$AS_FOR_TARGET" elif test -x "$AS" && test x$host = x$target; then gcc_cv_as="$AS" fi -gcc_version=`cat $srcdir/BASE-VER` -if test "x$gcc_cv_as" = x; then - # Search the same directories that the installed compiler will - # search. Else we may find the wrong assembler and lose. If we - # do not find a suitable assembler binary, then try the user's - # path. - # - # Also note we have to check MD_EXEC_PREFIX before checking the - # user's path. Unfortunately, there is no good way to get at the - # value of MD_EXEC_PREFIX here. So we do a brute force search - # through all the known MD_EXEC_PREFIX values. Ugh. This needs - # to be fixed as part of the make/configure rewrite too. - - if test "x$exec_prefix" = xNONE; then - if test "x$prefix" = xNONE; then - test_prefix=/usr/local - else - test_prefix=$prefix - fi +# When searching for the assembler or linker, search the same directories +# that the installed compiler will search. Else we may find the wrong +# assembler or linker and lose. If we do not find a suitable binary, +# then try the user's path. +# +# Also note we have to check MD_EXEC_PREFIX before checking the user's path. +if test "x$exec_prefix" = xNONE; then + if test "x$prefix" = xNONE; then + gcc_cv_tool_prefix=/usr/local else - test_prefix=$exec_prefix + gcc_cv_tool_prefix=$prefix fi +else + gcc_cv_tool_prefix=$exec_prefix +fi + +if test x$host = x$build; then + gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin" +else + gcc_cv_tool_dirs= +fi + +if test x$build = x$target; then + # Rummage through tm_files looking for MD_EXEC_PREFIX + md_dirs= + for f in ${tm_file_list}; do + if test -f $f; then + if grep '^#[ ]*undef[ ]*MD_EXEC_PREFIX' $f > /dev/null; then + md_dirs= + fi + md_dirs="$md_dirs "`sed -n -e 's@^#[ ]*define[ ]*MD_EXEC_PREFIX[ ]*"\(.*\)/"@\1@p' < $f` + fi + done + for f in ${md_dirs}; do + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f" + done +fi + + + + +exec 6>/dev/null +for ac_prog in as +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_as+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_as in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $gcc_cv_tool_dirs +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - # If the loop below does not find an assembler, then use whatever + ;; +esac +fi +gcc_cv_as=$ac_cv_path_gcc_cv_as + +if test -n "$gcc_cv_as"; then + echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 +echo "${ECHO_T}$gcc_cv_as" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$gcc_cv_as" && break +done + +if test "x$gcc_cv_as" = x; then + # If the loop above did not find a tool, then use whatever # one we can find in the users's path. We are looking for a - # ${build} -> ${target} assembler. + # ${build} -> ${target} tool. if test "x$program_prefix" != xNONE; then - gcc_cv_as=${program_prefix}as$build_exeext + default_tool_name=${program_prefix}as elif test x$build != x$host && test x$build != x$target; then - gcc_cv_as=${target_noncanonical}-as$build_exeext + default_tool_name=${target_noncanonical}-as else - gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_exeext + default_tool_name=`echo as | sed "${program_transform_name}"` fi + for ac_prog in $default_tool_name +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_as+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_as in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - if test x$host = x$build; then - test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ - $test_prefix/libexec/gcc/$target_noncanonical \ - /usr/lib/gcc/$target_noncanonical/$gcc_version \ - /usr/lib/gcc/$target_noncanonical \ - $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ - $test_prefix/$target_noncanonical/bin" - else - test_dirs= - fi + ;; +esac +fi +gcc_cv_as=$ac_cv_path_gcc_cv_as - if test x$build = x$target; then - test_dirs="$test_dirs \ - /usr/libexec \ - /usr/ccs/gcc \ - /usr/ccs/bin \ - /udk/usr/ccs/bin \ - /bsd43/usr/lib/cmplrs/cc \ - /usr/cross64/usr/bin \ - /usr/lib/cmplrs/cc \ - /sysv/usr/lib/cmplrs/cc \ - /svr4/usr/lib/cmplrs/cc \ - /usr/bin" - fi +if test -n "$gcc_cv_as"; then + echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 +echo "${ECHO_T}$gcc_cv_as" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$gcc_cv_as" && break +done +test -n "$gcc_cv_as" || gcc_cv_as="$gcc_cv_tool_prefix/$default_tool_name$build_exeext" - for dir in $test_dirs; do - if test -x $dir/as$build_exeext; then - gcc_cv_as=$dir/as$build_exeext - break; - fi - done fi +test "$silent" != yes && exec 6>&1 + +ORIGINAL_AS_FOR_TARGET="$gcc_cv_as" + +echo "$as_me:$LINENO: checking what assembler to use" >&5 +echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 case $in_tree_gas in yes) echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 @@ -12930,8 +13020,6 @@ esac # If build != host, and we aren't building gas in-tree, we identify a # build->target linker and hope that it will have the same features # as the host->target linker we'll be using. -echo "$as_me:$LINENO: checking what linker to use" >&5 -echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 in_tree_ld=no gcc_cv_ld= gcc_cv_gld_major_version= @@ -12940,9 +13028,6 @@ gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd if test -x "$DEFAULT_LINKER"; then gcc_cv_ld="$DEFAULT_LINKER" -elif test -x collect-ld$build_exeext; then - # Build using linker in the current directory. - gcc_cv_ld=./collect-ld$build_exeext elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ && test -f ../ld/Makefile \ && test x$build = x$host; then @@ -12965,79 +13050,128 @@ elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ done gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` - rm -f collect-ld$build_exeext - $LN_S ../ld/ld-new$build_exeext collect-ld$build_exeext 2>/dev/null + gcc_cv_ld=../ld/ld-new$build_exeext +elif test -x collect-ld$build_exeext; then + # Build using linker in the current directory. + gcc_cv_ld=./collect-ld$build_exeext elif test -x "$LD_FOR_TARGET"; then gcc_cv_ld="$LD_FOR_TARGET" elif test -x "$LD" && test x$host = x$target; then gcc_cv_ld="$LD" fi -if test "x$gcc_cv_ld" = x; then - # Search the same directories that the installed compiler will - # search. Else we may find the wrong linker and lose. If we - # do not find a suitable linker binary, then try the user's - # path. - # - # Also note we have to check MD_EXEC_PREFIX before checking the - # user's path. Unfortunately, there is no good way to get at the - # value of MD_EXEC_PREFIX here. So we do a brute force search - # through all the known MD_EXEC_PREFIX values. Ugh. This needs - # to be fixed as part of the make/configure rewrite too. - - if test "x$exec_prefix" = xNONE; then - if test "x$prefix" = xNONE; then - test_prefix=/usr/local - else - test_prefix=$prefix - fi - else - test_prefix=$exec_prefix - fi - # If the loop below does not find a linker, then use whatever + + + +exec 6>/dev/null +for ac_prog in ld +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_ld in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $gcc_cv_tool_dirs +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +gcc_cv_ld=$ac_cv_path_gcc_cv_ld + +if test -n "$gcc_cv_ld"; then + echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 +echo "${ECHO_T}$gcc_cv_ld" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$gcc_cv_ld" && break +done + +if test "x$gcc_cv_ld" = x; then + # If the loop above did not find a tool, then use whatever # one we can find in the users's path. We are looking for a - # ${build} -> ${target} linker. + # ${build} -> ${target} tool. if test "x$program_prefix" != xNONE; then - gcc_cv_ld=${program_prefix}ld$build_exeext + default_tool_name=${program_prefix}ld elif test x$build != x$host && test x$build != x$target; then - gcc_cv_ld=${target_noncanonical}-ld$build_exeext + default_tool_name=${target_noncanonical}-ld else - gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_exeext + default_tool_name=`echo ld | sed "${program_transform_name}"` fi + for ac_prog in $default_tool_name +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_ld in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - if test x$host = x$build; then - test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ - $test_prefix/libexec/gcc/$target_noncanonical \ - /usr/lib/gcc/$target_noncanonical/$gcc_version \ - /usr/lib/gcc/$target_noncanonical \ - $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ - $test_prefix/$target_noncanonical/bin" - else - test_dirs= - fi + ;; +esac +fi +gcc_cv_ld=$ac_cv_path_gcc_cv_ld - if test x$build = x$target; then - test_dirs="$test_dirs \ - /usr/libexec \ - /usr/ccs/gcc \ - /usr/ccs/bin \ - /udk/usr/ccs/bin \ - /bsd43/usr/lib/cmplrs/cc \ - /usr/cross64/usr/bin \ - /usr/lib/cmplrs/cc \ - /sysv/usr/lib/cmplrs/cc \ - /svr4/usr/lib/cmplrs/cc \ - /usr/bin" - fi +if test -n "$gcc_cv_ld"; then + echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 +echo "${ECHO_T}$gcc_cv_ld" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$gcc_cv_ld" && break +done +test -n "$gcc_cv_ld" || gcc_cv_ld="$gcc_cv_tool_prefix/$default_tool_name$build_exeext" - for dir in $test_dirs; do - if test -x $dir/ld$build_exeext; then - gcc_cv_ld=$dir/ld$build_exeext - break; - fi - done fi +test "$silent" != yes && exec 6>&1 + +ORIGINAL_LD_FOR_TARGET="$gcc_cv_ld" + +echo "$as_me:$LINENO: checking what linker to use" >&5 +echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 case $in_tree_ld in yes) echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 @@ -13051,25 +13185,129 @@ esac # Figure out what nm we will be using. gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils -echo "$as_me:$LINENO: checking what nm to use" >&5 -echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 in_tree_nm=no -if test -x nm$build_exeext; then - gcc_cv_nm=./nm$build_exeext -elif test -f $gcc_cv_binutils_srcdir/configure.in \ +gcc_cv_nm= +if test -f $gcc_cv_binutils_srcdir/configure.in \ && test -f ../binutils/Makefile; then # Single tree build which includes binutils. in_tree_nm=yes + gcc_cv_nm=../binutils/nm-new$build_exeext +elif test -x nm$build_exeext; then gcc_cv_nm=./nm$build_exeext - rm -f nm$build_exeext - $LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null -elif test "x$program_prefix" != xNONE; then - gcc_cv_nm=${program_prefix}nm$build_exeext -elif test x$build != x$host && test x$build != x$target; then - gcc_cv_nm=${target_noncanonical}-nm$build_exeext +fi + + + + + +exec 6>/dev/null +for ac_prog in nm +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_nm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext + case $gcc_cv_nm in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $gcc_cv_tool_dirs +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac fi +gcc_cv_nm=$ac_cv_path_gcc_cv_nm + +if test -n "$gcc_cv_nm"; then + echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 +echo "${ECHO_T}$gcc_cv_nm" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$gcc_cv_nm" && break +done + +if test "x$gcc_cv_nm" = x; then + # If the loop above did not find a tool, then use whatever + # one we can find in the users's path. We are looking for a + # ${build} -> ${target} tool. + if test "x$program_prefix" != xNONE; then + default_tool_name=${program_prefix}nm + elif test x$build != x$host && test x$build != x$target; then + default_tool_name=${target_noncanonical}-nm + else + default_tool_name=`echo nm | sed "${program_transform_name}"` + fi + for ac_prog in $default_tool_name +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_nm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_nm in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +gcc_cv_nm=$ac_cv_path_gcc_cv_nm + +if test -n "$gcc_cv_nm"; then + echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 +echo "${ECHO_T}$gcc_cv_nm" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$gcc_cv_nm" && break +done +test -n "$gcc_cv_nm" || gcc_cv_nm="$gcc_cv_tool_prefix/$default_tool_name$build_exeext" + +fi +test "$silent" != yes && exec 6>&1 + +ORIGINAL_NM_FOR_TARGET="$gcc_cv_nm" + +echo "$as_me:$LINENO: checking what nm to use" >&5 +echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 case $in_tree_nm in yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 echo "${ECHO_T}\"newly built nm\"" >&6 ;; @@ -13087,9 +13325,7 @@ elif test -f $gcc_cv_binutils_srcdir/configure.in \ && test -f ../binutils/Makefile; then # Single tree build which includes binutils. in_tree_objdump=yes - gcc_cv_objdump=./objdump$build_exeext - rm -f objdump$build_exeext - $LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null + gcc_cv_objdump=../binutils/objdump$build_exeext elif test "x$program_prefix" != xNONE; then gcc_cv_objdump=${program_prefix}objdump$build_exeext elif test x$build != x$host && test x$build != x$target; then @@ -16349,6 +16585,12 @@ s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t s,@STMP_FIXINC@,$STMP_FIXINC,;t t s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t s,@collect2@,$collect2,;t t +s,@gcc_cv_as@,$gcc_cv_as,;t t +s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t +s,@gcc_cv_ld@,$gcc_cv_ld,;t t +s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t +s,@gcc_cv_nm@,$gcc_cv_nm,;t t +s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t s,@libgcc_visibility@,$libgcc_visibility,;t t s,@GGC@,$GGC,;t t s,@zlibdir@,$zlibdir,;t t |