first stab at a cross compiler ...
Kai Ruottu
kai.ruottu@wippies.com
Mon Apr 18 16:23:00 GMT 2011
15.4.2011 17:24, kevin diggs kirjoitti:
> I tried 4.3.5 with its fancy --with-build-time-tools configure option.
Hmmm, this seems to be for using some alternative tools, not the
default native ones in '/usr/bin'...
> This one died saying something about:
>
> undefined reference to `m68k_cpu_flags'
>
> while trying to link Tcollect2:
>
> make[2]: Entering directory `/home/kevdig/projects/GCC/obj-gcc-4.3.5-m68k/gcc'
> gcc -O2 -march=pentium3 -fomit-frame-pointer -DIN_GCC
> -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings
> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
> -Wmissing-format-attribute -pedantic -Wno-long-long
> -Wno-variadic-macros -Wno-overlength-strings
> -DHAVE_CONFIG_H -o Tcollect2 \
> collect2.o tlink.o intl.o version.o ../libcpp/libcpp.a
> ./libiberty/libiberty.a ../libdecnumber/libdecnumber.a
I seemingly had the same problem, the 'gcc/config/m68k/netbsd-elf.h' was
patched like :
---------------------- clip -----------------------------------------
*** netbsd-elf.h.orig 2007-08-02 13:49:31.000000000 +0300
--- netbsd-elf.h 2011-03-08 17:28:11.000000000 +0200
***************
*** 53,62 ****
--- 53,66 ----
#undef TARGET_VERSION
#define TARGET_VERSION \
+ fprintf (stderr, " (NetBSD/m68k ELF)");
+
+ /*
fprintf (stderr, \
TARGET_68010 \
? " (NetBSD/68010 ELF)" \
: " (NetBSD/m68k ELF)");
+ */
/* Provide a CPP_SPEC appropriate for NetBSD m68k targets. Currently we
---------------------- clip -----------------------------------------
The 'TARGET_68010' triggers looking at which the target CPU is...
But the code for the cross host shouldn't need to include these
things.
> This means 4.3.5 found all of its little internal binutils goodies, right!??
Yes, the build/host ones! The 'collect2' of course is an executable made
for the cross host just like 'xgcc', 'cc1', 'cc1plus',...
> How far did this one get?
Not far enough :(
More information about the Gcc-help
mailing list