From 6fd48ca2ce8305f27d6875032e314572ae288d49 Mon Sep 17 00:00:00 2001 From: Shawn Anastasio Date: Fri, 2 Oct 2020 13:42:16 -0500 Subject: [PATCH] software: Use -fno-stack-protector This allows riscv*-gnu-linux toolchains to be used to build LiteX software. Without this, references to undefined stack guard symbols get generated and linking fails. --- litex/soc/software/common.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex/soc/software/common.mak b/litex/soc/software/common.mak index 802a48b8d..ec14f40d2 100644 --- a/litex/soc/software/common.mak +++ b/litex/soc/software/common.mak @@ -50,7 +50,7 @@ INCLUDES = -I$(SOC_DIRECTORY)/software/include/base \ -I$(SOC_DIRECTORY)/software \ -I$(BUILDINC_DIRECTORY) \ -I$(CPU_DIRECTORY) -COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc $(INCLUDES) +COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc -fno-stack-protector $(INCLUDES) CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(SOC_DIRECTORY)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding LDFLAGS = -nostdlib -nodefaultlibs -L$(BUILDINC_DIRECTORY)