[LLVMbugs] [Bug 11060] New: configure --target does not work
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Oct 4 14:15:52 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11060
Summary: configure --target does not work
Product: Build scripts
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: autoconf
AssignedTo: unassignedbugs at nondot.org
ReportedBy: spop at codeaurora.org
CC: llvmbugs at cs.uiuc.edu, daniel at zuster.org
I tried to build a cross compiler configuring llvm with --host=x86
--target=arm. The clang driver outputs x86 assembly and the only way
to output arm assembly is by specifying a -ccc-host-triple option.
It seems like clang decides to target the host machine by default, and
not the machine that has been specified on the configure line using
the --target option. There are several places in clang that call
llvm::sys::getHostTriple() to initialize the *target* driver:
- lib/Frontend/CompilerInvocation.cpp: in ParseTargetArgs
- lib/Frontend/CreateInvocationFromCommandLine.cpp: in
clang::createInvocationFromCommandLine
- tools/driver/cc1as_main.cpp: in AssemblerInvocation::CreateFromArgs
- tools/driver/driver.cpp: in main
- examples/clang-interpreter/main.cpp: in main
In all these places I would suggest to replace the call to
llvm::sys::getHostTriple() with a call to a yet to be written function
llvm::sys::getDefaultTargetTriple() that would return the default
triple that we get from configure --target.
Comments are welcome on how to better fix this.
Thanks,
Sebastian Pop
--
Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
--
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