HomeFreeBSD

share/mk: Fix a heuristic in bsd.cpu.mk

Description

share/mk: Fix a heuristic in bsd.cpu.mk

When cross-building from MacOS we have MACHINE=arm64 MACHINE_ARCH=arm,
so bsd.cpu.mk infers that sizeof(long) == 4, but of course it isn't.
This breaks the bootstrap build of openssl, which tests
MACHINE_ABI:Mlong64 to decide whether to build ecp_nistp224.c. It
doesn't, and crypto/openssl/freebsd/include/openssl/configuration.h
undefines OPENSSL_NO_EC_NISTP_64_GCC_128, so we end up with a link
error.

Reviewed by: ngie, emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D52340

(cherry picked from commit 4341f92251ae00c3f82904623bfd561bb8ea49fb)

Details

Provenance
markjAuthored on Sep 7 2025, 4:07 PM
Reviewer
ngie
Differential Revision
D52340: share/mk: Fix a heuristic in bsd.cpu.mk
Parents
rG96cd2eb699f7: release: Prepare Vagrant cloudware images for building as non-root
Branches
Unknown
Tags
Unknown