[LLVMbugs] [Bug 4427] New: LLVM_NATIVE_ARCH in config.h conflicts with compiler/ buildsystem platform arch defines

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jun 22 01:53:13 PDT 2009


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

Created an attachment (id=3111)
 --> (http://llvm.org/bugs/attachment.cgi?id=3111)

When compiling icedtea6 that have beenm modified to include TargetSelect.h and
use InitializeNativeTarget() my build fail with this error when compiling on

In file included from
                 from ../generated/incls/_compileBroker.cpp.incl:9,
/usr/local/include/llvm/Target/TargetSelect.h: In function 'bool
/usr/local/include/llvm/Target/TargetSelect.h:55: error: 'InitializeTarget' is
not a member of 'llvm'

The cause are that the icedtea6 buildsystem have defined X86 and this conflicts
with the LLVM_NATIVE_ARCH define in config.h.
The conflict makes LLVM_NATIVE_ARCH contan an empty string instead of the X86
string and this in turn makes the macro in config.h create InitializeTarget
instead of InitializeX86Target

The attached patch includes a workaround for this issue when building llvm
using cmake.

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