[llvm-branch-commits] [llvm-gcc-branch] r128422 - /llvm-gcc-4.2/branches/release_29/gcc/config/freebsd.h

Bill Wendling isanbard at gmail.com
Mon Mar 28 13:05:09 PDT 2011


Author: void
Date: Mon Mar 28 15:05:09 2011
New Revision: 128422

URL: http://llvm.org/viewvc/llvm-project?rev=128422&view=rev
Log:
Patch by Roman to support PIC in FreeBSD.

Modified:
    llvm-gcc-4.2/branches/release_29/gcc/config/freebsd.h

Modified: llvm-gcc-4.2/branches/release_29/gcc/config/freebsd.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_29/gcc/config/freebsd.h?rev=128422&r1=128421&r2=128422&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/release_29/gcc/config/freebsd.h (original)
+++ llvm-gcc-4.2/branches/release_29/gcc/config/freebsd.h Mon Mar 28 15:05:09 2011
@@ -89,5 +89,13 @@
 /* LLVM LOCAL begin */
 #ifdef ENABLE_LLVM
 #define HANDLE_PRAGMA_PACK_PUSH_POP
+
+/* Yes, we're supporting PIC codegen for FreeBSD 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-branch-commits mailing list