Page MenuHomeFreeBSD

D51935.id160437.diff
No OneTemporary

D51935.id160437.diff

diff --git a/Makefile.inc1 b/Makefile.inc1
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2708,8 +2708,17 @@
_basic_bootstrap_tools+=usr.sbin/tzsetup
.endif
-# certctl is needed as an install tool
+# certctl is needed as an install tool. libcrypto is rather light, so we'll
+# build that alongside it for platforms that don't expose headers for OpenSSL,
+# like macOS.
.if ${MK_CAROOT} != "no" && ${MK_OPENSSL} != "no"
+.if ${.MAKE.OS} == "Darwin" || ${.MAKE.OS} == "FreeBSD"
+BSTOOL_ARGS+= -DLIBCRYPTO_WITHOUT_SUBDIRS
+BSTOOL_ARGS+= -DLIBCRYPTO_WITHOUT_SCTP
+BSTOOL_ARGS+= -DWITHOUT_AUTO_ASM
+_bootstrap_libcrypto=secure/lib/libcrypto
+${_bt}-usr.sbin/certctl: ${_bt}-secure/lib/libcrypto
+.endif
_certctl=usr.sbin/certctl
.endif
@@ -2776,6 +2785,7 @@
${_strfile} \
usr.bin/dtc \
${_cat} \
+ ${_bootstrap_libcrypto} \
${_certctl} \
${_kbdcontrol} \
${_elftoolchain_libs} \
@@ -2813,8 +2823,9 @@
if [ "${_tool}" = "usr.bin/lex" ]; then \
${MAKE} DIRPRFX=${_tool}/ bootstrap; \
fi; \
- ${MAKE} DIRPRFX=${_tool}/ all; \
- ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP}/legacy install
+ ${MAKE} DIRPRFX=${_tool}/ ${BSTOOL_ARGS} all; \
+ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP}/legacy \
+ ${BSTOOL_ARGS} install
bootstrap-tools: ${_bt}-${_tool}
.endfor
diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile
--- a/secure/lib/libcrypto/Makefile
+++ b/secure/lib/libcrypto/Makefile
@@ -2,6 +2,9 @@
.if !defined(LIBCRYPTO_WITHOUT_SUBDIRS)
SUBDIR= engines modules
.endif
+.if defined(LIBCRYPTO_WITHOUT_SCTP)
+CFLAGS+= -DOPENSSL_NO_SCTP
+.endif
.include <bsd.own.mk>
.include <src.opts.mk>
diff --git a/share/mk/bsd.endian.mk b/share/mk/bsd.endian.mk
--- a/share/mk/bsd.endian.mk
+++ b/share/mk/bsd.endian.mk
@@ -20,10 +20,17 @@
#
# During bootstrapping on !FreeBSD OSes, we need to define some value. Short of
# having an exhaustive list for all variants of Linux and MacOS we simply do not
-# set TARGET_ENDIANNESS and poison the other variables. They should be unused
-# during the bootstrap phases (apart from one place that's adequately protected
-# in bsd.compiler.mk) where we're building the bootstrap tools.
+# set TARGET_ENDIANNESS (on Linux) and poison the other variables. They should
+# be unused during the bootstrap phases (apart from one place that's adequately
+# protected in bsd.compiler.mk) where we're building the bootstrap tools.
#
+.if ${.MAKE.OS} == "Darwin"
+# We do assume the endianness on macOS because Apple's modern hardware is all
+# little-endian. This might need revisited in the far future, but for the time
+# being Apple Silicon's reign of terror continues. We only set this one up
+# because libcrypto is now built in bootstrap.
+TARGET_ENDIANNESS= 1234
+.endif
CAP_MKDB_ENDIAN= -B # Poisoned value, invalid flags for both cap_mkdb
LOCALEDEF_ENDIAN= -B # and localedef.
.endif
diff --git a/tools/build/Makefile b/tools/build/Makefile
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -495,6 +495,7 @@
bin \
lib/geom \
usr/include/casper \
+ usr/include/openssl \
usr/include/private/ucl \
usr/include/private/zstd \
usr/lib \

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 20, 12:06 PM (13 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31838277
Default Alt Text
D51935.id160437.diff (3 KB)

Event Timeline