http://llvm.org/bugs/show_bug.cgi?id=9603
Summary: Relocation error on x86_64
Product: dragonegg
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Hi, when I compiled dragonegg on 64-bit version of Linux I got:
Linking dragonegg.so
/usr/bin/ld: cache.o: relocation R_X86_64_32 against `ggc_free' can not be used
when making a shared object; recompile with -fPIC
cache.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
I wonder if anyone can replicate the issue.
In my case, adding -fPIC to both CLFAGS ans CXXFLAGS fixed the problem.
Index: Makefile
===================================================================
--- Makefile (revision 128542)
+++ Makefile (working copy)
@@ -21,6 +21,11 @@
CFLAGS+=$(COMMON_FLAGS) $(shell $(LLVM_CONFIG) --cflags)
CXXFLAGS+=$(COMMON_FLAGS) $(shell $(LLVM_CONFIG) --cxxflags)
+ifeq ($(shell uname -m),x86_64)
+CFLAGS+=-fPIC
+CXXFLAGS+=-fPIC
+endif
+
ifeq ($(shell uname),Darwin)
LOADABLE_MODULE_OPTIONS=-bundle -undefined dynamic_lookup
else
Cheers,
Ryuta
--
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