This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Updating top-level autoconf to 2.59


On Thu, Feb 08, 2007 at 02:47:20AM -0200, Alexandre Oliva wrote:
> On Feb  7, 2007, "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> 
> > With this patch, configuring with --build=i686-pc-linux-gnu 
> > --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu all specified 
> > explicitly results in i686-pc-linux-gnu-gcc and 
> > i686-pc-linux-gnu-i686-pc-linux-gnu-gcc being installed but no plain 
> > "gcc".
> 
> I don't see how this could be a side effect of Dan's patch (not that I
> looked very hard into it).  I do know autoconf 2.5x is different from
> autoconf 2.13 in this regard (see node 'Hosts and Cross-Compilation'
> in the autoconf manual for the gory details), but I'd have thought
> that this change would have affected us a long time ago, when the gcc
> subdir switched to autoconf 2.5x.  Is that not so?

We hit it then too, and fixed it with this bit of configure.in:
# Also, because we want to override the logic in subdir configure scripts to
# choose program_transform_name, replace any s,x,x, with s,y,y,.

Here's why we're seeing it again, from gcc/Makefile:

# Actual name to use when installing a native compiler.
GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
GCC_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcc|sed '$(program_transform_name)')

So now program_transform_name is different in yet another way. We can
fix GCC (just gcc - I am pretty sure no other subdirectories play this
trick) by adjusting those variables, or we can fix GCC by adjusting the
decision of when to consider something a cross compiler (which would
give us just i686-pc-linux-gnu-gcc in this example), or we can suppress
the addition of ${target_alias}- in this case.

I sort of like the second option but it is definitely a big project;
the right way would be to replace the "$host != $target" check in
gcc/configure.ac with a "--target was passed" check, which in turn
requires updating the top level Makefile to only pass down necessary
arguments.  Then we'd have the real autoconf 2.5x behavior where
--host and --target would always give you a cross compiler, regardless
of what host and target were.

It's more practical to suppress the change in $program_prefix.  I'll
test a patch for that.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]