lang/go14 doesn't build without COMPAT11 in FREEBSD 12
Mark Millard
marklmi at yahoo.com
Sun Mar 24 20:30:16 UTC 2019
Eugene Grosbein eugen at grosbein.net wrote on
Sat Mar 23 23:16:40 UTC 2019 :
24.03.2019 1:38, Lucas Nali de Magalhães wrote:
> > I found a few bugs since I started rebuilding my system.
> > Most of them are related with the lack of handling of CPUTYPE=native make.conf tunable.
>
> Use CPUTYPE?=native instead of CPUTYPE=native.
# grep -r CPUTYPE Makefile* share/mk/ | grep -i native
#
There is no special handling of 'native'.
By contrast there is testing of specific values, used
to determine MACHINE_CPU 's list of features, not just
use of -march=${CPUTYPE} . I'll note that -march=native
or -mcpu=native for compilers does not work on all
architectures, only some. Others just report the lack
of support.
# grep -r '\<CPUTYPE\>' Makefile* share/mk/ | more
Makefile.inc1:TARGET_CPUTYPE?=${CPUTYPE}
Makefile.inc1:_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \
Makefile.inc1: -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE
Makefile.inc1:.error CPUTYPE global should be set with ?=.
Makefile.inc1: CPUTYPE=${TARGET_CPUTYPE}
Makefile.inc1: @echo For ZSH you must run: export CPUTYPE=${TARGET_CPUTYPE}
Makefile.inc1:XDEV_CPUTYPE?=${CPUTYPE}
Makefile.inc1: CPUTYPE=${XDEV_CPUTYPE}
Makefile.libcompat:LIBSOFTWMAKEENV= CPUTYPE=soft MACHINE=arm MACHINE_ARCH=${TARGET_ARCH}
. . . (omitting transforations to standardized CPUTYPE names) . . .
share/mk/bsd.cpu.mk:# after /etc/make.conf so it can react to the local value of CPUTYPE
share/mk/bsd.cpu.mk:. if ${CPUTYPE} == "crusoe"
share/mk/bsd.cpu.mk:. elif ${CPUTYPE} == "k5"
share/mk/bsd.cpu.mk:. elif ${CPUTYPE} == "c7"
share/mk/bsd.cpu.mk:_CPUCFLAGS = -march=${CPUTYPE}
share/mk/bsd.cpu.mk:_CPUCFLAGS = -march=${CPUTYPE}
share/mk/bsd.cpu.mk:. if ${CPUTYPE} == "xscale"
share/mk/bsd.cpu.mk:. elif ${CPUTYPE:M*soft*} != ""
. . . (it is a long list of cases) . . .
Note that:
Taking a couple of examples from the cases (one for _CPUCFLAGS
and one for MACHINE_CPU):
. if ${MACHINE_CPUARCH} == "i386"
. . .
. if ${CPUTYPE} == "crusoe"
_CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
. elif ${CPUTYPE} == "k5"
_CPUCFLAGS = -march=pentium
. elif ${CPUTYPE} == "c7"
_CPUCFLAGS = -march=c3-2
. else
_CPUCFLAGS = -march=${CPUTYPE}
. endif
. . .
. elif ${MACHINE_ARCH} == "powerpc"
. if ${CPUTYPE} == "e500"
_CPUCFLAGS = -Wa,-me500 -msoft-float
. else
_CPUCFLAGS = -mcpu=${CPUTYPE} -mno-powerpc64
. endif
and:
. elif ${MACHINE_CPUARCH} == "amd64"
. . .
. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \
${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont"
MACHINE_CPU = sse42 sse41 ssse3 sse3
MACHINE_CPU ends up without such for 'native' as CPUTYPE as far
as I can tell.
To my knowledge, FreeBSD has never figured out the MACHINE_CPU
assignment for 'native' as CPUTYPE.
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-ports
mailing list