Rename HARDENING flags to SEC flags.

This commit is contained in:
inference 2022-06-07 05:44:56 +01:00
parent 82e9194c5a
commit 011c26e740

View File

@ -20,15 +20,15 @@ OBJDUMP="llvm-objdump"
# Flags.
## Hardening flags.
C_HARDENING="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2"
LD_HARDENING="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2"
LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Common flags.
CFLAGS="-march=znver1 -O2 -pipe -flto=full -U__gnu_linux__ ${C_HARDENING}"
CXXFLAGS="-march=znver1 -O2 -pipe -flto=full ${C_HARDENING}"
CFLAGS="-march=znver1 -O2 -pipe -flto=full -U__gnu_linux__ ${C_SEC}"
CXXFLAGS="-march=znver1 -O2 -pipe -flto=full ${C_SEC}"
## Linker flags.
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind ${LD_HARDENING}"
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind ${LD_SEC}"
## USE flags.
USE="clang dbus elogind libcxx libedit llvm-libunwind lto nftables pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libvpx system-llvm system-png system-webp wayland"