Is CPUTYPE=cortex-A7 supposed to work?
Mark Millard
markmi at dsl-only.net
Sat Mar 4 22:55:21 UTC 2017
On 2017-Mar-4, at 10:45 AM, Andrew Gierth <andrew at tao11.riddles.org.uk> wrote:
> Is building with CPUTYPE=cortex-A7 (this is on an RPI2) known to work,
> known to not work, or of unknown working status?
>
> --
> 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="-march=armv7a"
. . .
/usr/src/sys/arm/conf/GENERIC:makeoptions CONF_CFLAGS="-march=armv7a"
. . .
which is not as specific as -mcpu=cortex-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+= -mcpu=cortex-a7
CXXFLAGS+= -mcpu=cortex-a7
Side note on SRCCONF/SRC_ENV_CONF vs. such assignments:
Unfortunately those += 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+= -mcpu=cortex-a7
CXXFLAGS.clang+= -mcpu=cortex-a7
CFLAGS.gcc+= -mcpu=cortex-a7
CXXFLAGS.gcc+= -mcpu=cortex-a7
so that either way the option is added but the use
of ?= 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="-march=armv7a"
===
Mark Millard
markmi at dsl-only.net
More information about the freebsd-arm
mailing list