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

           Summary: clang: ccc -fPIC/-DPIC not working on x86-64
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Now that va-arg has been fixed on x86-64,  I've tested clang and got a linker
error, here's a reduced testcase:

$ ccc -fPIC -DPIC -c foo.c -o foo.o
$ ccc -shared foo.o -o foo.so
ccc: Unknown host 'linux', using generic host information.
/usr/bin/ld: foo.o: relocation R_X86_64_32S against `a' can not be used when
making a shared object; recompile with -fPIC
foo.o: could not read symbols: Bad value
collect2: ld returned 1 exit status


That error message is what you usually get with gcc if you DON'T use PIC.
But I used PIC with ccc, and I still get the error.

/* foo.c */
int a;
int foo()
{
    return a;
}


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to