Bug 26673

Summary: Bootstrap of GCC trunk failed when configured with --host=...
Product: gcc Reporter: Grigory Zagorodnev <grigory_zagorodnev>
Component: bootstrapAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P3    
Version: 4.2.0   
Target Milestone: 4.2.0   
Host: Target:
Build: x86_64-redhat-linux Known to work:
Known to fail: Last reconfirmed:

Description Grigory Zagorodnev 2006-03-14 07:05:24 UTC
Bootstrap of GCC trunk (revision 112028) failed on ia64, x86_64 and i686 when configured with --host=... option.


$ ../src/configure --prefix=/opt/gcc-42 --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --host=x86_64-redhat-linux  


$ make bootstrap >LOG
Makefile:13360: warning: overriding commands for target `restrap'
Makefile:12652: warning: ignoring old commands for target `restrap'
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
...
make[1]: x86_64-redhat-linux-ar: Command not found
Comment 1 Grigory Zagorodnev 2006-03-14 07:10:53 UTC
With recent version of 'configure', came in revision 112028, generated Makefile contains wrong tool names for the native build.

$ grep x86_64-redhat-linux Makefile
AS = x86_64-redhat-linux-as
AR = x86_64-redhat-linux-ar
CC = x86_64-redhat-linux-gcc
CXX = x86_64-redhat-linux-c++
Comment 2 Richard Biener 2006-03-14 10:27:36 UTC
if the output of config.guess does not match your --host=... string you are building a cross compiler.  Try making those match or also specify --build.
Comment 3 Grigory Zagorodnev 2006-03-14 13:32:21 UTC
It appears that configuration scheme changed in revision 112028 of trunk without any notice. 

[trunk revision 112027]
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]

[trunk revision 112028]
System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

Thus for my purpose I need --build instead of --host for the trunk.
Comment 4 Richard Biener 2006-03-14 13:35:33 UTC
Fixed.