This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: Bug building cross compilers from gcc 3.0: test -x $AS in configure.in


On Thu, Jun 28, 2001 at 11:49:36PM -0700, Daniel Jacobowitz wrote:
> I just built a host-x-host cross from i386-linux to mipsel-linux.  In the
> environment, I have AS=mips_fp_le-as, and that's in my $PATH.  Reasonable,
> right?
> 
> Two problems, though.  One:
> if test -x "$DEFAULT_ASSEMBLER"; then
>         gcc_cv_as="$DEFAULT_ASSEMBLER"
> elif test -x "$AS"; then
>         gcc_cv_as="$AS"
> elif test -x as$host_exeext; then
>         # Build using assembler in the current directory.
>         gcc_cv_as=./as$host_exeext
> elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
> 
> 
> Oops.  test -x "$AS" is definitely false.  The value of $AS will thus be
> ignored.  But wait!  It gets better!
> 
> if test "x$gcc_cv_as" = x -a x$host = x$target; then
>         # Native build.
>         # 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.
> 
> $host = $target does not imply a native build at this stage, sorry.  Picking
> up /usr/bin/as, which is what happens, is completely wrong.  I'm not sure
> what to do about the tests that actually run the assembler to determine what
> it can emit, though.  The one that's biting me now is dwarf2 .loc support; I
> happened to be using binutils 2.10.91 instead of 2.11.2, but the build
> system had 2.11.2.  The build system supports .loc; GCC is built thinking
> that the host system will.
> 
> What do we do?  Assume the target assembler has all features and require
> upgrades?  Certainly wouldn't want to assume negatives on things like weak
> support!

Just to follow up on myself... it isn't clear which assembler these things are
trying to test.  Mostly, though, they want to know the features of the
assembler which will be used with this GCC.  $AS should always be a
$build program (barring the full-path question).  It's not a $host
program.

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


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