37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
From 319f4be8bd049055c333185928758d0fb445fc43 Mon Sep 17 00:00:00 2001
|
|
From: Guillem Jover <guillem@hadrons.org>
|
|
Date: Tue, 13 Jun 2023 00:36:21 +0200
|
|
Subject: build: Disable stack protector unconditionally
|
|
|
|
At least when building with nolibc, we cannot use the stack protector
|
|
as we will end up with undefined references to __stack_chk_fail which
|
|
is provided by the libc. We need to add the -fno-stack-protector
|
|
unconditionally to the CFLAGS append override.
|
|
|
|
This seems to have been the intent behind the introduction of this
|
|
change in commit 2de98320d5b02951936fc0ab677dd01e4fb2a7a7.
|
|
|
|
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
---
|
|
src/Makefile | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/Makefile b/src/Makefile
|
|
index cba4d27..f57348b 100644
|
|
--- a/src/Makefile
|
|
+++ b/src/Makefile
|
|
@@ -10,8 +10,9 @@ CPPFLAGS ?=
|
|
override CPPFLAGS += -D_GNU_SOURCE \
|
|
-Iinclude/ -include ../config-host.h \
|
|
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
|
|
-CFLAGS ?= -g -O3 -Wall -Wextra -fno-stack-protector
|
|
+CFLAGS ?= -g -O3 -Wall -Wextra
|
|
override CFLAGS += -Wno-unused-parameter \
|
|
+ -fno-stack-protector \
|
|
-DLIBURING_INTERNAL \
|
|
$(LIBURING_CFLAGS)
|
|
SO_CFLAGS=-fPIC $(CFLAGS)
|
|
--
|
|
cgit v1.2.3
|
|
|