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

Sebastian Pop spop at codeaurora.org
Thu Oct 13 13:02:39 PDT 2011


On Thu, Oct 13, 2011 at 2:37 PM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> Check your patch for how LLVM_HOSTTRIPLE is used... I agree that the
> naming is suboptimal.

Yes, LLVM_HOSTTRIPLE is set from $host and is used in getHostTriple,
and that will return the host triple.  This is all fine for me.

I do not see why you would like to "derive LLVM_HOSTTRIPLE from $target
and not $host".  This does not make any sense to me and adds confusion.
It should even be the other way around, if you check configure --help
(the default values are in between square brackets):

  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

so the target is set to the host by default if --target is not specified.
The configure script takes care of initializing the $target value as documented.
Now what is missing in LLVM and Clang is the use of the value that configure
set in $target.  If you look in autoconf/configure.ac, $target is never used.

My patch uses the $target value to set up the default toolchain.

Thanks,
Sebastian Pop
--
Qualcomm Innovation Center, Inc is a member of Code Aurora Forum



More information about the cfe-commits mailing list