Bug 178792 - -march=native fails with clang on certain CPU's
Summary: -march=native fails with clang on certain CPU's
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: amd64 (show other bugs)
Version: 9.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-20 17:30 UTC by Bert Regeer
Modified: 2019-03-07 08:15 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bert Regeer 2013-05-20 17:30:00 UTC
When compiling with clang passing the flag "-march=native" causes clang to fail with the following error message:

touch test.c
clang -march=native test.c
error: unknown target CPU 'i686'

This is an issue when the Python has also been installed with clang as the compiler, as all of the python packages from pypi that require a c compiler will invoke clang with the -march=native and fail.

It is only on certain CPU's that I am able to replicate the issue, see the following output from dmesg:

FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012
    root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
CPU: Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz (2294.19-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x306a9  Family = 6  Model = 3a  Stepping = 9
  Features=0xfa3fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,DTS,MMX,FXSR,SSE,SSE2,SS>
  Features2=0x9e982203<SSE3,PCLMULQDQ,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,HV>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant

How-To-Repeat: touch test.c
clang -march=native test.c
Comment 1 Delta Regeer 2019-03-07 02:50:10 UTC
Several years later, this is no longer an issue on FreeBSD 12.0-RELEASE
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-03-07 08:15:15 UTC
Thank you for the update Bert, apologies that this issue didn't see progress sooner