[LLVMbugs] [Bug 7852] New: LLVM_NATIVE_ARCHNAME in llvm-config.h conflicts with compiler/buildsystem platform arch defines

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 9 10:02:03 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7852

           Summary: LLVM_NATIVE_ARCHNAME in llvm-config.h conflicts with
                    compiler/buildsystem platform arch defines
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: xerxes at zafena.se
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=5351)
 --> (http://llvm.org/bugs/attachment.cgi?id=5351)
9aug-llvm-config-no-arch-macro.patch

llvm r110109 defines LLVM_NATIVE_ARCHNAME
http://llvm.org/viewvc/llvm-project?view=rev&revision=110109

If X86 are defined then when calling
InitializeNativeTargetAsmPrinter()

the macro expands into
LLVMInitializeAsmPrinter() that dont exist.
instead of
LLVMInitializeX86AsmPrinter() that do exist.


Error during compilation of OpenJDK:
g++ -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -DIA32 -DZERO_LIBARCH=\"i386\"
-DPRODUCT -I. -I../generated/adfiles -I../generated/jvmtifiles
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/asm
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/c1
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/ci
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/classfile
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/code
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/compiler
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/gc_implementation
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/gc_implementation/g1
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/gc_implementation/parNew
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/gc_implementation/shared
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/gc_interface
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/interpreter
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/memory
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/oops
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/prims
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/runtime
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/services
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/shark
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/utilities
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/cpu/zero/vm
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/os/linux/vm
-I/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/os_cpu/linux_zero/vm
-I../generated -DHOTSPOT_RELEASE_VERSION="\"17.0-b16\""
-DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"xerxes\""
-DHOTSPOT_LIB_ARCH=\"i386\" -DJRE_RELEASE_VERSION="\"1.6.0_20-b20\""
-DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DDERIVATIVE_ID="\"IcedTea6
1.9pre+r87f0c2edefcf\"" -DDISTRIBUTION_ID="\"Built on Ubuntu 10.04.1 LTS (Mon
Aug  9 12:49:55 CEST 2010)\"" -DSHARK 
-I/home/xerxes/llvm-configure-shared/../llvm/include
-I/home/xerxes/llvm-configure-shared/include -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DSHARK_LLVM_VERSION=28 -fpic
-fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -m32 -pipe -g -O3
-fno-strict-aliasing -DVM_LITTLE_ENDIAN -Werror -Wpointer-arith -Wsign-compare 
  -c -o compilerOracle.o
/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/compiler/compilerOracle.cpp 
In file included from
/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp:47,
                 from ../generated/incls/_compileBroker.cpp.incl:8,
                 from
/home/xerxes/icedtea6-shark-llvm2.8/openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp:26:
/home/xerxes/llvm-configure-shared/../llvm/include/llvm/Target/TargetSelect.h:
In function 'bool llvm::InitializeNativeTargetAsmPrinter()':
/home/xerxes/llvm-configure-shared/../llvm/include/llvm/Target/TargetSelect.h:125:
error: 'LLVMInitializeAsmPrinter' was not declared in this scope


I have attached a proposed patch that fixes this behaviour by resolving what
LLVMInitialize${NATIVE_ARCH}ASMPrinter and
LLVMInitialize${NATIVE_ARCH}TargetInfo to use at config.h generation time.

I need help regenerate configure and commiting this by someone who have a
working autoconf 2.60 setup.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list