Problems building libstdc++-v3
Mack Lobell
macklobell@hotmail.com
Mon Sep 23 13:42:00 GMT 2002
Hi,
you were absolutely right when you said that i was missing a target. Now I
get a little bit further. But i have stumbled a cross another problem. When
i try to configure powerpc-eabi/und/libiberty the build fails with the same
output. From the config.log i got the following:
configure:1445: /home/lobell/build/gcc/gcc/xgcc
-B/home/lobell/build/gcc/gcc/ -B/usr/local/powerpc/powerpc-eabi/bin/
-B/usr/local/powerpc/powerpc-eabi/lib/ -isystem
/usr/local/powerpc/powerpc-eabi/include -fleading-underscore
-mrelocatable-lib -mno-eabi -mstrict-align -E conftest.c >/dev/null
2>conftest.out
configure:1536: checking for uintptr_t
configure:2196: checking whether the C compiler
(/home/lobell/build/gcc/gcc/xgcc -B/home/lobell/build/gcc/gcc/
-B/usr/local/powerpc/powerpc-eabi/bin/
-B/usr/local/powerpc/powerpc-eabi/lib/ -isystem
/usr/local/powerpc/powerpc-eabi/include -fleading-underscore
-mrelocatable-lib -mno-eabi -mstrict-align -myellowknife ) works
configure:2212: /home/lobell/build/gcc/gcc/xgcc
-B/home/lobell/build/gcc/gcc/ -B/usr/local/powerpc/powerpc-eabi/bin/
-B/usr/local/powerpc/powerpc-eabi/lib/ -isystem
/usr/local/powerpc/powerpc-eabi/include -fleading-underscore
-mrelocatable-lib -mno-eabi -mstrict-align -o conftest -myellowknife
conftest.c 1>&5
/usr/local/powerpc/powerpc-eabi/lib/und/libyk.a(sbrk.o): In function `sbrk':
/home/lobell/build/newlib/powerpc-eabi/und/libgloss/rs6000/../../../../../../src/newlib-1.10.0/libgloss/sbrk.c:33:
undefined reference to `__end'
collect2: ld returned 1 exit status
configure: failed program was:
In yellowknife.ld (my target), only _end is defined. Is there a reason for
compiling with -fleading-underscore in powerpc-eabi/und/libiberty?
ca, le and nof are all configured without the flag.
Regards
>From: "Kai Ruottu" <kai.ruottu@luukku.com>
>Reply-To: kai.ruottu@luukku.com
>To: crossgcc-owner@sources.redhat.com
>CC: macklobell@hotmail.com, ShaoBo.Zhang@alcatel-sbell.com.cn
>Subject: Re: Problems building libstdc++-v3
>Date: Mon, 23 Sep 2002 17:25:42 +0300
>
>"Mack Lobell" <macklobell@hotmail.com> wrote:
>
> > I'm trying to build a crosscompiler, target=powerpc-eabi and host is
>cygwin.
> > Everything works and installs fine (i.e. binutils, newlib and bootstrap
>gcc)
> > to the final compiler build. It always fail during configuration of
> > libstdc++-v3, see trace below.
> >
> > checking for object suffix... configure: error: installation or
> > configuration problem; compiler does not work
>
> If the error message is this, it means that your "compiler does not
>work"... What else it could mean?
>
> Of course the error message is stupid but aimed for newbies who most
>probably think the whole toolchain being the "compiler", not only the
>'gcc + cpp + cc1 + as'-chain for creating objects for libraries, as a
>normal (and more experienced) GCC-user may think...
>
> But you wrote: "Everything works and installs fine (i.e. binutils,
>newlib and bootstrap gcc)", so you must have checked that everything
>works and the "compiler" really can create executables, which I think
>the "compiler" here meaning...
>
> But as "ShaoBo.Zhang@alcatel-sbell.com.cn" wrote:
>
>------------------- clip --------------------------------------
> i have finished the build of cross compiler ,when i compiler a
>program using the powerpc-eabi-gcc, there are an error as following:
>
> powerpc-eabi-gcc \
> -I/usr/local/src/gnu/newlib-1.8.2/newlib/libc/include \
> -o hello hello.c
>/usr/local/powerpc/powerpc-eabi/bin/ld:
> warning: cannot find entry symbol _start; defaulting to 01800074
>/tmp/ccD5t0Jf.o: In function `main':
>/tmp/ccD5t0Jf.o(.text+0x24): undefined reference to `printf'
>------------------- clip --------------------------------------
>
>a 'powerpc-eabi' targeted GCC doesn't create executables for the
>magical 'eabi' target-board-hardware/monitor-firmware combination,
>or for some operating system called 'eabi', because... believe me
>or not... this 'system' doesn't not exist at all!!!
>
> Mack, if would have tries a 'hello.c' program with your new GCC,
>and it would have been compiled and linked ok, then your "Everything
>works" would have had a reason... I would claim that this is not the
>case now...
>
> Ok, opening the GCC-manual and seeing the "Invoking GCC / Submodel
>Options / IBM RS6000 and PowerPC options" normally tells what is the
>"problem" : one must select some target from the real world for the
>produced executables: the 'psim'-simulator, one of the supported
>Motorola boards, or something the user has thought to be used as the
>"target system"...
>
> The fact seems to be that nowadays one cannot build libstdc++-v3
>without having a working toolchain first, the C-library probably
>will be investigated just as happened with libiberty earlier (if
>not using the '--with-newlib').
>
> So the default 'specs'-file must be fixed to have a default target
>for the produced executables, or an extra flag must be added to the
>CFLAGS, for instance the '-mads' (suggested for which kind of
>builders ;-). I normally suggest using the '-msim', thinking that
>when one has built GDB, the "Hello World" can be seen on the
>screen on the host-platform using the 'powerpc-eabi-run hello'...
>
>Cheers, Kai
>
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.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