* (toplevel) Don't look for unprefixed tools unless they're appropriate @ 2002-12-27 23:29 Nathanael Nerode 2002-12-28 1:01 ` Alexandre Oliva 2002-12-28 8:17 ` Doug Evans 0 siblings, 2 replies; 5+ messages in thread From: Nathanael Nerode @ 2002-12-27 23:29 UTC (permalink / raw) To: gcc-patches, binutils, gdb-patches Tested on i686-pc-linux-gnu with a Canadian cross. Now if the prefixed tools can't be found (and the unprefixed tools are incorrect), the tool values default to blank, which will cause entirely different errors. (Heh.) I'd rather have them default "correctly", but that's somewhat less trivial, and it's really only useful for people who 'configure', relocate, and then 'make', which doesn't work anyway. * configure.in: Don't default to unprefixed tools unless the native tools will work. * configure: Regenerate. Index: configure.in =================================================================== RCS file: /cvs/gcc/gcc/configure.in,v retrieving revision 1.200 diff -u -r1.200 configure.in --- configure.in 28 Dec 2002 06:57:48 -0000 1.200 +++ configure.in 28 Dec 2002 07:12:02 -0000 @@ -2008,15 +2008,15 @@ AC_SUBST(config_shell) # Host tools. -AC_CHECK_TOOL(AR, ar) -AC_CHECK_TOOL(AS, as) -AC_CHECK_TOOL(DLLTOOL, dlltool) -AC_CHECK_TOOL(LD, ld) -AC_CHECK_TOOL(NM, nm) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(WINDRES, windres) -AC_CHECK_TOOL(OBJCOPY, objcopy) -AC_CHECK_TOOL(OBJDUMP, objdump) +NCN_STRICT_CHECK_TOOL(AR, ar) +NCN_STRICT_CHECK_TOOL(AS, as) +NCN_STRICT_CHECK_TOOL(DLLTOOL, dlltool) +NCN_STRICT_CHECK_TOOL(LD, ld) +NCN_STRICT_CHECK_TOOL(NM, nm) +NCN_STRICT_CHECK_TOOL(RANLIB, ranlib, :) +NCN_STRICT_CHECK_TOOL(WINDRES, windres) +NCN_STRICT_CHECK_TOOL(OBJCOPY, objcopy) +NCN_STRICT_CHECK_TOOL(OBJDUMP, objdump) AC_SUBST(CC) AC_SUBST(CXX) AC_SUBST(CFLAGS) @@ -2026,13 +2026,13 @@ AC_SUBST(DEFAULT_M4) # Target tools. -NCN_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar) -NCN_CHECK_TARGET_TOOL(AS_FOR_TARGET, as) -NCN_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool) -NCN_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld) -NCN_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm) -NCN_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :) -NCN_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres) +NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar) +NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as) +NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool) +NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld) +NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm) +NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :) +NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres) AC_SUBST(GCC_FOR_TARGET) AC_SUBST(FLAGS_FOR_TARGET) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (toplevel) Don't look for unprefixed tools unless they're appropriate 2002-12-27 23:29 (toplevel) Don't look for unprefixed tools unless they're appropriate Nathanael Nerode @ 2002-12-28 1:01 ` Alexandre Oliva 2002-12-28 7:48 ` Doug Evans 2002-12-28 8:17 ` Doug Evans 1 sibling, 1 reply; 5+ messages in thread From: Alexandre Oliva @ 2002-12-28 1:01 UTC (permalink / raw) To: Nathanael Nerode; +Cc: gcc-patches, binutils, gdb-patches On Dec 28, 2002, Nathanael Nerode <neroden@twcny.rr.com> wrote: > Tested on i686-pc-linux-gnu with a Canadian cross. Now if the > prefixed tools can't be found (and the unprefixed tools are incorrect), > the tool values default to blank, which will cause entirely different > errors. (Heh.) Hmm... I don't quite like a blank default. I'd much rather default to <host/target>-<tool>, since this at least gives the user the opportunity to adjust PATH after configure, and gives more of an idea of what's going on. > * configure.in: Don't default to unprefixed tools unless > the native tools will work. > * configure: Regenerate. Nevertheless, this patch is correct, and approved. The change in the default should be addressed as a separate patch. Thanks, -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (toplevel) Don't look for unprefixed tools unless they're appropriate 2002-12-28 1:01 ` Alexandre Oliva @ 2002-12-28 7:48 ` Doug Evans 2002-12-28 9:58 ` Alexandre Oliva 0 siblings, 1 reply; 5+ messages in thread From: Doug Evans @ 2002-12-28 7:48 UTC (permalink / raw) To: Alexandre Oliva; +Cc: Nathanael Nerode, gcc-patches, binutils, gdb-patches Alexandre Oliva writes: > On Dec 28, 2002, Nathanael Nerode <neroden@twcny.rr.com> wrote: > > > Tested on i686-pc-linux-gnu with a Canadian cross. Now if the > > prefixed tools can't be found (and the unprefixed tools are incorrect), > > the tool values default to blank, which will cause entirely different > > errors. (Heh.) > > Hmm... I don't quite like a blank default. I'd much rather default > to <host/target>-<tool>, since this at least gives the user the > opportunity to adjust PATH after configure, and gives more of an idea > of what's going on. Agreed! ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (toplevel) Don't look for unprefixed tools unless they're appropriate 2002-12-28 7:48 ` Doug Evans @ 2002-12-28 9:58 ` Alexandre Oliva 0 siblings, 0 replies; 5+ messages in thread From: Alexandre Oliva @ 2002-12-28 9:58 UTC (permalink / raw) To: Doug Evans; +Cc: Nathanael Nerode, gcc-patches, binutils, gdb-patches [-- Attachment #1: Type: text/plain, Size: 1322 bytes --] On Dec 28, 2002, Doug Evans <dje@transmeta.com> wrote: > Alexandre Oliva writes: >> On Dec 28, 2002, Nathanael Nerode <neroden@twcny.rr.com> wrote: >> >> > Tested on i686-pc-linux-gnu with a Canadian cross. Now if the >> > prefixed tools can't be found (and the unprefixed tools are incorrect), >> > the tool values default to blank, which will cause entirely different >> > errors. (Heh.) >> >> Hmm... I don't quite like a blank default. I'd much rather default >> to <host/target>-<tool>, since this at least gives the user the >> opportunity to adjust PATH after configure, and gives more of an idea >> of what's going on. > Agreed! Ok, this is what I'm checking in, after verifying that it does the right thing on native, cross, host-x-host and host-x-build set ups, namely, if host/target == build, default to the program name without prefix, otherwise prefix it with the host/target tool prefix. I predict we're going to have a *lot* of trouble when we switch to autoconf 2.5x in the top level. The way build/host/target_alias is defined has changed, and we're going to have to duplicate the logic autoconf uses for defaulting system names to pass the right arguments down. Eeek :-( I knew that right when the changes were introduced in autoconf, but I couldn't stop them, and then I had forgotten. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: toplev-conf.patch --] [-- Type: text/x-patch, Size: 2827 bytes --] Index: ChangeLog from Alexandre Oliva <aoliva@redhat.com> * configure.in (host_configargs): Replace reference to no-longer-defined buildopts with --build=${build_alias}. * configure: Rebuilt. Index: configure.in =================================================================== RCS file: /cvs/gcc/gcc/configure.in,v retrieving revision 1.201 diff -u -p -r1.201 configure.in --- configure.in 28 Dec 2002 09:12:19 -0000 1.201 +++ configure.in 28 Dec 2002 17:28:42 -0000 @@ -1752,7 +1752,7 @@ case "${cache_file}" in cache_file_option="--cache-file=../${cache_file}" ;; esac -host_configargs="${cache_file_option} ${buildopt} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}" +host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}" target_configargs=${baseargs} Index: config/ChangeLog from Alexandre Oliva <aoliva@redhat.com> * acx.m4: Name cache variables properly. (NCN_STRICT_CHECK_TOOL): If program is not found and value-if-not-found is empty, use ${ncn_tool_prefix}$2 or $2, depending on whether build != host or not. (NCN_STRICT_CHECK_TARGET_TOOL): Ditto, with the target prefix. Index: config/acx.m4 =================================================================== RCS file: /cvs/gcc/gcc/config/acx.m4,v retrieving revision 1.1 diff -u -p -r1.1 acx.m4 --- config/acx.m4 28 Dec 2002 06:57:49 -0000 1.1 +++ config/acx.m4 28 Dec 2002 17:28:42 -0000 @@ -24,9 +24,9 @@ if test -n "$ncn_target_tool_prefix"; th [${ncn_target_tool_prefix}$2], , [$4]) fi if test -z "$ac_cv_prog_$1" ; then - ncn_ct_$1=$$1 - AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) - $1=$ncn_ct_$1 + ncn_cv_$1=$$1 + AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [$3], [$4]) + $1=$ncn_cv_$1 else $1="$ac_cv_prog_$1" fi @@ -45,11 +45,11 @@ if test -n "$ncn_tool_prefix"; then fi if test -z "$ac_cv_prog_$1" ; then if test $build = $host ; then - ncn_ct_$1=$$1 - AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) - $1=$ncn_ct_$1 + ncn_cv_$1=$$1 + AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4]) + $1=$ncn_cv_$1 else - $1="$3" + $1="ifelse([$3],[],[${ncn_tool_prefix}$2],[$3])" fi else $1="$ac_cv_prog_$1" @@ -69,15 +69,13 @@ if test -n "$ncn_target_tool_prefix"; th fi if test -z "$ac_cv_prog_$1" ; then if test $build = $target ; then - ncn_ct_$1=$$1 - AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) - $1=$ncn_ct_$1 + ncn_cv_$1=$$1 + AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4]) + $1=$ncn_cv_$1 else - $1="$3" + $1="ifelse([$3],[],[${ncn_target_tool_prefix}$2],[$3])" fi else $1="$ac_cv_prog_$1" fi ]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL - - [-- Attachment #3: Type: text/plain, Size: 289 bytes --] -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer ^ permalink raw reply [flat|nested] 5+ messages in thread
* (toplevel) Don't look for unprefixed tools unless they're appropriate 2002-12-27 23:29 (toplevel) Don't look for unprefixed tools unless they're appropriate Nathanael Nerode 2002-12-28 1:01 ` Alexandre Oliva @ 2002-12-28 8:17 ` Doug Evans 1 sibling, 0 replies; 5+ messages in thread From: Doug Evans @ 2002-12-28 8:17 UTC (permalink / raw) To: Nathanael Nerode; +Cc: gcc-patches, binutils, gdb-patches Nathanael Nerode writes: > I'd rather have them default "correctly", but that's somewhat less > trivial, and it's really only useful for people who 'configure', > relocate, and then 'make', which doesn't work anyway. What do you mean by "relocate"? ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-12-28 17:56 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-12-27 23:29 (toplevel) Don't look for unprefixed tools unless they're appropriate Nathanael Nerode 2002-12-28 1:01 ` Alexandre Oliva 2002-12-28 7:48 ` Doug Evans 2002-12-28 9:58 ` Alexandre Oliva 2002-12-28 8:17 ` Doug Evans
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox