Compiling gcc-2.95.2 for use as m68k cross compiler

Kai Ruottu
Fri Mar 2 02:23:00 GMT 2001

Mark Palmerino wrote:
> I am taking Kai's gentle suggestions to consider using gcc-2.95.2 as the
> base for building a cross-compiler with the target of m68k-coff.  I am in
> that process now.
> I have run into a problem that I'm hoping someone might suggest a solution
> for. Here is the output during the make where it stops. It seems that there
> is a "configure error" when checking whether the C compiler works. The funny
> thing though is that I think it was working in the make before this point.

 Of course the compiler works, but the linking doesn't work... How else it could
be ?

> configure: error: installation or configuration problem: C compiler cannot
> create executables.

 The compiler doesn't create executables, it only compiles the source into
an assembly source...

> checking whether the C compiler (/h/crossgcc/build-gcc295/gcc/xgcc
> -B/h/crossgcc/build-gcc295/gcc/ -B/usr/local/m68k-coff/bin/ -g -O2 ) works... no
> configure: error: installation or configuration problem: C compiler cannot
> create executables.

 If you look at the '-B/usr/local/m68k-coff/bin/' in the command line, you will
see that there must be something really wrong with the search paths for 'xgcc' !!!
Otherwise this wouldn't be here. It helps the 'xgcc' to find the 'as' and 'ld' when
building a compiler if they are in the '$prefix/$target/bin'. The '/usr/lib' and
'/usr/include' will be found automatically for a native compiler. Nothing else for
a cross-compile included...

 All the target stuff is accessed via the '$prefix/lib/gcc-lib/$target/2.95.x' with
gcc-2.95.x, like the target headers:

E:\usr\local\lib\gcc-lib\m68k-coff\2_95.3>cpp0 -v
GNU CPP version 2.95.3 20010101 (prerelease) (68k, Motorola syntax)
#include "..." search starts here:
#include <...> search starts here:
End of search list.

 So the workaround for gcc-2.95.2 in your case is the pre-creation of the:


 Then and only then the target stuff will be found by the 'xgcc'...

 You must also fix the 'specs' just as you did with the gcc-2.8.1. Everything
is the same as with it, the BCC as the target, using a linker script --- you
can use the 'rm_rom.ld' now, and so on... I would suggest you to use the prebuilt
libs and headers from the Objsw-package, or to install the GCC in this phase,
leaving the libiberty and libstdc++ builds later, and building & installing
newlib with your new GCC. It really is ready now, the extra libs are only
missing. I prefer to install with my own install template, but 'make all-install-gcc'
or something which installs only the stuff in the 'gcc' subdir, should work...

Cheers, Kai

PS. I will disappear to a skiing vacation for a week, but not taking no other
'plasm expanders' than just a little ethyl-alcohol, mixed into beer, I'll promise...
Perhaps mixed into a little brandy too because of the under 20 Celsius temperature
(meaning 'cognac', people here don't prefer 'brandy' at all, it is much cheaper
and so on, if they don't see the bottle, they seldom taste the difference...)

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list