All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/2022.02.x] package/openssh: fix '-fzero-call-used-regs' option support detection
@ 2022-03-19 21:49 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2022-03-19 21:49 UTC (permalink / raw)
  To: buildroot

[-- Attachment #1: Type: text/plain, Size: 3321 bytes --]

commit: https://git.buildroot.net/buildroot/commit/?id=23fb7bbc00e22e90cf65997f4aae4a28c1ba4f6d
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.02.x

- add upstream patch ([1]) to fix '-fzero-call-used-regs' gcc compiler option
  support detection

- add autoreconf as the patch touches m4/openssh.m4

Fixes:

  - https://bugs.busybox.net/show_bug.cgi?id=14651

  bitmap.c: In function ‘reserve’:
  bitmap.c:98:1: sorry, unimplemented: ‘-fzero-call-used-regs’ not supported on this target
     98 | }
        | ^

[1] https://github.com/openssh/openssh-portable/commit/f107467179428a0e3ea9e4aa9738ac12ff02822d.patch

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 66fd92a4ce0599ee8c59b9ba95bf0f2c6ec74c43)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...ection-of-fzero-call-used-regs-all-suppor.patch | 38 ++++++++++++++++++++++
 package/openssh/openssh.mk                         |  4 +++
 2 files changed, 42 insertions(+)

diff --git a/package/openssh/0002-Improve-detection-of-fzero-call-used-regs-all-suppor.patch b/package/openssh/0002-Improve-detection-of-fzero-call-used-regs-all-suppor.patch
new file mode 100644
index 0000000000..ce5c5539ff
--- /dev/null
+++ b/package/openssh/0002-Improve-detection-of-fzero-call-used-regs-all-suppor.patch
@@ -0,0 +1,38 @@
+From b5fee5fe98f708c1dc61a1564db35eacadbfe8b3 Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@debian.org>
+Date: Thu, 24 Feb 2022 16:04:18 +0000
+Subject: [PATCH] Improve detection of -fzero-call-used-regs=all support
+
+GCC doesn't tell us whether this option is supported unless it runs into
+the situation where it would need to emit corresponding code.
+
+[Upstream: https://github.com/openssh/openssh-portable/commit/f107467179428a0e3ea9e4aa9738ac12ff02822d.patch]
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ m4/openssh.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/openssh.m4 b/m4/openssh.m4
+index 4f9c379..8c33c70 100644
+--- a/m4/openssh.m4
++++ b/m4/openssh.m4
+@@ -14,6 +14,8 @@ AC_DEFUN([OSSH_CHECK_CFLAG_COMPILE], [{
+ 	AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #include <stdlib.h>
+ #include <stdio.h>
++/* Trivial function to help test for -fzero-call-used-regs */
++void f(int n) {}
+ int main(int argc, char **argv) {
+ 	(void)argv;
+ 	/* Some math to catch -ftrapv problems in the toolchain */
+@@ -21,6 +23,7 @@ int main(int argc, char **argv) {
+ 	float l = i * 2.1;
+ 	double m = l / 0.5;
+ 	long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
++	f(0);
+ 	printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+ 	/*
+ 	 * Test fallthrough behaviour.  clang 10's -Wimplicit-fallthrough does
+-- 
+2.35.1
+
diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk
index 0e0d59e6ab..84add9563d 100644
--- a/package/openssh/openssh.mk
+++ b/package/openssh/openssh.mk
@@ -12,6 +12,10 @@ OPENSSH_CPE_ID_UPDATE = $(OPENSSH_VERSION_MINOR)
 OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
 OPENSSH_LICENSE = BSD-3-Clause, BSD-2-Clause, Public Domain
 OPENSSH_LICENSE_FILES = LICENCE
+
+# patch touching m4/openssh.m4
+OPENSSH_AUTORECONF = YES
+
 OPENSSH_CONF_ENV = \
 	LD="$(TARGET_CC)" \
 	LDFLAGS="$(TARGET_CFLAGS)" \

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-19 21:49 [Buildroot] [git commit branch/2022.02.x] package/openssh: fix '-fzero-call-used-regs' option support detection 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.