All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/2021.02.x] package/sysvinit: add patch to fix compile without stack-protector support
@ 2021-03-19 21:04 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2021-03-19 21:04 UTC (permalink / raw
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=d710bd6085d4bb89d97093c7e89585c90181a94e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2021.02.x

In Buildroot, the SSP flags are passed via the wrapper, and only flags
supported by the toolchain will be used.

Add patch to remove '-fstack-protector-strong' compile flag.

Fixes:
  .../aarch64-buildroot-linux-uclibc/bin/ld: runlevel.o: in function `main':
  runlevel.c:(.text.startup+0x4): undefined reference to `__stack_chk_guard'
  .../aarch64-buildroot-linux-uclibc/bin/ld: cannot find -lssp_nonshared
  .../aarch64-buildroot-linux-uclibc/bin/ld: cannot find -lssp

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 50cbac5099b1767c8f69509a900dae2b58ca66ff)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...1-Makefile-disable-stack-protector-strong.patch | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/package/sysvinit/0001-Makefile-disable-stack-protector-strong.patch b/package/sysvinit/0001-Makefile-disable-stack-protector-strong.patch
new file mode 100644
index 0000000000..066bdb3660
--- /dev/null
+++ b/package/sysvinit/0001-Makefile-disable-stack-protector-strong.patch
@@ -0,0 +1,33 @@
+From 0759f3f9bb2850df455599e7c82eda4ec804e3b6 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Wed, 10 Mar 2021 22:57:50 +0100
+Subject: [PATCH] Makefile: disable stack-protector-strong
+
+Fixes:
+
+  .../aarch64-buildroot-linux-uclibc/bin/ld: runlevel.o: in function `main':
+  runlevel.c:(.text.startup+0x4): undefined reference to `__stack_chk_guard'
+  .../aarch64-buildroot-linux-uclibc/bin/ld: cannot find -lssp_nonshared
+  .../aarch64-buildroot-linux-uclibc/bin/ld: cannot find -lssp
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ src/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 1b368dc..1985929 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@
+-- 
+2.30.1
+

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-19 21:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-19 21:04 [Buildroot] [git commit branch/2021.02.x] package/sysvinit: add patch to fix compile without stack-protector support Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.