Skip to content

Commit

Permalink
Merge remote-tracking branch 'freebsd/main' into hardened/current/master
Browse files Browse the repository at this point in the history
Conflicts:
	share/mk/src.opts.mk (unresolved)
  • Loading branch information
lattera committed Jul 26, 2023
2 parents 37ad9dc + 232b922 commit 3a1e0ec
Show file tree
Hide file tree
Showing 111 changed files with 1,656 additions and 1,348 deletions.
36 changes: 21 additions & 15 deletions Makefile.inc1
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ _t= ${TARGET_ARCH}/${TARGET}
.endif
.endfor

.if ${TARGET_ARCH} == "amd64"
LIBCOMPAT_INCLUDE_DIRS+= i386
.elif ${TARGET_ARCH} == "aarch64"
LIBCOMPAT_INCLUDE_DIRS+= arm
.endif

.if ${.MAKE.OS} != "FreeBSD"
CROSSBUILD_HOST=${.MAKE.OS}
.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin"
Expand Down Expand Up @@ -1086,9 +1092,9 @@ _bootstrap-tools:
-p ${WORLDTMP}/usr >/dev/null
${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${WORLDTMP}/usr/include >/dev/null
.if ${TARGET_ARCH} == "amd64"
mkdir -p ${WORLDTMP}/usr/include/i386
.endif
.for d in ${LIBCOMPAT_INCLUDE_DIRS}
mkdir -p ${WORLDTMP}/usr/include/${d}
.endfor
ln -sf ${.CURDIR}/sys ${WORLDTMP}
.if ${MK_DEBUG_FILES} != "no"
${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
Expand Down Expand Up @@ -1421,9 +1427,9 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
-p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null
.if ${TARGET_ARCH} == "amd64"
-mkdir ${DESTDIR}/${DISTDIR}/${dist}/usr/include/i386
.endif
.for d in ${LIBCOMPAT_INCLUDE_DIRS}
-mkdir ${DESTDIR}/${DISTDIR}/${dist}/usr/include/${d}
.endfor
.if ${MK_DEBUG_FILES} != "no"
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null
Expand Down Expand Up @@ -1452,9 +1458,9 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
.if ${TARGET_ARCH} == "amd64"
echo "./${dist}/usr/include/i386 type=dir uname=root gname=wheel mode=0755" >> ${METALOG}
.endif
.for d in ${LIBCOMPAT_INCLUDE_DIRS}
echo "./${dist}/usr/include/${d} type=dir uname=root gname=wheel mode=0755" >> ${METALOG}
.endfor
.for libcompat in ${libcompats}
${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
Expand Down Expand Up @@ -2897,9 +2903,9 @@ native-xtools-install: .PHONY
-p ${NXBDESTDIR}/usr >/dev/null
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${NXBDESTDIR}/usr/include >/dev/null
.if ${TARGET_ARCH} == "amd64"
mkdir -p ${NXBDESTDIR}/usr/include/i386
.endif
.for d in ${LIBCOMPAT_INCLUDE_DIRS}
mkdir -p ${NXBDESTDIR}/usr/include/${d}
.endfor
${_+_}cd ${.CURDIR}; ${NXBMAKE} \
DESTDIR=${NXBDESTDIR} \
-DNO_ROOT \
Expand Down Expand Up @@ -3585,9 +3591,9 @@ _xi-mtree: .PHONY
-p ${XDDESTDIR}/usr >/dev/null
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${XDDESTDIR}/usr/include >/dev/null
.if ${TARGET_ARCH} == "amd64"
mkdir -p ${XDDESTDIR}/usr/include/i386
.endif
.for d in ${LIBCOMPAT_INCLUDE_DIRS}
mkdir -p ${XDDESTDIR}/usr/include/${d}
.endfor
.for libcompat in ${libcompats}
${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
-p ${XDDESTDIR}/usr >/dev/null
Expand Down
2 changes: 1 addition & 1 deletion Makefile.libcompat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__<${_this:T}>__:

# Makefile for the compatibility libraries.
# - 32-bit compat libraries on PowerPC, and AMD64.
# - 32-bit compat libraries on some 64-bit architectures

.if defined(_LIBCOMPATS)

Expand Down
4 changes: 4 additions & 0 deletions ObsoleteFiles.inc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
# xargs -n1 | sort | uniq -d;
# done

# 20230726: Removal of support for the VTOC8 partitioning scheme
OLD_FILES+=usr/include/sys/disk/vtoc.h
OLD_FILES+=usr/include/sys/vtoc.h

# 20230724: Remove unneeded arm headers
.if ${TARGET_ARCH} == "arm"
OLD_FILES+=usr/include/machine/atomic-v6.h
Expand Down
3 changes: 1 addition & 2 deletions contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ FreeBSD::FreeBSD(const Driver &D, const llvm::Triple &Triple,

// When targeting 32-bit platforms, look for '/usr/lib32/crt1.o' and fall
// back to '/usr/lib' if it doesn't exist.
if ((Triple.getArch() == llvm::Triple::x86 || Triple.isMIPS32() ||
Triple.isPPC32()) &&
if (Triple.isArch32Bit() &&
D.getVFS().exists(concat(getDriver().SysRoot, "/usr/lib32/crt1.o")))
getFilePaths().push_back(concat(getDriver().SysRoot, "/usr/lib32"));
else
Expand Down
2 changes: 2 additions & 0 deletions etc/mtree/BSD.tests.dist
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@
mac
bsdextended
..
ipacl
..
portacl
..
..
Expand Down
13 changes: 9 additions & 4 deletions include/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ PACKAGE=runtime
CLEANFILES= osreldate.h version
SUBDIR= arpa protocols rpcsvc rpc xlocale
.if ${MACHINE_CPUARCH} == "amd64"
SUBDIR+= i386
SUBDIR+= i386
INCLUDE_SUBDIRS+= i386
.endif
.if ${MACHINE_CPUARCH} == "aarch64"
SUBDIR+= arm
INCLUDE_SUBDIRS+= arm
.endif
SUBDIR_PARALLEL=
INCS= a.out.h ar.h assert.h bitstring.h byteswap.h \
Expand Down Expand Up @@ -353,10 +358,10 @@ compat:
mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \
-f ${SRCTOP}/etc/mtree/BSD.include.dist \
-p ${SDESTDIR}${INCLUDEDIR} > /dev/null
.if ${MACHINE_CPUARCH} == "amd64"
.for d in ${INCLUDE_SUBDIRS}
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
${SDESTDIR}${INCLUDEDIR}/i386
.endif
${SDESTDIR}${INCLUDEDIR}/${d}
.endfor

copies: .PHONY .META
cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \
Expand Down
60 changes: 60 additions & 0 deletions include/arm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# arm headers installed on arm64

.PATH: ${SRCTOP}/sys/arm/include ${SRCTOP}/lib/msun/arm

INCS= _align.h \
_inttypes.h \
_limits.h \
_stdint.h \
_types.h \
acle-compat.h \
armreg.h \
asm.h \
atomic.h \
bus.h \
counter.h \
cpu.h \
cpufunc.h \
cpuinfo.h \
efi.h \
elf.h \
exec.h \
float.h \
frame.h \
ieeefp.h \
param.h \
pcb.h \
pcpu.h \
pmap.h \
proc.h \
profile.h \
pte.h \
reg.h \
reloc.h \
resource.h \
runq.h \
setjmp.h \
signal.h \
sysarch.h \
sysreg.h \
tls.h \
ucontext.h \
vdso.h \
vfp.h \
vmparam.h
# These kernel-only headers are used by procstat's ZFS support.
# This should be fixed.
INCS+= pcpu_aux.h \
sf_buf.h
# from lib/msun/arm
INCS+= fenv.h
INCSDIR= ${INCLUDEDIR}/arm

beforeinstall: armdir
META_TARGETS+= armdir

armdir:
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
${DESTDIR}${INCLUDEDIR}/arm

.include <bsd.prog.mk>
2 changes: 1 addition & 1 deletion lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ SUBDIR.${MK_PMC}+= libipt
SUBDIR.${MK_BHYVE}+= libvmmapi
.endif

.if ${MACHINE_ARCH} != "powerpc"
.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm"
SUBDIR.${MK_OPENMP}+= libomp
.endif
.if ${MK_USB} != "no"
Expand Down
2 changes: 1 addition & 1 deletion lib/clang/freebsd_cc_version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define FREEBSD_CC_VERSION 1400005
#define FREEBSD_CC_VERSION 1400006
Loading

0 comments on commit 3a1e0ec

Please sign in to comment.