Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #84 (new defect)

Opened 4 months ago

Last modified 4 months ago

libgcc_eh not linked on mac (at least 10.4 with default gcc installation)

Reported by: fawzi Assigned to:
Priority: major Milestone:
Component: Version:
Keywords: Cc:

Description

the problem is that if one passes the flags to llvmdc the library is put too early in the sequence and linking fails.

calling llvm-ld by hand with

-L=/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1 -l=gcc_eh

at the end it seems to work.

In the system there are several libgcc_eh, and one should use the correct one (I think) depending on the selected gcc (that can be changed). One could look at the one gcc uses when linking. Another possibility is to use lvm-gcc to compile llvmdc, as then the lib should be at a known place wrt. to the executable. Actually automake should be able to do it, there is an autoconf macro called ax_gcc_libgcc_eh (see http://autoconf-archive.cryp.to/macros-by-category.html ), but I am not autoconf/automake literate...

It might well be that the missing libgcc_eh is due to llvm misconfiguration, but I tried several times with no avail, using automake 1.10.1 (the default one 1.6 is too old, at least for gdc).

Change History

09/08/08 10:37:43 changed by ChristianK

For now a fix is adding

-defaultlib=llvmdc-runtime -defaultlib=tango-cc-tango -defaultlib=tango-gc-basic -defaultlib=gcc_eh -L-LMYPATH

to the DFLAGS in llvmdc.conf where MYPATH is the path to your libgcc_eh.a. We will look into making this automatic.

Copyright © 2008, LDC Development Team.