RTEMS C++ Issues

Robert S. Grimes rsg at alum.mit.edu
Wed Jun 27 15:06:59 UTC 2007


Okay, none of the other PowerPC BSPs that referenced rtems_crti.S built
properly!  These are the ep1a, mvme5500, and the psim.  They seem to
fail identically - below is the output from psim.  I still don't think
this problem is related to my problem, but I'm reporting it for
completeness.

Thanks,
-Bob

Making all in .
make[7]: Entering directory
`/cygdrive/c/Home/ll/etill/development/new-rtems/tools/b-rtems/powerpc-rtems/c/psim/lib/libb
sp/powerpc/psim'
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -Wall -ansi -fasm
-mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-fun
ctions -MT pclock_rel-p_clock.o -MD -MP -MF .deps/pclock_rel-p_clock.Tpo
-c -o pclock_rel-p_clock.o `test -f '../shared/
clock/p_clock.c' || echo
'../../../../../../../../rtems/c/src/lib/libbsp/powerpc/psim/'`../shared/clock/p_clock.c
mv -f .deps/pclock_rel-p_clock.Tpo .deps/pclock_rel-p_clock.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -Wall -ansi
 -fasm -mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-functions
-qnolinkcmds -nostdlib -Wl,-r  -o pclock.rel pclock_rel-p_
clock.o
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -Wall -ansi -fasm
-mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-fun
ctions -MT consoleio_rel-console-io.o -MD -MP -MF
deps/consoleio_rel-console-io.Tpo -c -o consoleio_rel-console-io.o `t
est -f 'console/console-io.c' || echo
'../../../../../../../../rtems/c/src/lib/libbsp/powerpc/psim/'`console/console-io.
c
mv -f .deps/consoleio_rel-console-io.Tpo .deps/consoleio_rel-console-io.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -DASM -mcpu=603e
-Dppc603e -O2 -g -fno-keep-inline-functions -MT c
onsoleio_rel-consupp.o -MD -MP -MF .deps/consoleio_rel-consupp.Tpo -c -o
consoleio_rel-consupp.o `test -f 'console/consu
pp.S' || echo
'../../../../../../../../rtems/c/src/lib/libbsp/powerpc/psim/'`console/consupp.S
mv -f .deps/consoleio_rel-consupp.Tpo .deps/consoleio_rel-consupp.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -Wall -ansi
 -fasm -mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-functions
-qnolinkcmds -nostdlib -Wl,-r  -o consoleio.rel consoleio_
rel-console-io.o consoleio_rel-consupp.o
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -Wall -ansi -fasm
-mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-fun
ctions -MT console_rel-console-polled.o -MD -MP -MF
.deps/console_rel-console-polled.Tpo -c -o console_rel-console-polle
d.o `test -f '../../shared/console-polled.c' || echo
'../../../../../../../../rtems/c/src/lib/libbsp/powerpc/psim/'`../.
./shared/console-polled.c
mv -f .deps/console_rel-console-polled.Tpo
.deps/console_rel-console-polled.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -Wall -ansi
 -fasm -mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-functions
-qnolinkcmds -nostdlib -Wl,-r  -o console.rel console_rel-
console-polled.o
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -Wall -ansi -fasm
-mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-fun
ctions -MT irq_rel-irq.o -MD -MP -MF .deps/irq_rel-irq.Tpo -c -o
irq_rel-irq.o `test -f 'irq/irq.c' || echo '../../../..
/../../../../rtems/c/src/lib/libbsp/powerpc/psim/'`irq/irq.c
mv -f .deps/irq_rel-irq.Tpo .deps/irq_rel-irq.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -Wall -ansi -fasm
-mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-fun
ctions -MT irq_rel-irq_init.o -MD -MP -MF .deps/irq_rel-irq_init.Tpo -c
-o irq_rel-irq_init.o `test -f 'irq/irq_init.c'
|| echo
'../../../../../../../../rtems/c/src/lib/libbsp/powerpc/psim/'`irq/irq_init.c
../../../../../../../../rtems/c/src/lib/libbsp/powerpc/psim/irq/irq_init.c:
In function 'BSP_rtems_irq_mng_init':
./../../../../../../../rtems/c/src/lib/libbsp/powerpc/psim/irq/irq_init.c:154:
warning: implicit declaration of functio
n 'mpc60x_set_exception'
mv -f .deps/irq_rel-irq_init.Tpo .deps/irq_rel-irq_init.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -DASM -mcpu=603e
-Dppc603e -O2 -g -fno-keep-inline-functions -MT i
rq_rel-irq_asm.o -MD -MP -MF .deps/irq_rel-irq_asm.Tpo -c -o
irq_rel-irq_asm.o `test -f 'irq/irq_asm.S' || echo '../../.
./../../../../../rtems/c/src/lib/libbsp/powerpc/psim/'`irq/irq_asm.S
mv -f .deps/irq_rel-irq_asm.Tpo .deps/irq_rel-irq_asm.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -Wall -ansi
 -fasm -mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-functions
