This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

[patch] Avoid host assembler in canadian cross.


The gcc configure script incorrectly attempts to use the host assembler to
determine supported features when building a canadian cross. The comments
in configure.as say we want a build->target assembler, but then pick the
host->target assembler anyway. This then fails all the feature tests as we
can't execute it.

The patch below avoids looking for a host compiler when build != host.

Tested by building native i686-linux, cross to arm-none-elf and
canadian cross to arm-none-elf via sparc-sun-solaris, and checking
the correct assembler is picked.
Ok?

Paul

2004-10-12 Paul Brook  <paul@codesourcery.com>

 * configure.ac: Don't look for host assembler when building a canadian
 cross.
 * configure: Regenerate.

Index: configure.ac
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/configure.ac,v
retrieving revision 2.19.2.5
diff -u -p -r2.19.2.5 configure.ac
--- configure.ac 7 Oct 2004 19:05:40 -0000 2.19.2.5
+++ configure.ac 11 Oct 2004 21:56:18 -0000
@@ -1627,12 +1627,16 @@ if test "x$gcc_cv_as" = x; then
   gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
  fi
 
- test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
-     $test_prefix/libexec/gcc/$target_noncanonical \
-     /usr/lib/gcc/$target_noncanonical/$gcc_version \
-     /usr/lib/gcc/$target_noncanonical \
-     $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
-     $test_prefix/$target_noncanonical/bin"
+ if test x$host = x$build; then
+     test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
+         $test_prefix/libexec/gcc/$target_noncanonical \
+         /usr/lib/gcc/$target_noncanonical/$gcc_version \
+         /usr/lib/gcc/$target_noncanonical \
+         $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
+         $test_prefix/$target_noncanonical/bin"
+ else
+     test_dirs=
+ fi
 
  if test x$host = x$target; then
      test_dirs="$test_dirs \
@@ -1744,12 +1748,16 @@ if test "x$gcc_cv_ld" = x; then
   gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
  fi
 
- test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
-     $test_prefix/libexec/gcc/$target_noncanonical \
-     /usr/lib/gcc/$target_noncanonical/$gcc_version \
-     /usr/lib/gcc/$target_noncanonical \
-     $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
-     $test_prefix/$target_noncanonical/bin"
+ if test x$host = x$build; then
+     test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
+         $test_prefix/libexec/gcc/$target_noncanonical \
+         /usr/lib/gcc/$target_noncanonical/$gcc_version \
+         /usr/lib/gcc/$target_noncanonical \
+         $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
+         $test_prefix/$target_noncanonical/bin"
+ else
+     test_dirs=
+ fi
 
  if test x$host = x$target; then
      test_dirs="$test_dirs \


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