[llvm-dev] clang triple and clang target

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 14 12:15:57 PDT 2016


Hi Rail,

In general we follow the GCC options, documented at
https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html for x86 (and
similar places for ARM etc). There may be gaps in what Clang supports,
and possibly even oddities that we support but GNU doesn't (--target
being a case in point). But in general if you're trying to use an
option not listed there you should expect to have a bad time of it.

On 14 March 2016 at 11:37, Rail Shafigulin <rail at esenciatech.com> wrote:
> clang-3.5: warning: argument unused during compilation: '-mfloat-abi=hard'

Fair enough, there's no soft-float ABI for x86_64.

> clang-3.5: warning: argument unused during compilation: '-mcpu=k8'

x86 uses -march and -mtune instead of -mcpu.
> clang-3.5: warning: argument unused during compilation: '-mfpu=SSE2'

I believe x86 uses "-msse2" for this, but since k8 already has SSE2
(like all 64-bit chips) it shouldn't be needed anyway.

> error: unable to create target: 'No available targets are compatible with
> this triple, see -version for the available targets.'

This I can't explain. It works for me here, where are you getting your
clang from?

> clang version 3.5.0
> Target: x86_64-unknown-linux-gnu
> Thread model: posix

Perhaps try updating Clang? Version 3.5 is getting long in the tooth now.

Cheers.

Tim.


More information about the llvm-dev mailing list