public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem building Solaris hosted PowerPC EABI cross compiler
@ 2002-08-01 14:27 Ron McCall
  2002-08-03 12:28 ` Ron McCall
  0 siblings, 1 reply; 2+ messages in thread
From: Ron McCall @ 2002-08-01 14:27 UTC (permalink / raw)
  To: GCC Help Mailing List

Hi,

I am having trouble building a powerpc-eabi targeted cross compiler on
my Sun Ultra 60 running Solaris 8.  I have read through a couple of
cross-GCC FAQs and through the GCC installation instructions but am
having no luck.  I am using native GCC (version 2.95.3) to build the
cross compiler.  I have done a fair amount of web searching on the error
messages that I am getting but I haven't been able to find a solution.
I have also tried a lot of different combinations of different versions
of binutils and gcc trying to determine if the problem was with the
latest versions (I even tried the exact versions mentioned in the FAQ
below).

Following the cross-GCC FAQ at the below URL (and substituting newer
version numbers for all components, changing the target to powerpc-eabi
and changing prefix to /opt/gcc-ppc-3.1.1), I have built and installed
binutils 2.12.1, built and installed a bootstrap GCC 3.1.1 and built and
installed newlib 1.10.0.  I am running into problems building the full
GCC.

http://crossgcc.billgatliff.com/crossgccfaq/t1.html

I wiped out the GCC build directory prior to re-configuring.  This seems
to be needed but isn't explicitly stated in the FAQ.  Configuration
succeeds but the following make does not.  It dies while "Configuring in
powerpc-eabi/libiberty" saying that:

checking whether the C compiler
(/export/home0/software/build/build-gcc/gcc/xgcc -B/export/home0/software/build/build-gcc/gcc/ -B/opt/gcc-ppc-3.1.1/powerpc-eabi/bin/ -B/opt/gcc-ppc-3.1.1/powerpc-eabi/lib/ -isystem /opt/gcc-ppc-3.1.1/powerpc-eabi/include -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make: *** [configure-target-libiberty] Error 1

Inspecting config.log in powerpc-eabi/libiberty reveals the following
error:

configure:2212: /export/home0/software/build/build-gcc/gcc/xgcc -B/export/home0/software/build/build-gcc/gcc/ -B/opt/gcc-ppc-3.1.1/powerpc-eabi/bin/ -B/opt/gcc-ppc-3.1.1/powerpc-eabi/lib/ -isystem /opt/gcc-ppc-3.1.1/powerpc-eabi/include -o
conftest -g -O2   conftest.c  1>&5
/opt/gcc-ppc-3.1.1/powerpc-eabi/bin/ld: warning: cannot find entry symbol _start; defaulting to 01800074
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o): In function `__eabi':
/export/home0/software/build/build-gcc/gcc/eabi.S:232: undefined reference to `__init'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:146: undefined reference to `__SDATA_START__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:148: undefined reference to `__SBSS_END__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:150: undefined reference to `__SDATA2_START__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:151: undefined reference to `__SBSS2_END__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:152: undefined reference to `__GOT_START__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:155: undefined reference to `__GOT_END__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:156: undefined reference to `__GOT2_START__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:157: undefined reference to `__GOT2_END__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:158: undefined reference to `__FIXUP_START__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:159: undefined reference to `__FIXUP_END__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:163: undefined reference to `__CTOR_LIST__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:164: undefined reference to `__CTOR_END__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:165: undefined reference to `__DTOR_LIST__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:166: undefined reference to `__DTOR_END__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:167: undefined reference to `__EXCEPT_START__'
/export/home0/software/build/build-gcc/gcc/libgcc.a(eabi.o):/export/home0/software/build/build-gcc/gcc/eabi.S:171: undefined reference to `__EXCEPT_END__'
collect2: ld returned 1 exit status
configure: failed program was:

#line 2207 "configure"
#include "confdefs.h"

main(){return(0);}

These undefined symbols sound like ld script symbols to me (not knowing
a whole lot) and also sort of C++ related (constructors, destructors,
exceptions).  Does anyone happen to know what I am doing wrong?  I
re-executed that failed xgcc command with a -v so I could see all the
various tool invocations and don't see anything more there that would
seem to help.  If you need to see that too, let me know and I'll post
it.

Thanks for the help!

-- 
Ron McCall
Sikorsky Aircraft
203-386-4695
rmccall@sikorsky.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem building Solaris hosted PowerPC EABI cross compiler
  2002-08-01 14:27 Problem building Solaris hosted PowerPC EABI cross compiler Ron McCall
@ 2002-08-03 12:28 ` Ron McCall
  0 siblings, 0 replies; 2+ messages in thread
From: Ron McCall @ 2002-08-03 12:28 UTC (permalink / raw)
  To: GCC Help Mailing List

Following the instructions at the below URL, I was finally able to build
and install a Solaris hosted PowerPC EABI targeted cross compiler tool
chain (thanks Mumit!).  This includes binutils 2.12.1, gcc 3.1.1 and
newlib 1.10.0.  It is interesting that these instructions seem to merely
avoid running the particular test that was failing before when I
followed Bill Gatliff's CrossGCC FAQ instructions.  The resulting cross
compiler still cannot build an executable by default.

After having done more research into those undefined symbols, I found
that the cross compiler does not by default link in any of the startup
files nor the C library.  I found that adding a compiler option such as
-mads causes it to link in a particular set of startup files (and the C
library) which resolves all those undefined symbols and that the result
of the -mads option is controlled by the specs file.  Now I can work on
adding support for our board!

http://www.nanotech.wisc.edu/~khan/software/gnu-win32/cygwin-to-newlib-cross-howto.txt

Ron McCall

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-03 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-01 14:27 Problem building Solaris hosted PowerPC EABI cross compiler Ron McCall
2002-08-03 12:28 ` Ron McCall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).