This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: cxxsupp test linkage on synth linux


Using a linux native GCC 3.2.1 built from the FSF sources, I get the following problem when linking cxxsupp:

gcc -g -nostdlib -Wl,-static -Wl,--fatal-warnings -L/home/jlarmour/sourceware/ecos/ecos/obj/i386/linux/install/lib -Ttarget.ld -o /home/jlarmour/sourceware/ecos/ecos/obj/i386/linux/install/tests/infra/current/tests/cxxsupp tests/cxxsupp.o
/home/jlarmour/sourceware/tc/native/install/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/../../../libsupc++.a(new_op.o): In function `comparison_fn_t':
/home/jlarmour/sourceware/gcc/gcc-3_2_1-release/libstdc++-v3/libsupc++/new_op.cc:54: undefined reference to `_Unwind_Resume'
[and snip many more _Unwind_* undefined references]


The problem is that these missing functions come from a new separate library, libgcc_eh.a in gcc-lib.I can't seem to correctly specify that library's inclusion on the command line. Instead the only way to get it included is to edit synth.ld so that's probably what's required.

But why haven't people noticed this before? Versions of GCC 3.x before GCC 3.2.1 wouldn't work unless people were going back as far as gcc 2.9x.

So I'd like some feedback that this patch is okay before I check it in.

I know it may not necessarily apply for a future non-linux synth target, but since we don't have one, it's difficult to conjecture whether it would have the same issue or not.

Jifl


Index: ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/synth/arch/current/ChangeLog,v retrieving revision 1.17 diff -u -5 -p -r1.17 ChangeLog --- ChangeLog 1 May 2003 23:15:58 -0000 1.17 +++ ChangeLog 27 Jun 2003 14:30:06 -0000 @@ -1,5 +1,10 @@ +2003-06-27 Jonathan Larmour <jifl@eCosCentric.com> + + * src/synth.ld: Synthetic linux at least needs libgcc_eh.a in the + GROUP() to resolve exception handling symbols. + 2003-02-25 Iztok Zupet <iz@vsr.si>

 	* doc/synth.sgml: Replaced .gif with .png to get PDF
 	output.
 	* doc/*.gif: Delete.
Index: src/synth.ld
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/synth/arch/current/src/synth.ld,v
retrieving revision 1.4
diff -u -5 -p -r1.4 synth.ld
--- src/synth.ld	10 Apr 2003 18:07:58 -0000	1.4
+++ src/synth.ld	27 Jun 2003 14:30:06 -0000
@@ -52,11 +52,11 @@ STARTUP(vectors.o)
 ENTRY(_start)
 #ifdef EXTRAS
 INPUT(extras.o)
 #endif
 #if (__GNUC__ >= 3)
-GROUP(libtarget.a libgcc.a libsupc++.a)
+GROUP(libtarget.a libgcc.a libsupc++.a libgcc_eh.a)
 #else
 GROUP(libtarget.a libgcc.a)
 #endif

#define ALIGN_LMA 8

--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]