[llvm-commits] [llvm] r73961 - in /llvm/trunk: autoconf/configure.ac include/llvm/Config/config.h.cmake include/llvm/Target/TargetSelect.h
Douglas Gregor
dgregor at apple.com
Tue Jun 23 10:21:48 PDT 2009
Author: dgregor
Date: Tue Jun 23 12:21:35 2009
New Revision: 73961
URL: http://llvm.org/viewvc/llvm-project?rev=73961&view=rev
Log:
Work around build problem with OpenJDK, which defines X86 as a
macro. Fixes PR 4427. Patch by Xerxes RĂ„nby!
Modified:
llvm/trunk/autoconf/configure.ac
llvm/trunk/include/llvm/Config/config.h.cmake
llvm/trunk/include/llvm/Target/TargetSelect.h
Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=73961&r1=73960&r2=73961&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Tue Jun 23 12:21:35 2009
@@ -447,7 +447,8 @@
# If so, define LLVM_NATIVE_ARCH to that LLVM target.
for a_target in $TARGETS_TO_BUILD; do
if test "$a_target" = "$LLVM_NATIVE_ARCH"; then
- AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCH,
+ LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target"
+ AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCHTARGET,
[LLVM architecture name for the native architecture, if available])
fi
done
Modified: llvm/trunk/include/llvm/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=73961&r1=73960&r2=73961&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/config.h.cmake Tue Jun 23 12:21:35 2009
@@ -582,4 +582,4 @@
#cmakedefine strdup ${strdup}
/* Native LLVM architecture */
-#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}
+#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}Target
Modified: llvm/trunk/include/llvm/Target/TargetSelect.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetSelect.h?rev=73961&r1=73960&r2=73961&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetSelect.h (original)
+++ llvm/trunk/include/llvm/Target/TargetSelect.h Tue Jun 23 12:21:35 2009
@@ -50,9 +50,9 @@
inline bool InitializeNativeTarget() {
// If we have a native target, initialize it to ensure it is linked in.
#ifdef LLVM_NATIVE_ARCH
-#define DoInit2(TARG, MOD) llvm::Initialize ## TARG ## MOD()
-#define DoInit(T, M) DoInit2(T, M)
- DoInit(LLVM_NATIVE_ARCH, Target);
+#define DoInit2(TARG) llvm::Initialize ## TARG ()
+#define DoInit(T) DoInit2(T)
+ DoInit(LLVM_NATIVE_ARCH);
return false;
#undef DoInit
#undef DoInit2
More information about the llvm-commits
mailing list