[llvm-commits] [llvm-gcc-4.2] r53978 - /llvm-gcc-4.2/trunk/gcc/config/netbsd-elf.h
Anton Korobeynikov
asl at math.spbu.ru
Wed Jul 23 23:19:51 PDT 2008
Author: asl
Date: Thu Jul 24 01:19:51 2008
New Revision: 53978
URL: http://llvm.org/viewvc/llvm-project?rev=53978&view=rev
Log:
Enable PIC for NetBSD targets.
Patch by Krister Walfridsson!
Modified:
llvm-gcc-4.2/trunk/gcc/config/netbsd-elf.h
Modified: llvm-gcc-4.2/trunk/gcc/config/netbsd-elf.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/netbsd-elf.h?rev=53978&r1=53977&r2=53978&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/netbsd-elf.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/netbsd-elf.h Thu Jul 24 01:19:51 2008
@@ -92,3 +92,16 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
%{static:-static}}"
+
+/* LLVM LOCAL begin */
+#ifdef ENABLE_LLVM
+
+/* Yes, we're supporting PIC codegen for NetBSD targets! */
+#define LLVM_SET_TARGET_OPTIONS(argvec) \
+ if (flag_pic) \
+ argvec.push_back ("--relocation-model=pic"); \
+ else \
+ argvec.push_back ("--relocation-model=static");
+
+#endif
+/* LLVM LOCAL end */
More information about the llvm-commits
mailing list