Date: Sat, 4 Mar 2017 14:55:12 -0800 From: Mark Millard <markmi@dsl-only.net> To: Andrew Gierth <andrew@tao11.riddles.org.uk> Cc: freebsd-arm@freebsd.org Subject: Re: Is CPUTYPE=cortex-A7 supposed to work? Message-ID: <F4CC5572-6F66-482E-AEF4-0FFFFD88E089@dsl-only.net> In-Reply-To: <871suc3nv8.fsf@news-spur.riddles.org.uk> References: <871suc3nv8.fsf@news-spur.riddles.org.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2017-Mar-4, at 10:45 AM, Andrew Gierth <andrew@tao11.riddles.org.uk> = wrote: > Is building with CPUTYPE=3Dcortex-A7 (this is on an RPI2) known to = work, > known to not work, or of unknown working status? >=20 > --=20 > Andrew. I've not tried CPUTYPE. The below may be too far off your intent but I report it in case it is of use. Speaking of head and how close it gets to that by default for the kernel: # grep -r CONF_CFLAGS /usr/src/sys/arm/ | more . . . /usr/src/sys/arm/broadcom/bcm2835/std.bcm2836:makeoptions = CONF_CFLAGS=3D"-march=3Darmv7a" . . . /usr/src/sys/arm/conf/GENERIC:makeoptions = CONF_CFLAGS=3D"-march=3Darmv7a" . . . which is not as specific as -mcpu=3Dcortex-a7 but is more tailored than targeting any armv6. Both GENERIC and the RPI2 specific file in sys/arm/conf/ provide this. As for buildworld one can use the __MAKE_CONF file (such as /etc/make.conf ) have lines like: CFLAGS+=3D -mcpu=3Dcortex-a7 CXXFLAGS+=3D -mcpu=3Dcortex-a7 Side note on SRCCONF/SRC_ENV_CONF vs. such assignments: Unfortunately those +=3D assignments in a SRCCONF file (such as /etc/src.conf ) or SRC_ENV_CONF file mess up the /usr/src/share/mk/sys.mk behavior. See bugzilla 216299 --but one has to go through the comments after comment 2 in order to see that comment 2's claim is wrong as things are currently. A workaround in order to use just a SRCCONF/SRC_ENV_CONF file might be: CFLAGS.clang+=3D -mcpu=3Dcortex-a7 CXXFLAGS.clang+=3D -mcpu=3Dcortex-a7 CFLAGS.gcc+=3D -mcpu=3Dcortex-a7 CXXFLAGS.gcc+=3D -mcpu=3Dcortex-a7 so that either way the option is added but the use of ?=3D notation in /usr/src/share/mk/sys.mk is not prevented from doing the intended assignment. Of course one might want the /etc/make.conf broader usage as well (ports). There may be some ports that will not build right with such. Side note on stable/11 and release/11.0.1 : These do not have GENERIC but each RPI2 uses its std.bcm2836, which also has: makeoptions CONF_CFLAGS=3D"-march=3Darmv7a" =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F4CC5572-6F66-482E-AEF4-0FFFFD88E089>