Skip to content

Commit

Permalink
update some libs and apps
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Oct 31, 2024
1 parent 94ef946 commit e5002cc
Show file tree
Hide file tree
Showing 2,059 changed files with 33,067 additions and 21,009 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
installkernel.debug packagekernel packageworld \
reinstallkernel reinstallkernel.debug \
installworld kernel-toolchain libraries maninstall \
obj objlink showconfig tags toolchain update \
list-old-dirs list-old-files list-old-libs \
obj objlink showconfig tags toolchain \
makeman sysent \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _build-metadata _cross-tools _includes _libraries \
Expand Down
18 changes: 10 additions & 8 deletions include/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
.include <src.opts.mk>

PACKAGE=runtime
TAGS+= development
CLEANFILES= osreldate.h version
SUBDIR= arpa protocols rpcsvc rpc xlocale
SUBDIR_PARALLEL=
Expand All @@ -21,7 +20,8 @@ INCS= a.out.h ar.h assert.h bitstring.h byteswap.h \
netdb.h nl_types.h nlist.h nss.h nsswitch.h ohash.h paths.h \
printf.h proc_service.h pthread.h \
pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \
res_update.h resolv.h runetype.h search.h semaphore.h setjmp.h \
res_update.h resolv.h runetype.h sched.h \
search.h semaphore.h setjmp.h \
signal.h spawn.h stab.h stdalign.h stdbool.h stddef.h \
stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \
strings.h sysexits.h tar.h termios.h tgmath.h \
Expand All @@ -34,30 +34,32 @@ INCS+= vis.h

MHDRS= float.h floatingpoint.h stdarg.h

PHDRS= sched.h _semaphore.h
PHDRS= _semaphore.h

LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \
syslog.h ucontext.h

LDIRS= bsm cam geom net net80211 netgraph netinet netinet6 \
netipsec netsmb nfs nfsclient nfsserver sys vm
LDIRS= geom net net80211 netgraph netinet netinet6 \
netipsec netlink netsmb nfs nfsclient nfsserver sys vm

LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \
dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \
dev/hwpmc dev/hyperv \
dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \
dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \
dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wi \
fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \
dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wg \
fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \
fs/procfs fs/smbfs fs/udf fs/unionfs \
geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \
geom/mirror geom/mountver geom/multipath geom/nop \
geom/raid geom/raid3 geom/shsec geom/stripe geom/virstor \
net/altq \
net/route \
netgraph/atm netgraph/netflow \
netinet/cc \
netinet/netdump \
security/audit \
netinet/tcp_stacks \
netlink/route \
security/mac_biba security/mac_bsdextended security/mac_lomac \
security/mac_mls security/mac_partition \
security/mac_veriexec \
Expand Down
2 changes: 2 additions & 0 deletions lib/clang/headers/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

.include <bsd.init.mk>
.include "../clang.pre.mk"

.PATH: ${CLANG_SRCS}/lib/Headers
Expand Down
2 changes: 2 additions & 0 deletions lib/clang/libllvmminimal/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

.include <bsd.init.mk>
.include "../llvm.pre.mk"

LIB= llvmminimal
Expand Down
13 changes: 12 additions & 1 deletion lib/clang/llvm.build.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.include <src.opts.mk>

.ifndef LLVM_BASE
Expand All @@ -12,6 +13,10 @@
.error Please define SRCDIR before including this file
.endif

.ifndef OS_REVISION
.error Please define OS_REVISION before including this file
.endif

.PATH: ${LLVM_BASE}/${SRCDIR}

CFLAGS+= -I${SRCTOP}/lib/clang/include
Expand Down Expand Up @@ -66,6 +71,12 @@ LLVM_NATIVE_ARCH= ARM
.if ${MK_LLVM_TARGET_BPF} != "no"
CFLAGS+= -DLLVM_TARGET_ENABLE_BPF
.endif
.if ${MK_LLVM_TARGET_MIPS} != "no"
CFLAGS+= -DLLVM_TARGET_ENABLE_MIPS
. if ${MACHINE_CPUARCH} == "mips"
LLVM_NATIVE_ARCH= Mips
. endif
.endif
.if ${MK_LLVM_TARGET_POWERPC} != "no"
CFLAGS+= -DLLVM_TARGET_ENABLE_POWERPC
. if ${MACHINE_CPUARCH} == "powerpc"
Expand Down Expand Up @@ -103,7 +114,7 @@ LDFLAGS+= -Wl,-dead_strip
LDFLAGS+= -Wl,--gc-sections
.endif

