about summary refs log tree commit diff
path: root/pkgs/os-specific/bsd/freebsd/patches/14.0
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/bsd/freebsd/patches/14.0')
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/bmake-no-compiler-rt.patch11
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/compat-fix-typedefs-locations.patch32
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/compat-install-dirs.patch40
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/install-bootstrap-Makefile.patch11
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/libc-msun-arch-subdir.patch11
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/libc-no-force--lcompiler-rt.patch10
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/libcxxrt-headers.patch11
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/libnetbsd-do-install.patch32
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/librpcsvc-include-subdir.patch11
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/localedef.patch158
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/mtree-Makefile.patch13
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/no-perms-BSD.include.dist.patch11
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/rtld-no-force--lcompiler-rt.patch10
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/sys-gnu-date.patch13
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/sys-no-explicit-intrinsics-dep.patch42
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/14.0/tinfo-host-cc.patch15
16 files changed, 431 insertions, 0 deletions
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/bmake-no-compiler-rt.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/bmake-no-compiler-rt.patch
new file mode 100644
index 0000000000000..f43d87c01e549
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/bmake-no-compiler-rt.patch
@@ -0,0 +1,11 @@
+--- a/share/mk/src.libnames.mk	2023-12-21 23:56:50.767042385 -0800
++++ b/share/mk/src.libnames.mk	2023-12-21 23:56:39.671089506 -0800
+@@ -392,7 +392,7 @@
+ _DP_ztest=	geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs uutil icp
+ # The libc dependencies are not strictly needed but are defined to make the
+ # assert happy.
+-_DP_c=		compiler_rt
++_DP_c=		
+ # Use libssp_nonshared only on i386 and power*.  Other archs emit direct calls
+ # to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared.
+ .if ${MK_SSP} != "no" && \
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/compat-fix-typedefs-locations.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/compat-fix-typedefs-locations.patch
new file mode 100644
index 0000000000000..3336a2504e584
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/compat-fix-typedefs-locations.patch
@@ -0,0 +1,32 @@
+--- a/tools/build/cross-build/include/common/sys/_types.h
++++ b/tools/build/cross-build/include/common/sys/_types.h
+@@ -47,3 +47,6 @@
+  * Neither GLibc nor macOS define __va_list but many FreeBSD headers require it.
+  */
+ typedef __builtin_va_list __va_list;
++
++typedef __UINTPTR_TYPE__ __uintptr_t;
++typedef __INTPTR_TYPE__ __intptr_t;
+--- a/tools/build/cross-build/include/common/sys/types.h
++++ b/tools/build/cross-build/include/common/sys/types.h
+@@ -49,9 +49,6 @@
+ #include <sys/sysmacros.h>
+ #endif
+ 
+-typedef __UINTPTR_TYPE__ __uintptr_t;
+-typedef __INTPTR_TYPE__ __intptr_t;
+-
+ /* needed for gencat */
+ typedef int __nl_item;
+ 
+--- a/tools/build/cross-build/include/linux/sys/types.h
++++ b/tools/build/cross-build/include/linux/sys/types.h
+@@ -39,6 +39,8 @@
+ 
+ #include_next <sys/types.h>
+ 
++#include <sys/_types.h>
++
+ #ifndef __size_t
+ typedef __SIZE_TYPE__ __size_t;
+ #endif
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/compat-install-dirs.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/compat-install-dirs.patch
new file mode 100644
index 0000000000000..4bc21cf8eb147
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/compat-install-dirs.patch
@@ -0,0 +1,40 @@
+diff --git a/tools/build/Makefile b/tools/build/Makefile
+index 948a5f9dfdb..592af84eeae 100644
+--- a/tools/build/Makefile
++++ b/tools/build/Makefile
+@@ -327,14 +327,14 @@ host-symlinks:
+ # and cross-tools stages. We do this here using mkdir since mtree may not exist
+ # yet (this happens if we are crossbuilding from Linux/Mac).
+ INSTALLDIR_LIST= \
+-	bin \
+-	lib/geom \
+-	usr/include/casper \
+-	usr/include/private/ucl \
+-	usr/include/private/zstd \
+-	usr/lib \
+-	usr/libdata/pkgconfig \
+-	usr/libexec
++	${BINDIR} \
++	${LIBDIR}/geom \
++	${INCLUDEDIR}/casper \
++	${INCLUDEDIR}/private/ucl \
++	${INCLUDEDIR}/private/zstd \
++	${LIBDIR} \
++	${LIBDIR}/libdata/pkgconfig \
++	${LIBEXECDIR}
+ 
+ installdirs:
+ 	mkdir -p ${INSTALLDIR_LIST:S,^,${DESTDIR}/,}
+@@ -352,9 +352,9 @@ installdirs:
+ 	    rm -rf "${DESTDIR}/${_dir}"; \
+ 	fi
+ .endfor
+-	ln -sfn bin ${DESTDIR}/sbin
+-	ln -sfn ../bin ${DESTDIR}/usr/bin
+-	ln -sfn ../bin ${DESTDIR}/usr/sbin
++	ln -sfn bin ${DESTDIR}/${SBINDIR}
++	ln -sfn ../bin ${DESTDIR}/${BINDIR}
++	ln -sfn ../bin ${DESTDIR}/${SBINDIR}
+ .for _group in ${INCSGROUPS:NINCS}
+ 	mkdir -p "${DESTDIR}/${${_group}DIR}"
+ .endfor
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/install-bootstrap-Makefile.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/install-bootstrap-Makefile.patch
new file mode 100644
index 0000000000000..a69c5501ddd16
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/install-bootstrap-Makefile.patch
@@ -0,0 +1,11 @@
+--- a/usr.bin/xinstall/Makefile	2023-09-23 19:18:49.165192183 -0700
++++ b/usr.bin/xinstall/Makefile	2023-12-06 17:06:57.836888028 -0700
+@@ -14,7 +14,7 @@
+ CFLAGS+=	-I${SRCTOP}/lib/libnetbsd
+ 
+ LIBADD=		md
+-CFLAGS+=	-DWITH_MD5 -DWITH_RIPEMD160
++CFLAGS+=		-I${BSDSRCDIR}/contrib/libc-vis -I${BSDSRCDIR}/lib/libnetbsd
+ 
+ .ifdef BOOTSTRAPPING
+ # For the bootstrap we disable copy_file_range()
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/libc-msun-arch-subdir.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/libc-msun-arch-subdir.patch
new file mode 100644
index 0000000000000..4a69e85a986a0
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/libc-msun-arch-subdir.patch
@@ -0,0 +1,11 @@
+--- a/lib/libc/Makefile
++++ b/lib/libc/Makefile
+@@ -194,7 +194,7 @@ SUBDIR.${MK_TESTS}+= tests
+ # recording a build dependency
+ CFLAGS+= -I${SRCTOP}/lib/libutil
+ # Same issue with libm
+-MSUN_ARCH_SUBDIR != ${MAKE} -B -C ${SRCTOP}/lib/msun -V ARCH_SUBDIR
++MSUN_ARCH_SUBDIR = ${MACHINE_CPUARCH:S/i386/i387/}
+ # unfortunately msun/src contains both private and public headers
+ CFLAGS+= -I${SRCTOP}/lib/msun/${MSUN_ARCH_SUBDIR}
+ .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/libc-no-force--lcompiler-rt.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/libc-no-force--lcompiler-rt.patch
new file mode 100644
index 0000000000000..60176fb73cf76
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/libc-no-force--lcompiler-rt.patch
@@ -0,0 +1,10 @@
+--- a/lib/libc/Makefile
++++ b/lib/libc/Makefile
+@@ -58,7 +58,6 @@ CFLAGS+=${CANCELPOINTS_CFLAGS}
+ # Link with static libcompiler_rt.a.
+ #
+ LDFLAGS+= -nodefaultlibs
+-LIBADD+=	compiler_rt
+ 
+ .if ${MK_SSP} != "no" && \
+     (${LIBC_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "")
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/libcxxrt-headers.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/libcxxrt-headers.patch
new file mode 100644
index 0000000000000..256db9e2d9cf4
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/libcxxrt-headers.patch
@@ -0,0 +1,11 @@
+--- freebsd/lib/libcxxrt/Makefile	2024-05-30 14:27:42.328086005 -0700
++++ freebsd/lib/libcxxrt/Makefile.mod	2024-05-30 14:27:48.048014581 -0700
+@@ -19,6 +19,8 @@
+ SRCS+=		terminate.cc
+ SRCS+=		typeinfo.cc
+ 
++INCS+=cxxabi.h unwind.h unwind-arm.h unwind-itanium.h
++
+ WARNS?=		0
+ CFLAGS+=	-isystem ${SRCDIR} -nostdinc++
+ CXXSTD?=	c++14
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/libnetbsd-do-install.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/libnetbsd-do-install.patch
new file mode 100644
index 0000000000000..a7bd032d2be54
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/libnetbsd-do-install.patch
@@ -0,0 +1,32 @@
+diff --git a/Makefile b/Makefile
+index 22710f3d933..22effc848cf 100644
+--- a/lib/libnetbsd/Makefile
++++ b/lib/libnetbsd/Makefile
+@@ -9,6 +9,26 @@ CFLAGS+=	-I${.CURDIR}
+ 
+ SRCS+=	efun.c sockaddr_snprintf.c strsuftoll.c util.c util.h
+ 
+-INTERNALLIB=
++INCSGROUPS= INCS SYSINCS NETINETINCS
++
++INCS+= \
++	glob.h \
++	pthread.h \
++	rmd160.h \
++	sha1.h \
++	sha2.h \
++	stdlib.h \
++	util.h
++
++SYSINCSDIR= ${INCLUDEDIR}/sys
++SYSINCS+= \
++	sys/cdefs.h \
++	sys/event.h \
++	sys/types.h \
++	sys/wait.h
++
++NETINETINCSDIR= ${INCLUDEDIR}/netinet
++NETINETINCS+= \
++	netinet/in.h
+ 
+ .include <bsd.lib.mk>
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/librpcsvc-include-subdir.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/librpcsvc-include-subdir.patch
new file mode 100644
index 0000000000000..38e06682869fb
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/librpcsvc-include-subdir.patch
@@ -0,0 +1,11 @@
+--- a/lib/librpcsvc/Makefile
++++ b/lib/librpcsvc/Makefile
+@@ -20,7 +20,7 @@ OTHERSRCS+= yp_passwd.c yp_update.c
+ 
+ RPCCOM=	RPCGEN_CPP=${CPP:Q} rpcgen -C
+ 
+-INCDIRS= -I${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc
++INCDIRS= -I${INCLUDEDIR}/rpcsvc
+ 
+ CFLAGS+= -DYP ${INCDIRS}
+ 
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/localedef.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/localedef.patch
new file mode 100644
index 0000000000000..73a0341bd3240
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/localedef.patch
@@ -0,0 +1,158 @@
+diff --git a/include/_ctype.h b/include/_ctype.h
+index 91e6b1d14f6b..a6896b598da3 100644
+--- a/include/_ctype.h
++++ b/include/_ctype.h
+@@ -44,7 +44,7 @@
+ #define	__CTYPE_H_
+ 
+ #include <sys/cdefs.h>
+-#include <sys/_types.h>
++#include <sys/types.h>
+ 
+ #define	_CTYPE_A	0x00000100L		/* Alpha */
+ #define	_CTYPE_C	0x00000200L		/* Control */
+diff --git a/lib/libc/locale/collate.h b/lib/libc/locale/collate.h
+index 2d3723b49f5b..6bbff732b9d7 100644
+--- a/lib/libc/locale/collate.h
++++ b/lib/libc/locale/collate.h
+@@ -36,6 +36,7 @@
+ #ifndef _COLLATE_H_
+ #define	_COLLATE_H_
+ 
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+ #include <limits.h>
+diff --git a/usr.bin/localedef/charmap.c b/usr.bin/localedef/charmap.c
+index 44b7e3292eae..79c30b7cf372 100644
+--- a/usr.bin/localedef/charmap.c
++++ b/usr.bin/localedef/charmap.c
+@@ -31,6 +31,7 @@
+ /*
+  * CHARMAP file handling for localedef.
+  */
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+ #include <sys/tree.h>
+diff --git a/usr.bin/localedef/collate.c b/usr.bin/localedef/collate.c
+index 2a080773a95e..3f0030c638f5 100644
+--- a/usr.bin/localedef/collate.c
++++ b/usr.bin/localedef/collate.c
+@@ -31,6 +31,7 @@
+ /*
+  * LC_COLLATE database generation routines for localedef.
+  */
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+ #include <sys/tree.h>
+diff --git a/usr.bin/localedef/ctype.c b/usr.bin/localedef/ctype.c
+index ab7b76e57b2d..846c6d6480a8 100644
+--- a/usr.bin/localedef/ctype.c
++++ b/usr.bin/localedef/ctype.c
+@@ -32,6 +32,7 @@
+ /*
+  * LC_CTYPE database generation routines for localedef.
+  */
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <sys/tree.h>
+ 
+diff --git a/usr.bin/localedef/localedef.c b/usr.bin/localedef/localedef.c
+index 5ff146d6f655..ed69aa1f0c0e 100644
+--- a/usr.bin/localedef/localedef.c
++++ b/usr.bin/localedef/localedef.c
+@@ -32,7 +32,7 @@
+  * POSIX localedef.
+  */
+ #include <sys/cdefs.h>
+-#include <sys/endian.h>
++#include <endian.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ 
+diff --git a/usr.bin/localedef/messages.c b/usr.bin/localedef/messages.c
+index 6b8eb9d684dd..0155821d0e56 100644
+--- a/usr.bin/localedef/messages.c
++++ b/usr.bin/localedef/messages.c
+@@ -31,6 +31,7 @@
+ /*
+  * LC_MESSAGES database generation routines for localedef.
+  */
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/usr.bin/localedef/monetary.c b/usr.bin/localedef/monetary.c
+index 7a77ac7e256c..7636c4deca1f 100644
+--- a/usr.bin/localedef/monetary.c
++++ b/usr.bin/localedef/monetary.c
+@@ -31,6 +31,7 @@
+ /*
+  * LC_MONETARY database generation routines for localedef.
+  */
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/usr.bin/localedef/numeric.c b/usr.bin/localedef/numeric.c
+index 5533b7c10e1a..9c47494f815c 100644
+--- a/usr.bin/localedef/numeric.c
++++ b/usr.bin/localedef/numeric.c
+@@ -31,6 +31,7 @@
+ /*
+  * LC_NUMERIC database generation routines for localedef.
+  */
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/usr.bin/localedef/parser.y b/usr.bin/localedef/parser.y
+index 23b3b54f8a6e..e01330f0152d 100644
+--- a/usr.bin/localedef/parser.y
++++ b/usr.bin/localedef/parser.y
+@@ -33,6 +33,7 @@
+  * POSIX localedef grammar.
+  */
+ 
++#include <stdint.h>
+ #include <wchar.h>
+ #include <stdio.h>
+ #include <limits.h>
+diff --git a/usr.bin/localedef/scanner.c b/usr.bin/localedef/scanner.c
+index c6d45a993f28..b17670ef4b4a 100644
+--- a/usr.bin/localedef/scanner.c
++++ b/usr.bin/localedef/scanner.c
+@@ -32,6 +32,7 @@
+  * This file contains the "scanner", which tokenizes the input files
+  * for localedef for processing by the higher level grammar processor.
+  */
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/usr.bin/localedef/time.c b/usr.bin/localedef/time.c
+index 7a56e244c921..0e409a742d0a 100644
+--- a/usr.bin/localedef/time.c
++++ b/usr.bin/localedef/time.c
+@@ -31,6 +31,7 @@
+ /*
+  * LC_TIME database generation routines for localedef.
+  */
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/usr.bin/localedef/wide.c b/usr.bin/localedef/wide.c
+index 062e120e6912..a199cddb198d 100644
+--- a/usr.bin/localedef/wide.c
++++ b/usr.bin/localedef/wide.c
+@@ -34,6 +34,7 @@
+  * to the wide character forms used internally by libc.  Unfortunately,
+  * this approach means that we need a method for each and every encoding.
+  */
++#include <stdint.h>
+ #include <sys/cdefs.h>
+ #include <ctype.h>
+ #include <stdlib.h>
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/mtree-Makefile.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/mtree-Makefile.patch
new file mode 100644
index 0000000000000..2a6e560d1d287
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/mtree-Makefile.patch
@@ -0,0 +1,13 @@
+--- a/contrib/mtree/Makefile	2023-12-04 23:02:13.919144141 -0700
++++ b/contrib/mtree/Makefile		2023-12-04 23:02:58.371810109 -0700
+@@ -10,8 +10,8 @@
+ SRCS=  compare.c crc.c create.c excludes.c misc.c mtree.c spec.c specspec.c \
+        verify.c getid.c pack_dev.c only.c
+ .if (${HOSTPROG:U} == "")
+-DPADD+= ${LIBUTIL}
+-LDADD+= -lutil
++LIBADD+= ${LIBUTIL}
++#LIBADD+= -lutil
+ .endif
+
+ CPPFLAGS+=	-I${NETBSDSRCDIR}/sbin/mknod
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/no-perms-BSD.include.dist.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/no-perms-BSD.include.dist.patch
new file mode 100644
index 0000000000000..985617ee0f457
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/no-perms-BSD.include.dist.patch
@@ -0,0 +1,11 @@
+--- a/etc/mtree/BSD.include.dist
++++ b/etc/mtree/BSD.include.dist
+@@ -3,7 +3,7 @@
+ # Please see the file src/etc/mtree/README before making changes to this file.
+ #
+ 
+-/set type=dir uname=root gname=wheel mode=0755
++/set type=dir
+ .
+     arpa
+     ..
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/rtld-no-force--lcompiler-rt.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/rtld-no-force--lcompiler-rt.patch
new file mode 100644
index 0000000000000..45f0d0c51eec0
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/rtld-no-force--lcompiler-rt.patch
@@ -0,0 +1,10 @@
+--- a/libexec/rtld-elf/Makefile
++++ b/libexec/rtld-elf/Makefile
+@@ -86,7 +86,6 @@ 
+ 
+ # Some of the required math functions (div & mod) are implemented in
+ # libcompiler_rt on some architectures.
+-LIBADD+=	compiler_rt
+ 
+ .include <bsd.prog.mk>
+ ${PROG_FULL}:  ${VERSION_MAP}
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/sys-gnu-date.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/sys-gnu-date.patch
new file mode 100644
index 0000000000000..2356446baf853
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/sys-gnu-date.patch
@@ -0,0 +1,13 @@
+diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
+index c594724d814..d5287c7b992 100644
+--- a/sys/conf/newvers.sh
++++ b/sys/conf/newvers.sh
+@@ -177,7 +177,7 @@ u=${USER:-root}
+ d=$(pwd)
+ h=${HOSTNAME:-$(hostname)}
+ if [ -n "$SOURCE_DATE_EPOCH" ]; then
+-	if ! t=$(date -r $SOURCE_DATE_EPOCH 2>/dev/null); then
++	if ! t=$(date -d @$SOURCE_DATE_EPOCH 2>/dev/null); then
+ 		echo "Invalid SOURCE_DATE_EPOCH" >&2
+ 		exit 1
+ 	fi
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/sys-no-explicit-intrinsics-dep.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/sys-no-explicit-intrinsics-dep.patch
new file mode 100644
index 0000000000000..5cf926d4519b2
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/sys-no-explicit-intrinsics-dep.patch
@@ -0,0 +1,42 @@
+--- a/sys/modules/aesni/Makefile	2023-12-16 09:19:28.454892154 -0700
++++ b/sys/Modules/aesni/Makefile	2023-12-16 09:19:41.975047684 -0700
+@@ -1,6 +1,5 @@
+ 
+ .PATH: ${SRCTOP}/sys/crypto/aesni
+-.PATH: ${SRCTOP}/contrib/llvm-project/clang/lib/Headers
+ 
+ KMOD=	aesni
+ SRCS=	aesni.c
+@@ -39,8 +38,8 @@
+ aesni_ghash.o: aesni.h
+ aesni_wrap.o: aesni.h
+ aesni_ccm.o: aesni.h
+-intel_sha1.o: sha_sse.h immintrin.h shaintrin.h tmmintrin.h xmmintrin.h
+-intel_sha256.o: sha_sse.h immintrin.h shaintrin.h tmmintrin.h xmmintrin.h
++intel_sha1.o: sha_sse.h
++intel_sha256.o: sha_sse.h
+ 
+ .include <bsd.kmod.mk>
+ 
+diff --git a/sys/modules/blake2/Makefile b/sys/modules/blake2/Makefile
+index e4b3fb9f126..5bfd9c2ae02 100644
+--- a/sys/modules/blake2/Makefile
++++ b/sys/modules/blake2/Makefile
+@@ -3,7 +3,6 @@
+ .PATH:	${SRCTOP}/sys/contrib/libb2
+ .PATH:	${SRCTOP}/sys/crypto/blake2
+ .PATH:	${SRCTOP}/sys/opencrypto
+-.PATH:	${SRCTOP}/contrib/llvm-project/clang/lib/Headers
+ 
+ KMOD	= blake2
+ 
+@@ -64,8 +63,7 @@ ${src:S/.c/.o/}: ${src}
+ 	    -D_MM_MALLOC_H_INCLUDED -Wno-unused-function ${.IMPSRC}
+ 	${CTFCONVERT_CMD}
+ 
+-${src:S/.c/.o/}: intrin.h emmintrin.h tmmintrin.h smmintrin.h immintrin.h \
+-    x86intrin.h ${SRCS:M*.h}
++${src:S/.c/.o/}: ${SRCS:M*.h}
+ .endfor
+ 
+ # FreeBSD-specific sources:
diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/tinfo-host-cc.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/tinfo-host-cc.patch
new file mode 100644
index 0000000000000..6446322a8a0a3
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/tinfo-host-cc.patch
@@ -0,0 +1,15 @@
+--- a/lib/ncurses/tinfo/Makefile	2023-12-26 23:02:07.827892619 -0800
++++ b/lib/ncurses/tinfo/Makefile	2023-12-26 23:01:24.175546100 -0800
+@@ -282,10 +282,10 @@
+ build-tools: make_hash make_keys
+ 
+ make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META}
+-	${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c
++	${CC_HOST:N${CCACHE_BIN}} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c
+ 
+ make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META}
+-	${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} -DMAIN_PROGRAM \
++	${CC_HOST:N${CCACHE_BIN}} -o $@ ${CFLAGS} -DMAIN_PROGRAM \
+ 		${NCURSES_DIR}/ncurses/tinfo/make_hash.c
+ .endif
+ .if ${MK_DIRDEPS_BUILD} == "yes" && ${MACHINE} != "host"