Date: Tue, 27 Sep 2011 14:17:18 +0200 From: rank1seeker@gmail.com To: hackers@freebsd.org Subject: Upon crosscompile, set optimizations for target arch, breaks compilation Message-ID: <20110927.121718.234.3@DEV>
next in thread | raw e-mail | index | archive | help
8.2 RELEASE
On 32bit (i386) machine(CPU: athlonxp) I crosssompile for 64bit (amd64) machine(CPU: core2duo) and it works.
But when I set optimization in make.conf:
--
CPUTYPE?=core2
CFLAGS+=-march=native
NO_CPU_CFLAGS=yes
COPTFLAGS+=-march=native
NO_CPU_COPTFLAGS=yes
--
Results in make's vars set:
CPUTYPE: prescott
MACHINE_CPU: sse3 sse2 sse i686 mmx i586 i486 i386
Build fails with error:
--
/usr/src/gnu/lib/libgcc/../../../contrib/gcc/libgcc2.c:1: error: CPU you selected does not support x86-64 instruction set
--
Because make vars TRANSLATION was incorectly done, as it looks in running arch instead of TARGET arch!
core2 will be translated into prescott or nacona, depending on arch:
prescott --> 32bit (i386)
nocona --> 64bit (amd64)
CPUTYPE was supposed to be nocona
Domagoj Smolčić
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110927.121718.234.3>
