build failures after stdlib update

Scot Hetzel swhetzel at gmail.com
Tue Mar 23 02:57:59 UTC 2010


On Sun, Mar 21, 2010 at 7:29 PM, jhell <jhell at dataix.net> wrote:
> Native is equal to CPUTYPE not being defined right ?
>
Built into GCC is the ability to auto-detect the CPUTYPE when
-mtune=native, if you run this command GCC will tell  ouput your
processor type:

gcc -v -x c -E -mtune=native /dev/null -o /dev/null 2>&1 | grep mtune
| sed -e 's/.*mtune=//'

> So if the above is true why would you set CPUTYPE to native in the first
> place ? when you can just leave it unset and its equal to native.
>

Native allows one to build the sources to the current build machines
cputype.  There is one bug when setting the CPUTYPE to native, the
FreeBSD build system fails to correctly set the MACHINE_CPU to the
correct value.

I had discovered this problem back in May 2007:

http://www.freebsd.org/cgi/query-pr.cgi?pr=112997

Just apply the last patch to share/mk/bsd.cpu.mk and that will fix the problem.

Scot


More information about the freebsd-current mailing list