configury assembler features

Daniel Jacobowitz drow@mvista.com
Tue Mar 19 20:46:00 GMT 2002


On Wed, Mar 20, 2002 at 01:25:53PM +1030, Alan Modra wrote:
> On Tue, Mar 19, 2002 at 09:33:06PM -0500, Daniel Jacobowitz wrote:
> > On Wed, Mar 20, 2002 at 12:44:05PM +1030, Alan Modra wrote:
> > > This patch allows gcc to find assembler capabilities when cross-
> > > compiling.  Also corrects the search dirs to use $target_alias rather
> > > than $target.
> > > 
> > > 	* configure.in (gcc_cv_as): Use $target_alias in directory searchs
> > > 	rather than $target.  Heed program_prefix and
> > > 	program_transform_name.  Search for gas in cross-compiler case too.
> > > 	"test -x" rather than "test -f".
> > > 	(gcc_cv_ld): Likewise.
> > > 	(gcc_cv_nm): Heed program_prefix and program_transform_name.
> > > 	(gcc_cv_objdump): Likewise.
> > > 	* configure: Regenerate.
> > 
> > I'm glad you did this.  I had a whole long message about a problem with
> > it, which I can no longer find.  I've still got one concern, but you
> > didn't introduce it: host-x-host crosses.  $host = $target doesn't
> > imply that $build has any relation to either, and you can easily find
> > the $build assembler here.  I build GCC on an i386-linux build for a
> > mipsel-linux host, so program_prefix et al will not be used, and you'll
> > just find my system assembler.
> 
> Hmm, yes.  We obviously can't run the assembler and other tools to
> find their capabilities when $build != $host.  I'll modify the patch
> to do:
> 
> if test "x$gcc_cv_as" = x -a $build = $host; then
> 
> and similarly elsewhere.

That's probably the best solution, yeah.

> > I don't suppose I could persuade you to search $PATH in:
> > if test -x "$DEFAULT_ASSEMBLER"; then
> >         gcc_cv_as="$DEFAULT_ASSEMBLER"
> > elif test -x "$AS"; then
> >         gcc_cv_as="$AS"
> > 
> > ?  Then you'll probably find the cross-assembler, and test -its-
> > features, which is better than testing the build assembler at least.
> 
> Safer to specify the full path in $DEFAULT_ASSEMBLER or $AS.

This should be documented somewhere (it's what I eventually figured
out...) especially as it is traditional to pass just a program name for
such things in autoconf-land.  $AS isn't even mentioned in the
manual, and  --with-as= is detrimental - it breaks relocatable install
trees.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gcc-patches mailing list