Re: the clang compiler does not support '-march=native'

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Mon, 14 Jun 2021 22:18:21 +0200
On 14 Jun 2021, at 22:08, tech-lists <tech-lists_at_zyxst.net> wrote:
> 
> There's a program I'd like to compile, but I'm getting an error "the
> clang compiler does not support '-march=native'"
> 
> % clang --version
> FreeBSD clang version 11.0.1 (git_at_github.com:llvm/llvm-project.git
> llvmorg-11.0.1-0-g43ff75f2c3fe)
> Target: aarch64-unknown-freebsd13.0
> Thread model: posix
> InstalledDir: /usr/bin
> 
> Is this because I have this in /etc/src.conf:
> 
> WITHOUT_LLVM_TARGET_ALL=
> WITH_LLVM_TARGET_AARCH64=
> WITH_LLVM_TARGET_ARM=
> 
> (this is on a rpi4 arm64.aarch64)

No, this is because whatever you are trying to compile has apparently
hardcoded "-march=native" in its compile flags. Try removing that. :)

-Dimitry


Received on Mon Jun 14 2021 - 20:18:21 UTC

Original text of this message