mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
Add support for linker-type-specific flags
r332090 added a LINKER_TYPE test to add the --no-rosegment flag when linking the i386 loader components with lld. Instead, introduce a general mechanism for setting LDFLAGS for a specific linker type, and use it for --no-rosegment. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14998
This commit is contained in:
parent
3b05ffaf6f
commit
b25a46f7f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332794
@ -226,6 +226,8 @@ ACFLAGS+= ${ACFLAGS.${.IMPSRC:T}}
|
||||
CFLAGS+= ${CFLAGS.${.IMPSRC:T}}
|
||||
CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}}
|
||||
|
||||
LDFLAGS+= ${LDFLAGS.${LINKER_TYPE}}
|
||||
|
||||
.if defined(SRCTOP)
|
||||
# Prevent rebuilding during install to support read-only objdirs.
|
||||
.if ${.TARGETS:M*install*} == ${.TARGETS} && empty(.MAKE.MODE:Mmeta)
|
||||
|
@ -2,13 +2,9 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
.sinclude <bsd.linker.mk>
|
||||
|
||||
LOADER_ADDRESS?=0x200000
|
||||
LDFLAGS+= -nostdlib
|
||||
.if defined(LINKER_TYPE) && ${LINKER_TYPE} == "lld"
|
||||
LDFLAGS+= -Wl,--no-rosegment
|
||||
.endif
|
||||
LDFLAGS.lld+= -Wl,--no-rosegment
|
||||
|
||||
# BTX components
|
||||
BTXDIR= ${BOOTOBJ}/i386/btx
|
||||
|
Loading…
Reference in New Issue
Block a user