[LLVMbugs] [Bug 197] NEW: [gccld] -native option is effectively broken

bugzilla-daemon at zion.cs.uiuc.edu bugzilla-daemon at zion.cs.uiuc.edu
Tue Dec 23 22:47:06 PST 2003


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=197

           Summary: [gccld] -native option is effectively broken
           Product: tools
           Version: 1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gccld
        AssignedTo: criswell at uiuc.edu
        ReportedBy: sabre at nondot.org


Because of the fix to Bug 142, it looks like the -native option is effectively
broken, at least when passed through the llvmgcc compiler driver with -Wl,-native.

The problem is that the C front-end automatically adds the crtend archive to the
gccld link line (with -lcrtend) when the program is being linked.  When the
-native option is used, the -lcrtend option is passed into the native linker,
which complains that it cannot find it.

It's not clear what the correct solution is for this problem.  In general we
would like to not pass on any -l options to the native linker for libraries that
are fully implemented in LLVM.  On the other hand, some libraries, like libc,
have partial implementations that obviously shouldn't prevent linking in the
native libc.  :)

The best short term fix for this is probably to add a special hack for crtend,
but this does not fix the general problem of when users build libraries as part
of their application, as there will be no native version of these either.

I'll leave this one to John to puzzle over, as he's the gccld guy now.  :)

-Chris



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list