[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH v5 2/3] build: Add option to toggle the stack protection



From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>

This patch adds build option to select different stack protection
levels.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx>
---
 Makefile.uk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile.uk b/Makefile.uk
index 1d6d060a..a7fbf3e5 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -6,9 +6,13 @@
 
 COMPFLAGS    += -nostdinc -nostdlib
 COMPFLAGS    += -U __linux__ -U __FreeBSD__ -U __sun__
-COMPFLAGS    += -fno-stack-protector -fno-omit-frame-pointer -fno-tree-sra
+COMPFLAGS    += -fno-omit-frame-pointer -fno-tree-sra
 COMPFLAGS    += -Wall -Wextra
 
+ifneq ($(HAVE_STACKPROTECTOR),y)
+COMPFLAGS    += -fno-stack-protector
+endif
+
 ASFLAGS      += -D__ASSEMBLY__
 
 ASINCLUDES   += -I$(CONFIG_UK_BASE)/include
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.