git: 4aabaa1890e9 - main - kboot: Cleanup libkern reference
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 28 Jan 2024 20:05:06 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4aabaa1890e927ed3dd34ccc4642268ea6a505ce commit 4aabaa1890e927ed3dd34ccc4642268ea6a505ce Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-01-28 18:28:05 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-01-28 20:04:31 +0000 kboot: Cleanup libkern reference For aarch64 and amd64, we don't pull in anything from libkern, so we don't need it in our path. However, powerpc needs ucmpdi2 from libkern, so bring it into libkboot's build and omit it from loader.kboot. Sponsored by: Netflix --- stand/kboot/kboot/Makefile | 1 - stand/kboot/kboot/arch/powerpc64/Makefile.inc | 3 +-- stand/kboot/libkboot/Makefile | 2 ++ stand/kboot/libkboot/arch/powerpc64/Makefile.inc | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index 4054bb1da9f2..ae32d878a3f4 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -57,7 +57,6 @@ HELP_FILENAME= loader.help.kboot # Always add MI sources .include "${BOOTSRC}/loader.mk" -.PATH: ${SYSDIR}/libkern CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} CFLAGS+= -Wall diff --git a/stand/kboot/kboot/arch/powerpc64/Makefile.inc b/stand/kboot/kboot/arch/powerpc64/Makefile.inc index c29e69970505..338d1222ab65 100644 --- a/stand/kboot/kboot/arch/powerpc64/Makefile.inc +++ b/stand/kboot/kboot/arch/powerpc64/Makefile.inc @@ -1,7 +1,6 @@ CFLAGS+= -mcpu=powerpc64 -SRCS+= ppc64_elf_freebsd.c host_syscall.S kerneltramp.S load_addr.c fdt_arch.c -SRCS+= ucmpdi2.c +SRCS+= ppc64_elf_freebsd.c kerneltramp.S load_addr.c fdt_arch.c LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.powerpc diff --git a/stand/kboot/libkboot/Makefile b/stand/kboot/libkboot/Makefile index 415571617d2a..1b030ccfe018 100644 --- a/stand/kboot/libkboot/Makefile +++ b/stand/kboot/libkboot/Makefile @@ -7,4 +7,6 @@ CFLAGS+=-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} SRCS= crt1.c +.sinclude "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" + .include <bsd.lib.mk> diff --git a/stand/kboot/libkboot/arch/powerpc64/Makefile.inc b/stand/kboot/libkboot/arch/powerpc64/Makefile.inc new file mode 100644 index 000000000000..4cafaee28847 --- /dev/null +++ b/stand/kboot/libkboot/arch/powerpc64/Makefile.inc @@ -0,0 +1,4 @@ +CFLAGS+= -mcpu=powerpc64 + +.PATH: ${SYSDIR}/libkern +SRCS+= ucmpdi2.c