mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
kboot: Centralize ldscript addition
Make the pattern for ldscripts always be arch/$MACHINE_ARCH/$MACHINE_ARCH.ldscript so we can add it from a central Makefile. This also moves from ldscript.arch to arch.ldscript to match the loader's new convention. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D44057
This commit is contained in:
parent
5b3b9a5858
commit
acb474c084
|
@ -51,6 +51,9 @@ HELP_FILENAME= loader.help.kboot
|
|||
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
|
||||
.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
|
||||
|
||||
# Bring in our ldscript
|
||||
LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}.ldscript
|
||||
|
||||
# Always add MI sources
|
||||
.include "${BOOTSRC}/loader.mk"
|
||||
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
|
||||
|
|
|
@ -8,5 +8,3 @@ CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include
|
|||
# load address. set in linker script
|
||||
RELOC?= 0x0
|
||||
CFLAGS+= -DRELOC=${RELOC}
|
||||
|
||||
LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.${MACHINE_ARCH}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
SRCS+= amd64_tramp.S elf64_freebsd.c load_addr.c fdt_arch.c
|
||||
|
||||
CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include
|
||||
|
||||
LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.amd64
|
||||
|
|
|
@ -2,6 +2,4 @@ CFLAGS+= -mcpu=powerpc64
|
|||
|
||||
SRCS+= ppc64_elf_freebsd.c kerneltramp.S load_addr.c fdt_arch.c
|
||||
|
||||
LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.powerpc
|
||||
|
||||
MK_PIE= no
|
||||
|
|
Loading…
Reference in a new issue