[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 2/3] build: Add option to toggle the stack protection
This patch enables the -fno-stack-protector flag if the stack protector is not enabled. Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx> --- Makefile.uk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.uk b/Makefile.uk index 2047dae..84b7f90 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -8,12 +8,12 @@ ASFLAGS += -U __linux__ -U __FreeBSD__ -U __sun__ -D__ASSEMBLY__ ASINCLUDES += -nostdinc -nostdlib -I$(CONFIG_UK_BASE)/include CFLAGS += -U __linux__ -U __FreeBSD__ -U __sun__ -CFLAGS += -fno-stack-protector -fno-omit-frame-pointer -fno-tree-sra +CFLAGS += -fno-omit-frame-pointer -fno-tree-sra CFLAGS += -Wall -Wextra CINCLUDES += -nostdinc -nostdlib -I$(CONFIG_UK_BASE)/include CXXFLAGS += -U __linux__ -U __FreeBSD__ -U __sun__ -CXXFLAGS += -fno-stack-protector -fno-omit-frame-pointer -fno-tree-sra +CXXFLAGS += -fno-omit-frame-pointer -fno-tree-sra CXXFLAGS += -Wall -Wextra CXXINCLUDES += -nostdinc -nostdlib -I$(CONFIG_UK_BASE)/include @@ -23,6 +23,11 @@ CXXINCLUDES += -nostdinc -nostdlib -I$(CONFIG_UK_BASE)/include LIBLDFLAGS += -nostdinc -nostdlib -Wl,--omagic -Wl,-r -Wl,-d -Wl,--build-id=none LDFLAGS += -nostdinc -nostdlib -Wl,--omagic -Wl,--build-id=none +ifndef CONFIG_LIBUKSECURITY_SSP +CFLAGS += -fno-stack-protector +CXXFLAGS += -fno-stack-protector +endif + CFLAGS-$(CONFIG_OPTIMIZE_NONE) += -O0 -fno-optimize-sibling-calls -fno-tree-vectorize CXXFLAGS-$(CONFIG_OPTIMIZE_NONE) += -O0 -fno-optimize-sibling-calls -fno-tree-vectorize CFLAGS-$(CONFIG_OPTIMIZE_PERF) += -O2 -- 2.20.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |