2018-10-02 17:34:50 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Peter Jones <pjones@redhat.com>
|
2019-08-15 06:01:31 +00:00
|
|
|
Date: Fri, 12 Jul 2019 10:06:50 +0200
|
2018-10-02 17:34:50 +00:00
|
|
|
Subject: [PATCH] Do not allow stack trampolines, anywhere.
|
|
|
|
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
|
---
|
|
|
|
configure.ac | 3 +++
|
|
|
|
conf/Makefile.common | 2 +-
|
|
|
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
2019-08-15 06:01:31 +00:00
|
|
|
index 38d978bd650..5076d635c57 100644
|
2018-10-02 17:34:50 +00:00
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2019-08-15 06:01:31 +00:00
|
|
|
@@ -1995,6 +1995,9 @@ if test x"$enable_wextra" != xno ; then
|
2018-10-02 17:34:50 +00:00
|
|
|
HOST_CFLAGS="$HOST_CFLAGS -Wextra"
|
|
|
|
fi
|
|
|
|
|
|
|
|
+TARGET_CFLAGS="$TARGET_CFLAGS -Werror=trampolines -fno-trampolines"
|
|
|
|
+HOST_CFLAGS="$HOST_CFLAGS -Werror=trampolines -fno-trampolines"
|
|
|
|
+
|
|
|
|
TARGET_CPP="$TARGET_CC -E"
|
|
|
|
TARGET_CCAS=$TARGET_CC
|
|
|
|
|
|
|
|
diff --git a/conf/Makefile.common b/conf/Makefile.common
|
2019-08-15 06:01:31 +00:00
|
|
|
index b867691f125..87c1f0e809b 100644
|
2018-10-02 17:34:50 +00:00
|
|
|
--- a/conf/Makefile.common
|
|
|
|
+++ b/conf/Makefile.common
|
|
|
|
@@ -66,7 +66,7 @@ grubconfdir = $(sysconfdir)/grub.d
|
|
|
|
platformdir = $(pkglibdir)/$(target_cpu)-$(platform)
|
|
|
|
starfielddir = $(pkgdatadir)/themes/starfield
|
|
|
|
|
|
|
|
-CFLAGS_GNULIB = -Wno-undef -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code
|
|
|
|
+CFLAGS_GNULIB = -Wno-undef -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Werror=trampolines -fno-trampolines
|
2019-08-15 06:01:31 +00:00
|
|
|
CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/lib/gnulib -I$(top_srcdir)/grub-core/lib/gnulib
|
2018-10-02 17:34:50 +00:00
|
|
|
|
|
|
|
CFLAGS_POSIX = -fno-builtin
|