This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more infromation.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Ryan Kirkpatrick wrote: > 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. I'm not an expert on the internals of the gcc build system, but as far as I know the native compiler should not be using the specs file in the current directory. It should be using the specs file in usr/lib/... (eg. /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs). "gcc -v" will tell you which specs file is being used. gcc only overrides the default if the -specs option is given on the command line. Brendan Simon. ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |