Module Name: src Committed By: kre Date: Sat Jan 20 11:04:53 UTC 2024
Modified Files: src/sys/lib/libkern: Makefile.libkern src/sys/stand/efiboot: Makefile.efiboot Added Files: src/common/include/libc: extern.h Log Message: Compensate for src/common/lib/libc/atomic/atomic_init_cas.c losing the extern declaration of __libc_atomic_init() and instead using a new one added to src/lib/libc/include/extern.h That file is outside src/common and src/sys so is unavailable to kernel builds, so instead make a new include file in src/common which the kernel can read which contains the needed extern decl for __libc_atomic_init() This seems to fix the evbarm builds (maybe others) - but it is all MUCH TOO UGLY to keep. Someone please make a better fix, even if that just means reverting rev 1.5 of src/common/lib/libc/atomic/atomic_init_cas.c and all of the changes here (the addition to libc/include/extern.h should be harmless to keep). To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/common/include/libc/extern.h cvs rdiff -u -r1.54 -r1.55 src/sys/lib/libkern/Makefile.libkern cvs rdiff -u -r1.29 -r1.30 src/sys/stand/efiboot/Makefile.efiboot Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/lib/libkern/Makefile.libkern diff -u src/sys/lib/libkern/Makefile.libkern:1.54 src/sys/lib/libkern/Makefile.libkern:1.55 --- src/sys/lib/libkern/Makefile.libkern:1.54 Mon Jan 1 20:33:34 2024 +++ src/sys/lib/libkern/Makefile.libkern Sat Jan 20 11:04:53 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.libkern,v 1.54 2024/01/01 20:33:34 rhialto Exp $ +# $NetBSD: Makefile.libkern,v 1.55 2024/01/20 11:04:53 kre Exp $ # # Variable definitions for libkern. @@ -35,6 +35,7 @@ CPPFLAGS+= -I$M ${KERNCPPFLAGS} ${KERNMI .include "${.PARSEDIR}/../../../common/lib/libppath/Makefile.inc" CPPFLAGS+= -I${KERNDIR}/../../../common/include +CPPFLAGS+= -I${KERNDIR}/../../../common/include/libc CPPFLAGS+= -I${KERNDIR}/../../../common/libc/hash/sha3 .PATH.c: ${KERNDIR} Index: src/sys/stand/efiboot/Makefile.efiboot diff -u src/sys/stand/efiboot/Makefile.efiboot:1.29 src/sys/stand/efiboot/Makefile.efiboot:1.30 --- src/sys/stand/efiboot/Makefile.efiboot:1.29 Thu Jun 15 03:20:58 2023 +++ src/sys/stand/efiboot/Makefile.efiboot Sat Jan 20 11:04:53 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.efiboot,v 1.29 2023/06/15 03:20:58 rin Exp $ +# $NetBSD: Makefile.efiboot,v 1.30 2024/01/20 11:04:53 kre Exp $ S= ${.CURDIR}/../../.. @@ -127,6 +127,7 @@ KERN_AS= library LIBKERN_ARCH?= ${MACHINE_ARCH} KERNMISCMAKEFLAGS+="LIBKERN_ARCH=${LIBKERN_ARCH}" .include "${S}/lib/libkern/Makefile.inc" +CPPFLAGS+= -I${S}/../common/include/libc LIBKERN= ${KERNLIB} ### find out what to use for libz Added files: Index: src/common/include/libc/extern.h diff -u /dev/null src/common/include/libc/extern.h:1.1 --- /dev/null Sat Jan 20 11:04:53 2024 +++ src/common/include/libc/extern.h Sat Jan 20 11:04:53 2024 @@ -0,0 +1,3 @@ +void __section(".text.startup") __attribute__((__visibility__("hidden"))) + __libc_atomic_init(void); +