tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fancy hardening flags

So, I've wanted to make use of ASLR, and building
with clang meant I didn't have the existing flags
(which are in mk/compiler/

The following seemed to just work:
APPEND_FLAGS=		-fPIC -pie -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -fstack-protector-all -march=native	${APPEND_FLAGS}
CWRAPPERS_APPEND.ld+=	-Wl,-z,relro -Wl,-z,now

(p.s. currently mk/compiler/ is lacking appending
to cxx in some things).

Pretty neat.

if I were to clean up the logic in mk/compiler/
and make it compiler agnostic, where would be the
proper place to put it?

Home | Main Index | Thread Index | Old Index