GCC Cross Crompiler- libgcc compilation problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
johniak
Posts: 3
Joined: Wed Apr 17, 2013 4:47 pm

GCC Cross Crompiler- libgcc compilation problem

Post by johniak »

Hi

I tried to compile cross compile on my ubuntu, so i found http://wiki.osdev.org/GCC_Cross-Compiler this tutorial and do it step by step, and when i want to make libgcc I just put
make all-target-libgcc
in my terminal, and it throws an error

Code: Select all

checking for i586-elf-gcc...  /usr/src/build-gcc/./gcc/xgcc -B/usr/src/build-gcc/./gcc/ -B/usr/local/cross/i586-elf/bin/ -B/usr/local/cross/i586-elf/lib/ -isystem /usr/local/cross/i586-elf/include -isystem /usr/local/cross/i586-elf/sys-include   
checking for suffix of object files... configure: error: in `/usr/src/build-gcc/i586-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make: *** [configure-target-libgcc] Error 1

I attach part config.log to

Code: Select all

gcc version 4.8.0 (GCC) 
configure:3358: $? = 0
configure:3347:  /usr/src/build-gcc/./gcc/xgcc -B/usr/src/build-gcc/./gcc/ -B/usr/local/cross/i586-elf/bin/ -B/usr/local/cross/i586-elf/lib/ -isystem /usr/local/cross/i586-elf/include -isystem /usr/local/cross/i586-elf/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3358: $? = 1
configure:3347:  /usr/src/build-gcc/./gcc/xgcc -B/usr/src/build-gcc/./gcc/ -B/usr/local/cross/i586-elf/bin/ -B/usr/local/cross/i586-elf/lib/ -isystem /usr/local/cross/i586-elf/include -isystem /usr/local/cross/i586-elf/sys-include    -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3358: $? = 1
configure:3374:  /usr/src/build-gcc/./gcc/xgcc -B/usr/src/build-gcc/./gcc/ -B/usr/local/cross/i586-elf/bin/ -B/usr/local/cross/i586-elf/lib/ -isystem /usr/local/cross/i586-elf/include -isystem /usr/local/cross/i586-elf/sys-include    -o conftest -g -O2   conftest.c  >&5
/usr/src/build-gcc/./gcc/as: 87: exec: -o: not found
configure:3377: $? = 1
configure:3565: checking for suffix of object files
configure:3587:  /usr/src/build-gcc/./gcc/xgcc -B/usr/src/build-gcc/./gcc/ -B/usr/local/cross/i586-elf/bin/ -B/usr/local/cross/i586-elf/lib/ -isystem /usr/local/cross/i586-elf/include -isystem /usr/local/cross/i586-elf/sys-include    -c -g -O2  conftest.c >&5
/usr/src/build-gcc/./gcc/as: 87: exec: -o: not found
configure:3591: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3605: error: in `/usr/src/build-gcc/i586-elf/libgcc':
configure:3608: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
if I should I can of course upload whole config.log

I dont know what i am doing wrong, sory if do some mistakes.

Thank you in advance
FusT
Member
Member
Posts: 91
Joined: Wed Sep 19, 2012 3:43 am
Location: The Netherlands

Re: GCC Cross Crompiler- libgcc compilation problem

Post by FusT »

Have you tried the solution described here?
http://stackoverflow.com/questions/1150 ... ot-compile
johniak
Posts: 3
Joined: Wed Apr 17, 2013 4:47 pm

Re: GCC Cross Crompiler- libgcc compilation problem

Post by johniak »

I didn't try it. Yesterday before your reply, I change version of gcc from 4.8 to 4.6.2 and it's works fine.
Post Reply