[llvm-commits] [PATCH] Fix for bug 11060: configure --target does not work

Sebastian Pop spop at codeaurora.org
Thu Oct 13 09:51:10 PDT 2011


Hi,

the attached patches make the configure option --target usable to build
a compiler that will target by default the architecture specified by this flag.
Without these patches, clang builds a toolchain that targets the host
unless the option -ccc-host-triple is used (I think this flag should be called
-ccc-target-triple and renamed in a different patch.)

The first patch 0001-add-getDefaultTargetTriple.patch defines
LLVM_DEFAULT_TARGET_TRIPLE based on the value of $target set by
the configure script.  This is then used in llvm::sys::getDefaultTargetTriple
to return the triple corresponding to the target architecture.

The second patch 0001-use-getDefaultTargetTriple-instead-of-getHostTriple.patch
is against clang, and it replaces all the uses of llvm::sys::getHostTriple
with llvm::sys::getDefaultTargetTriple.

The patches have been tested on amd64-linux with no extra configure flags,
and with specifying the --target flag to build cross compilers to arm and other
architectures.  Ok to apply?

Thanks,
Sebastian Pop
--
Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-add-getDefaultTargetTriple.patch
Type: text/x-diff
Size: 5782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111013/11293b3d/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-use-getDefaultTargetTriple-instead-of-getHostTriple.patch
Type: text/x-diff
Size: 3791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111013/11293b3d/attachment-0001.patch>


More information about the llvm-commits mailing list