mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-09-21 07:36:38 +02:00
HBSD: Add RELRO Support
github-issue: #40 This adds support for RELRO and BINDNOW in the build system. This patch was obtained from Baptiste Darroussin from his patch submitted to FreeBSD Phabricator. Further work will need to happen in the ports tree. Obtained-from: Baptiste Daroussin (bapt@freebsd.org) Obtained-from: FreeBSD Phabricator - https://reviews.freebsd.org/D3001 Signed-off-by: Shawn Webb <shawn.webb@hardenedbsd.org>
This commit is contained in:
parent
9ec646d6aa
commit
43216284f9
@ -58,6 +58,8 @@ SHARED_CXXFLAGS+= -g
|
||||
CTFFLAGS+= -g
|
||||
.endif
|
||||
|
||||
LDFLAGS+= -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
.include <bsd.libnames.mk>
|
||||
|
||||
# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
|
||||
|
@ -19,6 +19,8 @@ LDFLAGS+= -pie
|
||||
.endif
|
||||
.endif
|
||||
|
||||
LDFLAGS+= -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
.if ${MK_ASSERT_DEBUG} == "no"
|
||||
CFLAGS+= -DNDEBUG
|
||||
NO_WERROR=
|
||||
|
Loading…
Reference in New Issue
Block a user