CXXSTD?= c++14
CXXSTD?= c++17
CXXFLAGS+= -fno-exceptions
CXXFLAGS+= -fno-rtti
.if ${.MAKE.OS} == "MidnightBSD" || ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING)
Expand Down
4 changes: 2 additions & 2 deletions lib/csu/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

.include <src.opts.mk>

.if exists(${.CURDIR}/${MACHINE_ARCH})
SUBDIR+= ${MACHINE_ARCH}
.if exists(${.CURDIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/})
SUBDIR+= ${MACHINE_ARCH:S/powerpc64le/powerpc64/}
.else
SUBDIR+= ${MACHINE_CPUARCH}
.endif
Expand Down
59 changes: 54 additions & 5 deletions lib/csu/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,32 +1,81 @@

SED_FIX_NOTE = -i "" -e '/\.note\.tag/s/progbits/note/'

NO_WMISSING_VARIABLE_DECLARATIONS=

.include <src.opts.mk>
MK_SSP= no

.if ${MK_BSD_CRTBEGIN} != "no" && !defined(BUILDING_TESTS)
.if !defined(BUILDING_TESTS)

OBJS+= Scrt1.o crt1.o gcrt1.o
OBJS+= crtbegin.o crtbeginS.o crtbeginT.o
OBJS+= crtend.o crtendS.o
OBJS+= crti.o crtn.o

CRT1OBJS+= crtbrand.o feature_note.o ignore_init_note.o

ACFLAGS+= -DLOCORE

CFLAGS+= -DSTRIP_FBSDID
CFLAGS+= -fno-asynchronous-unwind-tables
CFLAGS+= -fno-omit-frame-pointer
CFLAGS+= -I${.CURDIR:H}/common \
-I${SRCTOP}/lib/libc/include

CFLAGS_CRTS= -DSHARED ${PICFLAG}

FILES= ${OBJS}
FILESMODE= ${LIBMODE}
FILESOWN= ${LIBOWN}
FILESGRP= ${LIBGRP}
FILESDIR= ${LIBDIR}
# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
.undef LIBRARIES_ONLY

