various BSPs fail linking C++iostreams
Joel Sherrill
joel.sherrill at OARcorp.com
Mon Apr 21 16:26:25 UTC 2014
Hi
I also see this on h8, some m68k, and some powerpc BSPs.
Since the link is with g++ and that is the most common explanation
for this, there must be something else going on. And a couple
of something elses. :(
The m68k/sim68000 appears to be a linking error:
m68k-rtems4.11-g++ -B../../../../../sim68000/lib/ -specs bsp_specs
-qrtems -mcpu=68000 -O2 -g -fomit-frame-pointer -Wall
-Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
-Wnested-externs -mcpu=68000 -o cxx_iostream.exe init.o
init.o: In function `__static_initialization_and_destruction_0':
/users/joel/rtems-4.11-work/tools/lib/gcc/m68k-rtems4.11/4.8.2/include/c++/iostream:74:
undefined reference to `__dso_handle'
/users/joel/rtems-4.11-work/tools/lib/gcc/m68k-rtems4.11/4.8.2/m68000/libstdc++.a(eh_globals.o):
In function `__static_initialization_and_destruction_0':
/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/m68k-rtems4.11-gcc-4.8.2-newlib-cvs-head-1/build/m68k-rtems4.11/m68000/libstdc++-v3/libsupc++/../../../../../gcc-4.8.2/libstdc++-v3/libsupc++/eh_globals.cc:109:
undefined reference to `__dso_handle'
/users/joel/rtems-4.11-work/tools/lib/gcc/m68k-rtems4.11/4.8.2/m68000/libstdc++.a(future.o):
In function `__future_category_instance':
/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/m68k-rtems4.11-gcc-4.8.2-newlib-cvs-head-1/build/m68k-rtems4.11/m68000/libstdc++-v3/src/c++11/../../../../../../gcc-4.8.2/libstdc++-v3/src/c++11/future.cc:63:
undefined reference to `__dso_handle'
/users/joel/rtems-4.11-work/tools/lib/gcc/m68k-rtems4.11/4.8.2/m68000/libstdc++.a(system_error.o):
In function `__static_initialization_and_destruction_0':
/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/m68k-rtems4.11-gcc-4.8.2-newlib-cvs-head-1/build/m68k-rtems4.11/m68000/libstdc++-v3/src/c++11/../../../../../../gcc-4.8.2/libstdc++-v3/src/c++11/system_error.cc:65:
undefined reference to `__dso_handle'
/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/m68k-rtems4.11-gcc-4.8.2-newlib-cvs-head-1/build/m68k-rtems4.11/m68000/libstdc++-v3/src/c++11/../../../../../../gcc-4.8.2/libstdc++-v3/src/c++11/system_error.cc:66:
undefined reference to `__dso_handle'
/users/joel/rtems-4.11-work/tools/lib/gcc/m68k-rtems4.11/4.8.2/../../../../m68k-rtems4.11/bin/ld:
cxx_iostream.exe: hidden symbol `__dso_handle' isn't defined
/users/joel/rtems-4.11-work/tools/lib/gcc/m68k-rtems4.11/4.8.2/../../../../m68k-rtems4.11/bin/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status
mbx8xx is a different type of problem.
powerpc-rtems4.11-g++ -B../../../../../mbx821_001/lib/ -specs bsp_specs
-qrtems -mcpu=821 -Dmpc821 -Dmbx821_001 -meabi -msdata=sysv -fno-common
-O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes
-Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs
-mcpu=821 -Dmpc821 -Dmbx821_001 -meabi -msdata=sysv -fno-common -o
cxx_iostream.exe init.o
init.o: In function `__static_initialization_and_destruction_0':
/users/joel/rtems-4.11-work/tools/lib/gcc/powerpc-rtems4.11/4.8.2/include/c++/iostream:74:
undefined reference to `__dso_handle'
/users/joel/rtems-4.11-work/tools/lib/gcc/powerpc-rtems4.11/4.8.2/../../../../powerpc-rtems4.11/bin/ld:
/users/joel/rtems-4.11-work/tools/lib/gcc/powerpc-rtems4.11/4.8.2/include/c++/iostream:74:(.text.startup+0x36):
unresolvable R_PPC_SDAREL16 relocation against symbol `__dso_handle'
Any ideas?
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the devel
mailing list