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]

Re: RFC: cxxsupp test linkage on synth linux


>>>>> "Jifl" == Jonathan Larmour <jifl@eCosCentric.com> writes:

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

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

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

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

Probably because by default synthetic target users build with the
compiler shipped with their Linux distribution, and only recent
distributions ship something > 2.96. My main development machine is
still running RH7.3 and hence gcc 2.96(RH), although it is overdue for
an upgrade.

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

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

That would probably be handled by moving the linker script to the
variant hal, so not a big issue. Similar problems might arise
supporting e.g. powerpc linux.

The patch seems fine. My only worry is that libgcc_eh.a may suddenly
disappear again, but I don't think we can do anything about that.

Bart


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