Add Malloc, No PIE env.
This commit is contained in:
parent
bf65208382
commit
887dea0de0
16
portage/env/malloc-nopie.conf
vendored
Normal file
16
portage/env/malloc-nopie.conf
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
# Portage env Clang - No PIE.
|
||||
|
||||
# Copyright 2022 Inference
|
||||
|
||||
|
||||
# Flags.
|
||||
## Hardening flags.
|
||||
C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -fwrapv"
|
||||
LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro -L/usr/local/lib -lhardened_malloc"
|
||||
|
||||
## Compiler flags.
|
||||
CFLAGS="-march=znver3 -O2 -pipe -flto=thin -U__gnu_linux__ ${C_SEC}"
|
||||
CXXFLAGS="-march=znver3 -O2 -pipe -flto=thin ${C_SEC}"
|
||||
|
||||
## Linker flags.
|
||||
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--thinlto-jobs=4 ${LD_SEC}"
|
Loading…
x
Reference in New Issue
Block a user