From bcba7f95c2c79eb6526b3729b08f9e881a11e858 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 23 Jun 2009 17:21:35 +0000 Subject: [PATCH] =?utf8?q?Work=20around=20build=20problem=20with=20OpenJDK?= =?utf8?q?,=20which=20defines=20X86=20as=20a=20macro.=20Fixes=20PR=204427.?= =?utf8?q?=20Patch=20by=20Xerxes=20R=C3=A5nby!?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73961 91177308-0d34-0410-b5e6-96231b3b80d8 --- autoconf/configure.ac | 3 ++- include/llvm/Config/config.h.cmake | 2 +- include/llvm/Target/TargetSelect.h | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index bd05891a9dc..0abe2347957 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -447,7 +447,8 @@ AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) # 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 diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index c59ed23d8b2..4356e7dc145 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -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 diff --git a/include/llvm/Target/TargetSelect.h b/include/llvm/Target/TargetSelect.h index 8544eed76be..8aa314ac774 100644 --- a/include/llvm/Target/TargetSelect.h +++ b/include/llvm/Target/TargetSelect.h @@ -50,9 +50,9 @@ namespace llvm { 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 -- 2.34.1