[03/28] glibc: Enable CET

Message ID 20220204164748.315559-3-michael.tremer@ipfire.org
State Accepted
Commit cf557eca9cc2931b088fd72507780c70a1df088a
Headers
Series [01/28] gcc: toolchain stage 2: Set sysroot to /tools_${arch} |

Commit Message

Michael Tremer Feb. 4, 2022, 4:47 p.m. UTC
  Enable Intel Control-flow Enforcement Technology (CET) support
to protect the library with indirect branch tracking (IBT) and
shadow stack (SHSTK).

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 lfs/glibc | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/lfs/glibc b/lfs/glibc
index e7f2a71c5..9c631de4c 100644
--- a/lfs/glibc
+++ b/lfs/glibc
@@ -65,6 +65,10 @@  EXTRA_CONFIG += \
 	--enable-bind-now \
 	--disable-crypt
 
+ifeq "$(BUILD_ARCH)" "x86_64"
+	EXTRA_CONFIG += --enable-cet
+endif
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################