OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Mar 19, 2024 1:08 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Cannot compile libgcc
PostPosted: Thu Feb 04, 2016 12:09 pm 
Offline
Member
Member

Joined: Fri Jan 30, 2015 4:57 pm
Posts: 215
Location: Germany
I want to build crosscompiler (i686-elf-gcc, with c and c++ support). After fiddling with mingw I switched to cygwin x86, using Windows 7 x64 with gcc 4.9.3 and binutils 2.25.
Building binutils and gcc 4.9.2 finished successfully, however compiling libgcc results in the following error message after a while:
Code:
checking for suffix of object files... configure: error: in `/home/Administrator
/build-gcc/i686-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
Makefile:10804: rule for target "configure-target-libgcc" failed
make: *** [configure-target-libgcc] Error 1


Things I did:
-> followed the local osdev crosscompiler tutorial and compiled binutils and gcc with the exact same commands
-> within the same console session I tried to build libgcc (using make all-target-libgcc)

I'm curious: building binutils and gcc worked, libgcc failed.
Thats the shortened content of said config.log:
Code:

  $ /home/Administrator/gcc-4.9.2/libgcc/configure --cache-file=./config.cache --enable-multilib --with-cross-host=i686-pc-cygwin --prefix=/home/Administrator/opt/cross --disable-nls --without-headers --enable-languages=c,c++,lto --program-transform-name=s&^&i686-elf-& --disable-option-checking --with-target-subdir=i686-elf --build=i686-pc-cygwin --host=i686-elf --target=i686-elf --srcdir=../../../gcc-4.9.2/libgcc

## --------- ##
## Platform. ##
## --------- ##

hostname = ostsee-PC
uname -m = i686
uname -r = 2.4.1(0.293/5/3)
uname -s = CYGWIN_NT-6.1-WOW
uname -v = 2016-01-24 11:24

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = i686
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /home/Administrator/opt/cross/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /cygdrive/c/ProgramData/Oracle/Java/javapath
PATH: /cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live
PATH: /cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live
PATH: /cygdrive/c/Windows/system32
PATH: /cygdrive/c/Windows
PATH: /cygdrive/c/Windows/System32/Wbem
PATH: /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static
PATH: /cygdrive/c/Program Files (x86)/Windows Live/Shared
PATH: /cygdrive/c/Users/Administrator/Documents/asmgf
PATH: /cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn
PATH: /cygdrive/c/Program Files (x86)/Lua/5.1
PATH: /cygdrive/c/Program Files (x86)/Lua/5.1/clibs
PATH: /cygdrive/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit
PATH: /cygdrive/c/Program Files (x86)/Skype/Phone
PATH: /cygdrive/c/bin
PATH: /usr/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1980: creating cache ./config.cache
configure:2163: checking build system type
configure:2177: result: i686-pc-cygwin
configure:2197: checking host system type
configure:2210: result: i686-pc-elf
configure:2307: checking for --enable-version-specific-runtime-libs
configure:2320: result: no
configure:2368: checking for a BSD-compatible install
configure:2436: result: /usr/bin/install -c
configure:2452: checking for gawk
configure:2479: result: gawk
configure:2579: checking for i686-elf-ar
configure:2606: result: i686-elf-ar
configure:2671: checking for i686-elf-lipo
configure:2698: result: i686-elf-lipo
configure:2763: checking for i686-elf-nm
configure:2790: result: /home/Administrator/build-gcc/./gcc/nm
configure:2855: checking for i686-elf-ranlib
configure:2882: result: i686-elf-ranlib
configure:2947: checking for i686-elf-strip
configure:2974: result: i686-elf-strip
configure:3036: checking whether ln -s works
configure:3040: result: yes
configure:3057: checking for i686-elf-gcc
configure:3084: result:  /home/Administrator/build-gcc/./gcc/xgcc -B/home/Administrator/build-gcc/./gcc/ -B/home/Administrator/opt/cross/i686-elf/bin/ -B/home/Administrator/opt/cross/i686-elf/lib/ -isystem /home/Administrator/opt/cross/i686-elf/include -isystem /home/Administrator/opt/cross/i686-elf/sys-include   
configure:3353: checking for C compiler version
configure:3362:  /home/Administrator/build-gcc/./gcc/xgcc -B/home/Administrator/build-gcc/./gcc/ -B/home/Administrator/opt/cross/i686-elf/bin/ -B/home/Administrator/opt/cross/i686-elf/lib/ -isystem /home/Administrator/opt/cross/i686-elf/include -isystem /home/Administrator/opt/cross/i686-elf/sys-include    --version >&5
xgcc (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3373: $? = 0
configure:3362:  /home/Administrator/build-gcc/./gcc/xgcc -B/home/Administrator/build-gcc/./gcc/ -B/home/Administrator/opt/cross/i686-elf/bin/ -B/home/Administrator/opt/cross/i686-elf/lib/ -isystem /home/Administrator/opt/cross/i686-elf/include -isystem /home/Administrator/opt/cross/i686-elf/sys-include    -v >&5
Reading specs from /home/Administrator/build-gcc/./gcc/specs
COLLECT_GCC=/home/Administrator/build-gcc/./gcc/xgcc
COLLECT_LTO_WRAPPER=/home/Administrator/build-gcc/./gcc/lto-wrapper.exe
Target: i686-elf
Configured with: ../gcc-4.9.2/configure --target=i686-elf --prefix=/home/Administrator/opt/cross --disable-nls --enable-languages=c,c++ --without-headers
Thread model: single
gcc version 4.9.2 (GCC)
configure:3373: $? = 0
configure:3362:  /home/Administrator/build-gcc/./gcc/xgcc -B/home/Administrator/build-gcc/./gcc/ -B/home/Administrator/opt/cross/i686-elf/bin/ -B/home/Administrator/opt/cross/i686-elf/lib/ -isystem /home/Administrator/opt/cross/i686-elf/include -isystem /home/Administrator/opt/cross/i686-elf/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3362:  /home/Administrator/build-gcc/./gcc/xgcc -B/home/Administrator/build-gcc/./gcc/ -B/home/Administrator/opt/cross/i686-elf/bin/ -B/home/Administrator/opt/cross/i686-elf/lib/ -isystem /home/Administrator/opt/cross/i686-elf/include -isystem /home/Administrator/opt/cross/i686-elf/sys-include    -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3389:  /home/Administrator/build-gcc/./gcc/xgcc -B/home/Administrator/build-gcc/./gcc/ -B/home/Administrator/opt/cross/i686-elf/bin/ -B/home/Administrator/opt/cross/i686-elf/lib/ -isystem /home/Administrator/opt/cross/i686-elf/include -isystem /home/Administrator/opt/cross/i686-elf/sys-include    -o conftest -g -O2   conftest.c  >&5
/home/Administrator/build-gcc/./gcc/as: line 106: exec: -o: invalid option
exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
configure:3392: $? = 1
configure:3580: checking for suffix of object files
configure:3602:  /home/Administrator/build-gcc/./gcc/xgcc -B/home/Administrator/build-gcc/./gcc/ -B/home/Administrator/opt/cross/i686-elf/bin/ -B/home/Administrator/opt/cross/i686-elf/lib/ -isystem /home/Administrator/opt/cross/i686-elf/include -isystem /home/Administrator/opt/cross/i686-elf/sys-include    -c -g -O2  conftest.c >&5
/home/Administrator/build-gcc/./gcc/as: line 106: exec: -o: invalid option
exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
configure:3606: $? = 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:3620: error: in `/home/Administrator/build-gcc/i686-elf/libgcc':
configure:3623: error: cannot compute suffix of object files: cannot compile

