[LLVMbugs] [Bug 7568] New: linker errors compiling perl from spec2006

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 5 08:20:15 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7568

           Summary: linker errors compiling perl from spec2006
           Product: new-bugs
           Version: 2.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu


This is odd... when I try to build perl from SPEC2006 I get very many linker
errors of this form:

Opcode.c:(.text+0x8a0): multiple definition of `__signbitf'

The preprocessed SPEC code gets this from math.h:

extern int __signbitf (float __value);

The function is never referenced by the C file.

The .o file in question does in fact improperly define the symbol, so the
linker is right to croak:

$ nm Opcode.o |grep signbitf
000008a0 T __signbitf

The behavior disappears when I manually preprocess the file and then compile
it.

Perhaps it's relevant that the SPEC header files destroy the attributes that
math.h was using?  For example here's what we get by including math.h from a
bare C program without all the SPEC crap:

extern int __signbitf (float __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));

Is clang somehow getting confused about library functions here?

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list