Date: Sun, 24 Mar 2019 13:30:08 -0700 From: Mark Millard <marklmi@yahoo.com> To: ports-list freebsd <freebsd-ports@freebsd.org> Subject: Re: lang/go14 doesn't build without COMPAT11 in FREEBSD 12 Message-ID: <46AC6493-212B-4153-B2C6-8E748C8CD19D@yahoo.com>
next in thread | raw e-mail | index | archive | help
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=C3=A3es wrote: > > I found a few bugs since I started rebuilding my system. > > Most of them are related with the lack of handling of CPUTYPE=3Dnative= make.conf tunable. >=20 > Use CPUTYPE?=3Dnative instead of CPUTYPE=3Dnative. # 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=3D${CPUTYPE} . I'll note that -march=3Dnative or -mcpu=3Dnative 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?=3D${CPUTYPE} Makefile.inc1:_CPUTYPE!=3D MAKEFLAGS=3D = CPUTYPE=3D${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \ Makefile.inc1: -m ${.CURDIR}/share/mk MK_AUTO_OBJ=3Dno -V = CPUTYPE Makefile.inc1:.error CPUTYPE global should be set with ?=3D. Makefile.inc1: CPUTYPE=3D${TARGET_CPUTYPE} Makefile.inc1: @echo For ZSH you must run: export = CPUTYPE=3D${TARGET_CPUTYPE} Makefile.inc1:XDEV_CPUTYPE?=3D${CPUTYPE} Makefile.inc1: CPUTYPE=3D${XDEV_CPUTYPE} Makefile.libcompat:LIBSOFTWMAKEENV=3D CPUTYPE=3Dsoft MACHINE=3Darm = MACHINE_ARCH=3D${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} =3D=3D "crusoe" share/mk/bsd.cpu.mk:. elif ${CPUTYPE} =3D=3D "k5" share/mk/bsd.cpu.mk:. elif ${CPUTYPE} =3D=3D "c7" share/mk/bsd.cpu.mk:_CPUCFLAGS =3D -march=3D${CPUTYPE} share/mk/bsd.cpu.mk:_CPUCFLAGS =3D -march=3D${CPUTYPE} share/mk/bsd.cpu.mk:. if ${CPUTYPE} =3D=3D "xscale" share/mk/bsd.cpu.mk:. elif ${CPUTYPE:M*soft*} !=3D "" . . . (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} =3D=3D "i386" . . . . if ${CPUTYPE} =3D=3D "crusoe" _CPUCFLAGS =3D -march=3Di686 -falign-functions=3D0 -falign-jumps=3D0 = -falign-loops=3D0 . elif ${CPUTYPE} =3D=3D "k5" _CPUCFLAGS =3D -march=3Dpentium . elif ${CPUTYPE} =3D=3D "c7" _CPUCFLAGS =3D -march=3Dc3-2 . else _CPUCFLAGS =3D -march=3D${CPUTYPE} . endif . . . . elif ${MACHINE_ARCH} =3D=3D "powerpc" . if ${CPUTYPE} =3D=3D "e500" _CPUCFLAGS =3D -Wa,-me500 -msoft-float . else _CPUCFLAGS =3D -mcpu=3D${CPUTYPE} -mno-powerpc64 . endif and: . elif ${MACHINE_CPUARCH} =3D=3D "amd64" . . . . elif ${CPUTYPE} =3D=3D "goldmont" || ${CPUTYPE} =3D=3D "westmere" || = \ ${CPUTYPE} =3D=3D "nehalem" || ${CPUTYPE} =3D=3D "silvermont" MACHINE_CPU =3D 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. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46AC6493-212B-4153-B2C6-8E748C8CD19D>