Remove hardening flags to allow untrusted packages to be specifically hardened using envs. Move linker stripping flag to standard linker flags.
This commit is contained in:
parent
3b2d2e2233
commit
bec3b50ecd
11
portage/env/gcc-nolto.conf
vendored
11
portage/env/gcc-nolto.conf
vendored
@ -3,7 +3,7 @@
|
||||
# Copyright 2022-2023 Inference
|
||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
|
||||
# Version: 2.0.1.4
|
||||
# Version: 3.0.0.5
|
||||
|
||||
|
||||
# Toolchain
|
||||
@ -22,11 +22,8 @@ STRIP="strip"
|
||||
|
||||
|
||||
# Flags
|
||||
## Hardening flags
|
||||
C_SEC="-fPIC -fPIE -fstack-clash-protection -fstack-protector-strong -fwrapv"
|
||||
LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
|
||||
## Compiler flags
|
||||
CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe -U__gnu_linux__ ${C_SEC}"
|
||||
CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}"
|
||||
CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe -U__gnu_linux__"
|
||||
CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe"
|
||||
## Linker flags
|
||||
LDFLAGS="-Wl,-O2 ${LD_SEC}"
|
||||
LDFLAGS="-Wl,--strip-all -Wl,-O2"
|
||||
|
Loading…
x
Reference in New Issue
Block a user