According to
Code:
/home/Administrator/build-gcc/./gcc/as: line 106: exec: -o: invalid option
there might be a bug??
Or: Does somebody has a working C++11 compliant gcc for x86 > i368 with libgcc and libsup++ ready to download? :P
Edit: Ah, there is a download page. I'll check that out.
Edit2: Now I got a precompiled compiler, so I don't need to make one by myself anymore :)


Top
 Profile  
 
 Post subject: Re: Cannot compile libgcc
PostPosted: Fri Feb 05, 2016 8:09 am 
Offline
Member
Member
User avatar

Joined: Wed Aug 05, 2015 5:33 pm
Posts: 159
Location: Drenthe, Netherlands
I know you're already using another precompiled compiler but I couldn't help wondering what went wrong. It's always nice to be able to roll your own.
Roflo wrote:
/home/Administrator/build-gcc/./gcc/as: line 106: exec: -o: invalid option
Were you really sure you compiled binutils properly and that i686-elf-as & friends were in your path?

_________________
"Always code as if the guy who ends up maintaining it will be a violent psychopath who knows where you live." - John F. Woods

Failed project: GoOS - https://github.com/nutterts/GoOS


Top
 Profile  
 
 Post subject: Re: Cannot compile libgcc
PostPosted: Fri Feb 05, 2016 9:03 am 
Offline
Member
Member

Joined: Fri Jan 30, 2015 4:57 pm
Posts: 215
Location: Germany
That might be the problem. Though the compiled binutils were in $path, they are not i686-elf-prefixed, for whatever reason.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group