Can't build gcc-2.95.3 with g++ for m68k-elf

William A. Gatliff bgat@billgatliff.com
Wed Feb 6 08:31:00 GMT 2002


Peter:


Wolfgang's comments jogged my memory a bit...

IIRC, after building the bootstrap compiler and runtime libraries, I
had to build libiberty with its own configure/make step.

It's been a while, though...

b.g.

On Wed, Feb 06, 2002 at 07:39:54AM +0100, Fritz, Wolfgang wrote:
> Heelo Peter,
> 
> I ran into exactly that problem when trying to build a gcc for
> m68k-coff.
> I added --with-newlib to the config options fot the gcc configure, and
> the errors disappeared, but I didn't test c++ up to now.
> 
> I think there is a bug in the gcc-2.95.3 build for m68k targets. For a
> standard build, you end up with a compiler setup with missing board
> support libraries, so a link fails with missing symbols and configure
> says the compiler is not working.
> 
> If you don't need c++, you may set languages to c only. In this case the
> libiberty is not needed and won't be built.
> 
> Wolfgang
> 
> 
> 
> > -----Original Message-----
> > From: Peter Barada [mailto:pbarada@mail.wm.sps.mot.com]
> > Sent: Wednesday, February 06, 2002 12:49 AM
> > To: bgat@billgatliff.com; dkorn@pixelpower.com;
> > y.rutschle@indigovision.com; kai.ruottu@luukku.com;
> > joel.sherrill@oarcorp.com; jan.vermeculen@siemens.atea.be
> > Cc: crossgcc@sources.redhat.com
> > Subject: Can't build gcc-2.95.3 with g++ for m68k-elf
> > 
> > 
> > 
> > I'm sending this to you directly since the crossgcc@sources.redhat.com
> > address has permanent errors, and I've been smacking my head against
> > this all day.  I apoligize if you get this twice.  Here's the message
> > from rehat:
> > 
> > >Hi. This is the qmail-send program at sources.redhat.com.
> > >I'm afraid I wasn't able to deliver your message to the 
> > following addresses.
> > >This is a permanent error; I've given up. Sorry it didn't work out.
> > >
> > ><mailto:crossgcc@sources.redhat.com>:
> > >Sorry, no mailbox here by that name. (#5.1.1)
> > 
> > I picked up gcc-2.95.3 and gcc-g++-2.95.3 from gcc.gnu.org, and with
> > binutils-2.11.2, and newlib-1.9.0, I'm attempting to build a full up
> > c++ cross-compiler.
> > 
> > Using a script that started out as Bill's crossgcc.sh script, I was
> > able to build binutils, the core compiler, newlib, and while coming
> > back to build gcc, it craps out with:
> > 
> > cd ../libiberty ; make "SHELL=/bin/sh" "INSTALL=/bin/sh 
> > /home/pbarada/work/cvs-wavemark/cross-linux-tools/g++-2.95.3/i
> > nstall-sh -c" "INSTALL_DATA=/bin/sh 
> > /home/pbarada/work/cvs-wavemark/cross-linux-tools/g++-2.95.3/i
> > nstall-sh -c -m 644" "INSTALL_PROGRAM=/bin/sh 
> > /home/pbarada/work/cvs-wavemark/cross-linux-tools/g++-2.95.3/i
> > nstall-sh -c " "prefix=/tmp/crap-g++-2.95.3" 
> > "exec_prefix=/tmp/crap-g++-2.95.3" 
> > "tooldir=/tmp/crap-g++-2.95.3/m68k-elf" 
> > "gxx_include_dir=/tmp/crap-g++-2.95.3/include/g++-3" 
> > "libsubdir=/tmp/crap-g++-2.95.3/lib/gcc-lib/m68k-elf/2.95.3" 
> > "gcc_version=2.95.3" 
> > "gcc_version_trigger=/home/pbarada/work/cvs-wavemark/cross-lin
> > ux-tools/g++-2.95.3/gcc/version.c" "AR=m68k-elf-ar" 
> > "AR_FLAGS=rc" 
> > "CC=/home/pbarada/work/cvs-wavemark/cross-linux-tools/obj-crap
> > -g++-2.95.3/m68k-elf/build-gcc/gcc/xgcc 
> > -B/home/pbarada/work/cvs-wavemark/cross-linux-tools/obj-crap-g
> > ++-2.95.3/m68k-elf/build-gcc/gcc/ 
> > -B/tmp/crap-g++-2.95.3/m68k-elf/bin/" 
> > "CXX=/home/pbarada/work/cvs-wavemark/cross-linux!
> > !
> > !
> > -tools/obj-crap-g++-2.95.3/m68k-elf/build-gcc/gcc/xgcc 
> > -B/home/pbarada/work/cvs-wavemark/cross-linux-tools/obj-crap-g
> > ++-2.95.3/m68k-elf/build-gcc/gcc/ 
> > -B/tmp/crap-g++-2.95.3/m68k-elf/bin/" "CFLAGS=-g -O2" 
> > "CXXFLAGS=-g -O2" "NM=m68k-elf-nm" "RANLIB=m68k-elf-ranlib" 
> > "LIBCFLAGS=-g -O2" "LIBCXXFLAGS=-g -O2 
> > -fno-implicit-templates" "LOADLIBES=" "LDFLAGS=" 
> > "MAKEINFO=/home/pbarada/work/cvs-wavemark/cross-linux-tools/ob
> > j-crap-g++-2.95.3/m68k-elf/build-gcc/texinfo/makeinfo/makeinfo
> >  " "SHLIB=libstdc++.so.2.10.0" "SHCURSES=" "RUNTESTFLAGS="
> > make[2]: Entering directory 
> > `/home/pbarada/work/cvs-wavemark/cross-linux-tools/obj-crap-g+
> > +-2.95.3/m68k-elf/build-gcc/m68k-elf/libiberty'
> > make[2]: *** No targets specified and no makefile found.  Stop.
> > make[2]: Leaving directory 
> > `/home/pbarada/work/cvs-wavemark/cross-linux-tools/obj-crap-g+
> > +-2.95.3/m68k-elf/build-gcc/m68k-elf/libiberty'
> > make[1]: *** [../libiberty/libiberty.a] Error 2
> > make[1]: Leaving directory 
> > `/home/pbarada/work/cvs-wavemark/cross-linux-tools/obj-crap-g+
> > +-2.95.3/m68k-elf/build-gcc/m68k-elf/libstdc++'
> > make: *** [all-target-libstdc++] Error 2
> > 
> > Looking in m68k-elf-libiberty shows:
> > 
> > [pbarada: 
> > ~/work/cvs-wavemark/cross-linux-tools/obj-crap-g++-2.95.3/m68k
> > -elf/build-gcc/m68k-elf/libiberty] > ls
> > ./  ../  confdefs.h  config.cache  config.log  xhost-mkfrag
> > [pbarada: 
> > ~/work/cvs-wavemark/cross-linux-tools/obj-crap-g++-2.95.3/m68k
> > -elf/build-gcc/m68k-elf/libiberty] > 
> > 
> > 
> > From build-gcc/m68k-elf/libiberty/config.log I saw:
> > 
> > configure:1765: 
> > /home/pbarada/work/cvs-wavemark/cross-linux-tools/obj-crap-g++
> > -2.95.3/m68k-elf/build-gcc/gcc/xgcc 
> > -B/home/pbarada/work/cvs-wavemark/cross-linux-tools/obj-crap-g
> > ++-2.95.3/m68k-elf/build-gcc/gcc/ 
> > -B/tmp/crap-g++-2.95.3/m68k-elf/bin/ -o conftest -g -O2   
> > conftest.c  1>&5
> > /tmp/crap-g++-2.95.3/m68k-elf/bin/ld: warning: cannot find 
> > entry symbol _start; defaulting to 80000074
> > /tmp/crap-g++-2.95.3/m68k-elf/lib/crt0.o: In function `start':
> > /tmp/crap-g++-2.95.3/m68k-elf/lib/crt0.o(.text+0x2): 
> > undefined reference to `__stack'
> > /tmp/crap-g++-2.95.3/m68k-elf/lib/crt0.o(.text+0x58): 
> > undefined reference to `__FINI_SECTION__'
> > /tmp/crap-g++-2.95.3/m68k-elf/lib/crt0.o(.text+0x38): 
> > undefined reference to `hardware_init_hook'
> > /tmp/crap-g++-2.95.3/m68k-elf/lib/crt0.o(.text+0x48): 
> > undefined reference to `software_init_hook'
> > /tmp/crap-g++-2.95.3/m68k-elf/lib/crt0.o(.text+0x5e): 
> > undefined reference to `atexit'
> > /tmp/crap-g++-2.95.3/m68k-elf/lib/crt0.o(.text+0x64): 
> > undefined reference to `__INIT_SECTION__'
> > /tmp/crap-g++-2.95.3/m68k-elf/lib/crt0.o(.text+0x84): 
> > undefined reference to `exit'
> > /home/pbarada/work/cvs-wavemark/cross-linux-tools/obj-crap-g++
> > -2.95.3/m68k-elf/build-gcc/gcc/libgcc.a(__main.o): In 
> > function `__do_global_ctors':
> > /home/pbarada/work/cvs-wavemark/cross-linux-tools/g++-2.95.3/g
> > cc/libgcc2.c(.text+0x3a): undefined reference to `atexit'
> > collect2: ld returned 1 exit status
> > configure: failed program was:
> > 
> > #line 1760 "configure"
> > #include "confdefs.h"
> > 
> > main(){return(0);}
> > 
> > 
> > The config line for the compiler is:
> > 
> > [pbarada: 
> > ~/work/cvs-wavemark/cross-linux-tools/obj-crap-g++-2.95.3/m68k
> > -elf/build-gcc] > 
> > /home/pbarada/work/cvs-wavemark/cross-linux-tools/g++-2.95.3/c
> > onfigure --host=i686-pc-linux-gnu --target=m68k-elf 
> > --prefix=/tmp/crap-g++-2.95.3 --enable-languages=c,c++ 
> > --with-local-prefix=/tmp/crap-g++-2.95.3/m68k-elf 2>&1 | tee 
> > configure.log
> > 
> > And the configure.log doesn't show any errors.
> > 
> > If I changes --enable-languages to just 'c', everything is happy.
> > 
> > Any ideas???
> > 
> > - -- 
> > Peter Barada                                   
> > Peter.Barada@motorola.com
> > Wizard                                         781-852-2768 (direct)
> > WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)
> > ------- End of forwarded message -------
> > 
> > ------
> > Want more information?  See the CrossGCC FAQ, 
> > http://www.objsw.com/CrossGCC/
> > Want to unsubscribe? Send a note to 
> > crossgcc-unsubscribe@sources.redhat.com
> > 
> > 
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
> 

-- 
Bill Gatliff
bgat@billgatliff.com

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



More information about the crossgcc mailing list