-qnolinkcmds -nostdlib -Wl,-r  -o irq.rel irq_rel-irq.o ir
q_rel-irq_init.o irq_rel-irq_asm.o
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -DASM -mcpu=603e
-Dppc603e -O2 -g -fno-keep-inline-functions -MT v
ectors_rel-align_h.o -MD -MP -MF .deps/vectors_rel-align_h.Tpo -c -o
vectors_rel-align_h.o `test -f 'vectors/align_h.S'
|| echo
'../../../../../../../../rtems/c/src/lib/libbsp/powerpc/psim/'`vectors/align_h.S
mv -f .deps/vectors_rel-align_h.Tpo .deps/vectors_rel-align_h.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -DASM -mcpu=603e
-Dppc603e -O2 -g -fno-keep-inline-functions -MT v
ectors_rel-vectors.o -MD -MP -MF .deps/vectors_rel-vectors.Tpo -c -o
vectors_rel-vectors.o `test -f '../../powerpc/share
d/vectors/vectors.S' || echo
'../../../../../../../../rtems/c/src/lib/libbsp/powerpc/psim/'`../../powerpc/shared/vectors
/vectors.S
mv -f .deps/vectors_rel-vectors.Tpo .deps/vectors_rel-vectors.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONF
IG_H   -isystem ../../../../../.././psim/lib/include  -Wall -ansi -fasm
-mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-fun
ctions -MT vectors_rel-vectors_init.o -MD -MP -MF
.deps/vectors_rel-vectors_init.Tpo -c -o vectors_rel-vectors_init.o `t
est -f '../../powerpc/shared/vectors/vectors_init.c' || echo
'../../../../../../../../rtems/c/src/lib/libbsp/powerpc/psi
m/'`../../powerpc/shared/vectors/vectors_init.c
mv -f .deps/vectors_rel-vectors_init.Tpo .deps/vectors_rel-vectors_init.Po
powerpc-rtems-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././psim/lib/ -specs bsp_specs -qrtems -Wall -ansi
 -fasm -mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-functions
-qnolinkcmds -nostdlib -Wl,-r  -o vectors.rel vectors_rel-
align_h.o vectors_rel-vectors.o vectors_rel-vectors_init.o
make[7]: *** No rule to make target
`../../../libcpu/powerpc/mpc6xx/exceptions.rel', needed by `libbsp.a'. 
Stop.
make[7]: Leaving directory
`/cygdrive/c/Home/ll/etill/development/new-rtems/tools/b-rtems/powerpc-rtems/c/psim/lib/libbs
p/powerpc/psim'

Robert S. Grimes wrote:
> Hi,
>
> I have a problem with C++ and a new BSP for the Virtex PowerPC.  I can
> successfully build and run C++ programs, as long as I don't use any globally
> constructed objects.
>
> Now, I'm working with the cdtest program, which tests constructors, destructors,
> iostream, and exceptions; to keep it simple for now, I'm not enabling the
> iostream tests.  Of course, at this point, the constructors and destructors for
> auto objects works fine, but no constructors are called for the global objects
>
> So, I'm trying to implement the code from the wiki (see
> http://www.rtems.com/wiki/index.php/Using_C_Plus_Plus), but I unfortunately
> don't know enough still about automake, autoconf, and the RTEMS build
> system.  I tried to adapt another PowerPC BSP (ep1a) that seemed to use this
> approach, specifically the shared file powerpc/shared/start/rtems_crti.S, but
> I'm running into problems during the BSP build; this is the output:
>
>   Making all in hello
>   make[5]: Entering directory
> `/home/dev/rtems/tools/b-rtems/powerpc-rtems/c/virtex/testsuites/samples/hello'
>   powerpc-rtems-gcc -B../../../../../virtex/lib/ -specs bsp_specs -qrtems
> mcpu=403 -Dppc405 -Dvirtex -O4 -fno-keep-inline-functions -g      -o hello.exe
> init.o ../../../../../virtex/lib/no-dpmem.rel
> ../../../../../virtex/lib/no-event.rel ../../../../../virtex/lib/no-msg.rel
> ../../../../../virtex/lib/no-mp.rel ../../../../../virtex/lib/no-part.rel
> ../../../../../virtex/lib/no-signal.rel ../../../../../virtex/lib/no-timer.rel
> ../../../../../virtex/lib/no-rtmon.rel
>   /usr/rtems/4.8/lib/gcc/powerpc-rtems/4.1.1/../../../../powerpc-rtems/bin/ld:
> rtems_crti.o: No such file: No such file or directory
>   collect2: ld returned 1 exit status
>   make[5]: *** [hello.exe] Error 1
>   make[5]: Leaving directory
> `/home/dev/rtems/tools/b-rtems/powerpc-rtems/c/virtex/testsuites/samples/hello'
>
> As you can see, the BSP seems to build fine, but the first sample program that
> is built with the bsp fails, because it doesn't know where to find the
> rtems_crti.o file.  I don't know how to tell the linker where to find this file,
> which most certainly does exist - specifically, in powerpc/virtex.
>
> Seems the problem could be in the Makefile.am, Makefile.in, or the bsp_specs
> file, none of which I really understand well enough to fix.
>
> I think the answer is probably pretty simple, at least for you guys, but
> it's clearly a bit out of reach for me...
>
> FWIW - I also tried building the ep1a BSP, and it didn't work - in some other
> seemingly unrelated way.  I'm currently trying some others, and will report the
> results...
>
> Thanks!
> -Bob
>
> P.S. Oh, yeah, and exceptions don't work either - it kicks my application out,
> and hits the fatal error at the end of boot_card (IIRC).  Right now, not too
> worried about that, but I'll probably be asking about it later, so feel free to
> comment now!
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>
>
>   



More information about the users mailing list