diff options
author | James E Wilson <wilson@specifixinc.com> | 2004-07-13 02:21:30 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2004-07-12 19:21:30 -0700 |
commit | f6a874ac425769d67bd9a0a0cf66719d7ae1bef7 (patch) | |
tree | 12fc7238632addf198d0d2797762a9de93153f28 /gcc | |
parent | d7ae4c28e00b8aeab7f0e67a96ec7ac342fbb9b2 (diff) | |
download | gcc-f6a874ac425769d67bd9a0a0cf66719d7ae1bef7.zip gcc-f6a874ac425769d67bd9a0a0cf66719d7ae1bef7.tar.gz gcc-f6a874ac425769d67bd9a0a0cf66719d7ae1bef7.tar.bz2 |
Fix NM/AR propagation from toplevel for recursive makes.
* Makefile.in (AR): Use @AR@ not ar.
(NM): New.
(AR_FOR_TARGET): Use $(AR) not ar for native.
(NM_FOR_TARGET): Use $(NM) not nm for native.
* configure.ac: Add AC_CHECK_PROG calls for NM and AR.
* configure: Regenerate.
From-SVN: r84600
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/Makefile.in | 7 | ||||
-rwxr-xr-x | gcc/configure | 89 | ||||
-rw-r--r-- | gcc/configure.ac | 15 |
4 files changed, 116 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b7c5f69..f512126 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2004-07-12 James E Wilson <wilson@specifixinc.com> + + * Makefile.in (AR): Use @AR@ not ar. + (NM): New. + (AR_FOR_TARGET): Use $(AR) not ar for native. + (NM_FOR_TARGET): Use $(NM) not nm for native. + * configure.ac: Add AC_CHECK_PROG calls for NM and AR. + * configure: Regenerate. + 2004-07-12 David S. Miller <davem@nuts.davemloft.net> * config/sparc/sparc.md (ashlsi3): Eliminate const 1 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 6d55e06..b9c0619 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -221,8 +221,9 @@ BISON = @BISON@ BISONFLAGS = FLEX = @FLEX@ FLEXFLAGS = -AR = ar +AR = @AR@ AR_FLAGS = rc +NM = @NM@ RANLIB = @RANLIB@ RANLIB_FLAGS = @ranlib_flags@ @@ -326,7 +327,7 @@ AR_FOR_TARGET := $(shell \ echo $(objdir)/../binutils/ar ; \ else \ if [ "$(host)" = "$(target)" ] ; then \ - echo ar; \ + echo $(AR); \ else \ t='$(program_transform_name)'; echo ar | sed -e $$t ; \ fi; \ @@ -351,7 +352,7 @@ NM_FOR_TARGET := $(shell \ echo $(objdir)/../binutils/nm-new ; \ else \ if [ "$(host)" = "$(target)" ] ; then \ - echo nm; \ + echo $(NM); \ else \ t='$(program_transform_name)'; echo nm | sed -e $$t ; \ fi; \ diff --git a/gcc/configure b/gcc/configure index 8a4b828..5bcc13a 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 build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER EGREP 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 stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT ANDER BANSHEEINC BANSHEELIB 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 gcc_version gcc_version_full gcc_version_trigger 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 symbolic_link 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 target_noncanonical 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 build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER EGREP 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 LIBICONV_DEP manext objext gthread_flags extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT ANDER BANSHEEINC BANSHEELIB 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 gcc_version gcc_version_full gcc_version_trigger 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 symbolic_link 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 target_noncanonical c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' # Initialize some variables set by options. @@ -5372,6 +5372,91 @@ fi fi +# NM +if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c; then + NM='$(objdir)/../binutils/nm-new' +else + # Extract the first word of "nm", so it can be a program name with args. +set dummy nm; 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_prog_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # Let the user override the test. +else +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_prog_NM="nm" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" +fi +fi +NM=$ac_cv_prog_NM +if test -n "$NM"; then + echo "$as_me:$LINENO: result: $NM" >&5 +echo "${ECHO_T}$NM" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi + +# AR +if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c; then + AR='$(objdir)/../binutils/ar' +else + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; 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_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +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_prog_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi + + # -------------------- # Checks for C headers # -------------------- @@ -12898,6 +12983,8 @@ s,@BUILD_INFO@,$BUILD_INFO,;t t s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t s,@FLEX@,$FLEX,;t t s,@BISON@,$BISON,;t t +s,@NM@,$NM,;t t +s,@AR@,$AR,;t t s,@stage1_cflags@,$stage1_cflags,;t t s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t diff --git a/gcc/configure.ac b/gcc/configure.ac index 2029b7b..7a2fbb7 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -805,6 +805,21 @@ else AC_CHECK_PROG(BISON, bison, bison, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison) fi +# NM +if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c; then + NM='$(objdir)/../binutils/nm-new' +else + AC_CHECK_PROG(NM, nm, nm, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm) +fi + +# AR +if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c; then + AR='$(objdir)/../binutils/ar' +else + AC_CHECK_PROG(AR, ar, ar, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar) +fi + + # -------------------- # Checks for C headers # -------------------- |