Confusion on 'specs' file in m68k-aout cross compiler build...

Ryan Kirkpatrick eedesign@rkirkpat.net
Sat Apr 1 00:00:00 GMT 2000


	I am attempting to build a cross compiler for the m68k-aout target
(building a 68008 based computer for a college class, and don't want to
write the monitor in assembly :), on my Debian 2.2 potato (frozen/updated
2/26/2000) x86 machine. 
	I read through the crossgcc FAQ at least two times before even
attempting to build the corss compiler. I then downloaded binutils-2.9.1,
gcc-2.95.2, newlib-1.8.2, and gdb-4.18, and untarred them. I then used the
one-tree.sh script linked in the crossgcc FAQ to build a single directory
tree. I then executed the built-cross.sh script with the target of
'm68k-aout'. The result, after a while of compiling, was the error that
the '-c68020' option not recongized by as.
	So, first thing I did was run the gcc command that had caused this
error manually with the -v option, and saw that really the -mc68020 option
had been pased to as. Apparently a cosmetic bug in as somewhere... Now,
thinking that m68k-aout-as should have been used instead, I added a
-B/usr/local/m68k-aout/bin/ option to the gcc command and re-executed it.
Hmm.. the m68k-aout-as does not intel assembly code, wonder why? Ok, so
the system's as was the correct binary, and the option is wrong...
	Then found that option was being forced upon gcc in the 'specs'
file in the current directory. Removed said option from the specs file,
and now the gcc command works fine. Resumed the make, and it shortly died
that it could not find crt0.o when linking. Dug a bit, 'specs' file is
once again the cause, deleted that file all together (as it had been made
for m68k-aout-gcc, or xgcc as it was named locally), and ran the failed
linking, worked now.
	Ok, at this point, I went into the Makefile for the gcc
subdirectory, and added '-rm -f specs' as the first thing exected for the
makefile targets 'g++spec.o', 'intl.o', 'protoize.o', and got a cross
compiler in the end. Even removed my build directory, reran the configure
(just as stated in the crossgcc FAQ), edited the gcc subdirectory Makefile
as mentioned above, and ran 'make all LANUGAGES=c; make install
LANUAGES=c' successfully.
	So, it looks like specs file for the cross compiler is not being
moved out of the way when the system's gcc compiler is being used, and
that cross-compiler spec file is messing up the works. I know that my
solution is probably a pretty horrible hack, but it does work. Now, might
someone explain how this problem should be fixed cleanly? Thanks.

	PS. I have already scourged the archives for this mailing list
without finding anything that addresses this problem.

---------------------------------------------------------------------------
|   "For to me to live is Christ, and to die is gain."                    |
|                                            --- Philippians 1:21 (KJV)   |
---------------------------------------------------------------------------
|   Ryan Kirkpatrick  |  Boulder, Colorado  |  http://www.rkirkpat.net/   |
---------------------------------------------------------------------------


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list