[llvm-commits] [127759] Fix an llvm-gcc build problem when configuring for x86_64-unknown-linux-gnu .

clattner at apple.com clattner at apple.com
Tue May 29 00:30:03 CDT 2007


Revision: 127759
Author:   clattner
Date:     2007-05-28 22:30:03 -0700 (Mon, 28 May 2007)

Log Message:
-----------
Fix an llvm-gcc build problem when configuring for x86_64-unknown-linux-gnu.
Apparently, on this config, config/i386/linux64.h is used, but not 
config/i386/linux.h.  As such, the PIC-related stuff in i386/linux.h wasn't 
being picked up, and pic codegen didn't work.

This moves the code up to config/linux.h which is apparently picked up on all
linux configs.  This allows special code from arm/linux-elf.h to be removed.

Thanks to Richard Guenther for sending me information necessary to track this
down.

Modified Paths:
--------------
    apple-local/branches/llvm/gcc/config/arm/linux-elf.h
    apple-local/branches/llvm/gcc/config/i386/linux.h
    apple-local/branches/llvm/gcc/config/linux.h

Modified: apple-local/branches/llvm/gcc/config/arm/linux-elf.h
===================================================================
--- apple-local/branches/llvm/gcc/config/arm/linux-elf.h	2007-05-28 11:27:34 UTC (rev 127758)
+++ apple-local/branches/llvm/gcc/config/arm/linux-elf.h	2007-05-29 05:30:03 UTC (rev 127759)
@@ -149,17 +149,3 @@
 #ifdef HAVE_LD_AS_NEEDED
 #define USE_LD_AS_NEEDED 1
 #endif
-
-/* APPLE LOCAL begin LLVM */
-#ifdef ENABLE_LLVM
-
-/* PIC codegen for ARM-Linux-ELF target */
-#define LLVM_SET_TARGET_OPTIONS(argvec)              \
-  if (flag_pic)                                      \
-    argvec.push_back ("--relocation-model=pic");     \
-  else                                               \
-    argvec.push_back ("--relocation-model=static");
-
-/* APPLE LOCAL end LLVM */
-
-#endif

Modified: apple-local/branches/llvm/gcc/config/i386/linux.h
===================================================================
--- apple-local/branches/llvm/gcc/config/i386/linux.h	2007-05-28 11:27:34 UTC (rev 127758)
+++ apple-local/branches/llvm/gcc/config/i386/linux.h	2007-05-29 05:30:03 UTC (rev 127759)
@@ -189,16 +189,8 @@
 /* APPLE LOCAL begin LLVM */
 #ifdef ENABLE_LLVM
 
-/* Yes, we're supporting PIC codegen for X86-Linux-ELF target! */
-#define LLVM_SET_TARGET_OPTIONS(argvec)              \
-  if (flag_pic)                                      \
-    argvec.push_back ("--relocation-model=pic");     \
-  else                                               \
-    argvec.push_back ("--relocation-model=static");
-
 /* Add general target specific stuff */
 #include "llvm-i386-target.h"
 
-/* APPLE LOCAL end LLVM */
-
 #endif
+/* APPLE LOCAL end LLVM */

Modified: apple-local/branches/llvm/gcc/config/linux.h
===================================================================
--- apple-local/branches/llvm/gcc/config/linux.h	2007-05-28 11:27:34 UTC (rev 127758)
+++ apple-local/branches/llvm/gcc/config/linux.h	2007-05-29 05:30:03 UTC (rev 127759)
@@ -104,3 +104,17 @@
 #define TARGET_C99_FUNCTIONS 1
 
 #define TARGET_HAS_F_SETLKW
+
+/* APPLE LOCAL begin LLVM */
+#ifdef ENABLE_LLVM
+
+/* Yes, we're supporting PIC codegen for linux targets! */
+#define LLVM_SET_TARGET_OPTIONS(argvec)              \
+  if (flag_pic)                                      \
+    argvec.push_back ("--relocation-model=pic");     \
+  else                                               \
+    argvec.push_back ("--relocation-model=static");
+
+#endif
+/* APPLE LOCAL end LLVM */
+





More information about the llvm-commits mailing list