CLEANFILES+= ${OBJS} ${CRT1OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o
CLEANFILES+= crti_s.o

crt1.o: crt1_c.o ${CRT1OBJS}
${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o}
.if ${MACHINE_ARCH} == "i386"
${OBJCOPY} --localize-symbol _start1 ${.TARGET}
.endif

gcrt1_c.o: crt1_c.c
${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c

gcrt1.o: gcrt1_c.o ${CRT1OBJS}
${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o}

Scrt1_c.o: crt1_c.c
${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c

Scrt1.o: Scrt1_c.o ${CRT1OBJS}
${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o}
.if ${MACHINE_ARCH} == "i386"
${OBJCOPY} --localize-symbol _start1 ${.TARGET}
.endif

# __FreeBSD_version is recorded in crt1.o et al via crtbrand.
crtbrand.o: ${SRCTOP}/sys/sys/param.h

crtbegin.o: crtbegin.c
crtbeginS.o: crtbegin.c
crtbeginT.o: crtbegin.c
crtend.o: crtend.c
crtendS.o: crtend.c

crtbegin.o crtend.o crtbeginT.o:
${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC}
${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}

crtbeginS.o crtendS.o:
${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} ${.ALLSRC}
${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} \
${.ALLSRC:N*.h:[1]}

crti_s.o: crti.S
${CC} ${CFLAGS} ${ACFLAGS} -c ${.ALLSRC:M*.S} -o ${.TARGET}

crti.o: crti_s.o crtbrand.o
${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o}

.endif

Expand Down
43 changes: 3 additions & 40 deletions lib/csu/aarch64/Makefile
Original file line number Diff line number Diff line change
@@ -1,46 +1,9 @@

.PATH: ${.CURDIR:H}/common

SRCS= crt1.c crti.S crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o gcrt1.o
CFLAGS+= -I${.CURDIR:H}/common \
-I${SRCTOP}/lib/libc/include
CFLAGS+= -DCRT_IRELOC_SUPPRESS
CFLAGS+= -I${.CURDIR}
CFLAGS+= -DCRT_IRELOC_RELA

FILES= ${OBJS}
FILESMODE= ${LIBMODE}
FILESOWN= ${LIBOWN}
FILESGRP= ${LIBGRP}
FILESDIR= ${LIBDIR}
# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
.undef LIBRARIES_ONLY

CLEANFILES= ${OBJS}
CLEANFILES+= crt1.s gcrt1.s Scrt1.s

# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
# directly compiled to .o files.

crt1.s: crt1.c
${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}

crt1.o: crt1.s
${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} crt1.s

gcrt1.s: crt1.c
${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}

gcrt1.o: gcrt1.s
${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s

Scrt1.s: crt1.c
${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}

Scrt1.o: Scrt1.s
${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
CRT1OBJS+= crt1_s.o

.include <bsd.lib.mk>
4 changes: 0 additions & 4 deletions lib/csu/i386/reloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand All @@ -27,7 +24,6 @@
*/

#include <sys/cdefs.h>

#include <machine/specialreg.h>
#include <machine/cpufunc.h>

Expand Down
1 change: 0 additions & 1 deletion lib/libc/aarch64/_fpmath.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/

union IEEEl2bits {
Expand Down
1 change: 0 additions & 1 deletion lib/libc/aarch64/arith.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* MD header for contrib/gdtoa
*
*/

/*
Expand Down
1 change: 0 additions & 1 deletion lib/libc/aarch64/gd_qnan.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* This file can be generated by compiling and running contrib/gdtoa/qnan.c
* on the target architecture after arith.h has been generated.
*
*/

#define f_QNAN 0x7fc00000
Expand Down
2 changes: 0 additions & 2 deletions lib/libc/aarch64/gen/_ctx_start.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*-
* Copyright (c) 2015 The FreeBSD Foundation
* All rights reserved.
*
* This software was developed by Andrew Turner under
* sponsorship from the FreeBSD Foundation.
Expand Down Expand Up @@ -28,7 +27,6 @@
*/

#include <machine/asm.h>

ENTRY(_ctx_start)
blr x19 /* Call func from makecontext */
mov x0, x20 /* Load ucp saved in makecontext */
Expand Down
1 change: 0 additions & 1 deletion lib/libc/aarch64/gen/_set_tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/

#include <sys/cdefs.h>

#include <string.h>
#include <sys/types.h>

Expand Down
5 changes: 2 additions & 3 deletions lib/libc/aarch64/gen/_setjmp.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*-
* Copyright (c) 2014 Andrew Turner
* Copyright (c) 2014 The FreeBSD Foundation
* All rights reserved.
*
* Portions of this software were developed by Andrew Turner
* under sponsorship from the FreeBSD Foundation
Expand Down Expand Up @@ -30,7 +29,6 @@
*/

#include <machine/asm.h>

#include <machine/setjmp.h>

ENTRY(_setjmp)
Expand Down Expand Up @@ -91,7 +89,8 @@ ENTRY(_longjmp)
#endif

/* Load the return value */
mov x0, x1
cmp x1, #0
csinc x0, x1, xzr, ne
ret

botch:
Expand Down
3 changes: 2 additions & 1 deletion lib/libc/aarch64/sys/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

MIASM:= ${MIASM:Nfreebsd[467]_*}

SRCS+= __vdso_gettc.c
SRCS+= __vdso_gettc.c \
sched_getcpu_gen.c

MDASM= cerror.S \
syscall.S \
Expand Down
3 changes: 0 additions & 3 deletions lib/libc/amd64/Symbol.map
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ FBSD_1.6 {
*/
FBSDprivate_1.0 {
/* PSEUDO syscalls */
__sys_getlogin;
_getlogin;
__sys_exit;

_set_tp;
___longjmp;
Expand All @@ -69,6 +67,5 @@ FBSDprivate_1.0 {
signalcontext;
__siglongjmp;
_brk;
__sys_vfork;
_vfork;
};
2 changes: 1 addition & 1 deletion lib/libc/amd64/gen/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93

SRCS+= _setjmp.S _set_tp.c rfork_thread.S setjmp.S sigsetjmp.S \
SRCS+= _setjmp.S _get_tp.c _set_tp.c rfork_thread.S setjmp.S sigsetjmp.S \
fabs.S \
infinity.c ldexp.c makecontext.c signalcontext.c \
flt_rounds.c fpgetmask.c fpsetmask.c fpgetprec.c fpsetprec.c \
Expand Down
Loading

0 comments on commit e5002cc

Please sign in to comment.