From a157cf854f75fc5ebe347447582dd28dc2735fa3 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Tue, 28 May 2024 10:23:56 +0200 Subject: [PATCH] package/openssh: fix build failure with gcc 11.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch fix the following build failure: output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -pipe -Wno-error=format-truncation -Wall -Wextra -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-parameter -Wno-unused-result -Wimplicit-fallthrough -Wmisleading-indentation -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fzero-call-used-regs=used -fno-builtin-memset -fstack-protector-strong -fPIC -I. -I.. -I. -I./.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE -DHAVE_CONFIG_H -c port-aix.c sha2.c: In function ‘SHA256Init’: sha2.c:360:1: sorry, unimplemented: ‘-fzero-call-used-regs’ not supported on this target 360 | } | ^ make[3]: *** [Makefile:106: sha2.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [Makefile:199: openbsd-compat/libopenbsd-compat.a] Error 2 This commit applies an upstream patch that improves the detection of -fzero-call-used-regs=used. Signed-off-by: Dario Binacchi Signed-off-by: Arnout Vandecappelle (cherry picked from commit 4aff617b9591dc46d965eaa00f9701943e0cd723) Signed-off-by: Peter Korsgaard --- ...tection-of-fzero-call-used-regs-used.patch | 32 +++++++++++++++++++ package/openssh/openssh.mk | 3 ++ 2 files changed, 35 insertions(+) create mode 100644 package/openssh/0001-Improve-detection-of-fzero-call-used-regs-used.patch diff --git a/package/openssh/0001-Improve-detection-of-fzero-call-used-regs-used.patch b/package/openssh/0001-Improve-detection-of-fzero-call-used-regs-used.patch new file mode 100644 index 0000000000..1b91b15a79 --- /dev/null +++ b/package/openssh/0001-Improve-detection-of-fzero-call-used-regs-used.patch @@ -0,0 +1,32 @@ +From f9193f03db0029fc9c31fbdb5c66a2737446bd8f Mon Sep 17 00:00:00 2001 +From: Darren Tucker +Date: Mon, 25 Mar 2024 09:28:02 +1100 +Subject: [PATCH] Improve detection of -fzero-call-used-regs=used. + +Should better detect problems with gcc 13 on m68k. bz#3673 from Colin +Watson via bz#3673 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110934 + +Signed-off-by: Darren Tucker +Upstream: https://github.com/openssh/openssh-portable/commit/f9193f03db0029fc9c31fbdb5c66a2737446bd8f +--- + m4/openssh.m4 | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/m4/openssh.m4 b/m4/openssh.m4 +index 033df501c3d8..176a8d1c9282 100644 +--- a/m4/openssh.m4 ++++ b/m4/openssh.m4 +@@ -20,7 +20,10 @@ char *f2(char *s, ...) { + va_end(args); + return strdup(ret); + } ++int i; ++double d; + const char *f3(int s) { ++ i = (int)d; + return s ? "good" : "gooder"; + } + int main(int argc, char **argv) { +-- +2.43.0 + diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk index f0b499590a..a962172310 100644 --- a/package/openssh/openssh.mk +++ b/package/openssh/openssh.mk @@ -13,6 +13,9 @@ OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable OPENSSH_LICENSE = BSD-3-Clause, BSD-2-Clause, Public Domain OPENSSH_LICENSE_FILES = LICENCE +# 0001-Improve-detection-of-fzero-call-used-regs-used.patch +OPENSSH_AUTORECONF = YES + OPENSSH_CONF_ENV = \ LD="$(TARGET_CC)" \ LDFLAGS="$(TARGET_CFLAGS)" \