From dec742e2d49aa882db23572fd475db5e9b322550 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 31 Dec 2019 12:14:13 +0100 Subject: [PATCH] - sysvinit: fix build for hd2; remove -fstack-protector-strong --- make/target-tools.mk | 3 +++ .../sysvinit/remove-fstack-protector-strong.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 patches/sysvinit/remove-fstack-protector-strong.patch diff --git a/make/target-tools.mk b/make/target-tools.mk index ddf4ecda..66c72f9a 100644 --- a/make/target-tools.mk +++ b/make/target-tools.mk @@ -1800,6 +1800,9 @@ $(ARCHIVE)/$(SYSVINIT_SOURCE): $(DOWNLOAD) $(SYSVINIT_URL)/$(SYSVINIT_SOURCE) SYSVINIT_PATCH = crypt-lib.patch +ifeq ($(BOXSERIES), hd2) + SYSVINIT_PATCH += remove-fstack-protector-strong.patch +endif define SYSVINIT_INSTALL for sbin in halt init shutdown killall5; do \ diff --git a/patches/sysvinit/remove-fstack-protector-strong.patch b/patches/sysvinit/remove-fstack-protector-strong.patch new file mode 100644 index 00000000..b4d18535 --- /dev/null +++ b/patches/sysvinit/remove-fstack-protector-strong.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile b/src/Makefile +index 9ae35df..814b0bd 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -10,7 +10,7 @@ + + CPPFLAGS = + CFLAGS ?= -O2 +-override CFLAGS += -ansi -fomit-frame-pointer -fstack-protector-strong -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" ++override CFLAGS += -ansi -fomit-frame-pointer -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" + override CFLAGS += $(shell getconf LFS_CFLAGS) + STATIC = + MANDB := s@^\('\\\\\"\)[^\*-]*-\*- coding: [^[:blank:]]\+ -\*-@\1@