From 0611f706d5cf2c5f18e18d51f2866956870b131a Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Fri, 9 Sep 2022 16:15:06 +0200 Subject: [PATCH] Use default-pie and default-ssp flags in gcc Committing only the commands for now, so that others can test the build. TODO: - add command explanations - add changelog - comment on failing tests in binutils and gcc --- chapter05/gcc-pass1.xml | 2 ++ chapter06/gcc-pass2.xml | 2 ++ chapter08/gcc.xml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 34ad1b15e..0b7f17913 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -87,6 +87,8 @@ cd build --with-sysroot=$LFS \ --with-newlib \ --without-headers \ + --enable-default-pie \ + --enable-default-ssp \ --disable-nls \ --disable-shared \ --disable-multilib \ diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml index aab95d58f..6774134a2 100644 --- a/chapter06/gcc-pass2.xml +++ b/chapter06/gcc-pass2.xml @@ -90,6 +90,8 @@ cd build LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \ --prefix=/usr \ --with-build-sysroot=$LFS \ + --enable-default-pie \ + --enable-default-ssp \ --disable-nls \ --disable-multilib \ --disable-decimal-float \ diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 9c7c0065a..fd6e5ae3c 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -74,6 +74,8 @@ cd build ../configure --prefix=/usr \ LD=ld \ --enable-languages=c,c++ \ + --enable-default-pie \ + --enable-default-ssp \ --disable-multilib \ --disable-bootstrap \ --with-system-zlib