Snapshot 20030128 broke my buildt

Ralf Corsepius corsepiu at faw.uni-ulm.de
Thu Feb 27 05:05:02 UTC 2003


Am Don, 2003-02-27 um 05.29 schrieb Angelo Fraietta:
> Ralf Corsepius wrote:
> > Am Mit, 2003-02-26 um 22.46 schrieb Angelo Fraietta:
> > 
> > > I am getting the followingh link error when I try to build my exe (the 
> > > rtems source builds fine)
> > > 
> > > i386-rtems-gcc --pipe -B/opt/rtems/i386-rtems/pc386/lib/ -specs 
> > > bsp_specs -qrtems   -g -Wall  -O4 -g       -D_E_STL    -I ../../../estl  
> > > -I ../engine -I ../engineinterface -I ../hal_include -I ../link_driver 
> > > -I ../../../threads/source -I ../../../mididriver -I 
> > > ../../../mididriver/hal_rtems       -Wl,-Ttext,0x00100000 -o 
> > > o-optimize/smart.obj  o-optimize/diags.o o-optimize/rtems_init.o 
> > > o-optimize/midioutput.o o-optimize/scheduler.o 
> > > o-optimize/rtems_simulator.o o-optimize/commtasks.o  
> > > /opt/rtems/i386-rtems/pc386/lib/no-dpmem.rel 
> > > /opt/rtems/i386-rtems/pc386/lib/no-mp.rel 
> > > /opt/rtems/i386-rtems/pc386/lib/no-part.rel 
> > > /opt/rtems/i386-rtems/pc386/lib/no-signal.rel 
> > > ../engine/o-optimize/sm_engine.a   
> > > ../engineinterface/o-optimize/sm_engineinterface.a   
> > > ../engine/o-optimize/sm_engine.a   
> > > ../link_driver/o-
> > > optimize/sm_link_driver.a   
> > > ../link_driver/hal_rtems/o-optimize/sm_comm.a   
> > > ../../../threads/source/o-optimize/sm_rtems_active.a   
> > > ../../../threads/source/hal_rtems/o-optimize/sm_rtems_thread.a   
> > > ../../../mididriver/hal_rtems/o-optimize/rtems_midi.a -lstdc++ -v
> > > 
> > 
> > Where does this -lstdc++ come from?
> > 
> > Linking c++ applications using 
> > gcc <args> -lstdc++
> > is wrong. You must use
> > g++ <args>
> > instead.
> > 
> > 
> This has been in my project since Oct 2000
> 
> I added
> 
> LINK_LIBS += -lstdc++
> to my project makefile
> 
> Is this changed now?
This is a general behavioral change in gcc.

It has been recommended to link c++-applications with g++ for several
years (Approximately since the egcs day), but using gcc to link c++ has
continued to work, more or less at random, on some targets.

Nowadays you are supposed to apply g++, because linking c++ with gcc
already doesn't work on some targets and will almost 100% certainly stop
working in future releases of gcc.

Ralf






More information about the users mailing list