Re: Clang error make buildworld

From: Pan Tsu <inyaoo_at_gmail.com>
Date: Fri, 06 May 2011 17:50:58 +0400
Olivier Smedts <olivier_at_gid0.org> writes:

> 2011/5/5 Roman Divacky <rdivacky_at_freebsd.org>:
>>> Because with clang, -march=native often breaks buildworld, while
>>> -march=core2 is ok.
>>
>> Can you be more specific about this claim? On what CPU are seeing
>> this breakage?
>
> Ok, with latest HEAD...
>
> %echo | gcc -march=native -E -v -x c -### -
> Using built-in specs.
> Target: amd64-undermydesk-freebsd
> Configured with: FreeBSD/amd64 system compiler
> Thread model: posix
> gcc version 4.2.2 20070831 prerelease [FreeBSD]
>  "/usr/libexec/cc1" "-E" "-quiet" "-v" "-D_LONGLONG" "-"
> "-march=core2" "-mtune=generic"
>
> With "-march=native", gcc adds "-mtune=generic" while the man pages
> says "-march=xxx" sets "-mtune=xxx".

No longer true for `-march=native' on more recent GCC versions.

  $ gcc46 -v -march=native foo.c |& fgrep cc1 # C2D E8400
   ...-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32
   --param l1-cache-line-size=64 --param l2-cache-size=6144
   -mtune=core2...

  $ gcc46 -v -march=core2 foo.c |& fgrep cc1
   ...-march=core2...

  $ clang -v -march=native foo.c |& grep -o -- '-target-cpu \w*'
  -target-cpu penryn
Received on Fri May 06 2011 - 11:51:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC