On Aug 13 13:19, Corinna Vinschen wrote: > On Aug 10 11:16, Damien Miller wrote: > > Hi, > > > > OpenSSH 7.8p1 is almost ready for release, so we would appreciate testing > > on as many platforms and systems as possible. This is a bugfix release. > > Problems building on Cygwin, partially a result of a new GCC version. > I'm still collecting and fixing. I hope I have a few days to create a > useful report with patches? Ok, it was less tragic than anticipated. I attached two patches which are required to make this build work on Cygwin. With these two patches OpenSSH builds and all tests pass. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat
From e6e3e243c34de8d789da5e0b5a1185ff46ec43cc Mon Sep 17 00:00:00 2001 From: Corinna Vinschen <vinschen@xxxxxxxxxx> Date: Mon, 13 Aug 2018 17:05:05 +0200 Subject: [PATCH 1/2] cygwin: add missing stdarg.h include Further header file standarization in Cygwin uncovered a lazy indirect include in bsd-cygwin_util.c Signed-off-by: Corinna Vinschen <vinschen@xxxxxxxxxx> --- openbsd-compat/bsd-cygwin_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c index 398a5f617af5..fb49e30f5981 100644 --- a/openbsd-compat/bsd-cygwin_util.c +++ b/openbsd-compat/bsd-cygwin_util.c @@ -36,6 +36,7 @@ #include <fcntl.h> #include <string.h> #include <unistd.h> +#include <stdarg.h> #include "xmalloc.h" -- 2.14.4
From efdb0636db2ce019411550622c8adf80ebef83b2 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen <vinschen@xxxxxxxxxx> Date: Mon, 13 Aug 2018 17:08:51 +0200 Subject: [PATCH 2/2] configure: work around GCC shortcoming on Cygwin Cygwin's latest 7.x GCC allows to specify -mfunction-return=thunk as well as -mindirect-branch=thunk on the command line, albeit producing invalid code, leading to an error at link stage. The check in configure.ac only checks if the option is present, but not if it produces valid code. This patch fixes it by special-casing Cygwin. Another solution may be to change these to linker checks. Signed-off-by: Corinna Vinschen <vinschen@xxxxxxxxxx> --- configure.ac | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index c4c759d4ea2f..83e5307501e5 100644 --- a/configure.ac +++ b/configure.ac @@ -164,8 +164,15 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result]) OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing]) if test "x$use_toolchain_hardening" = "x1"; then - OSSH_CHECK_CFLAG_COMPILE([-mfunction-return=thunk]) # gcc - OSSH_CHECK_CFLAG_COMPILE([-mindirect-branch=thunk]) # gcc + # Cygwin GCC 7.x allows thunking on the CLI, but produces non-working + # code. Unfortunately you only notice this at link time. + case "$host" in + *-*-cygwin*) ;; + *) + OSSH_CHECK_CFLAG_COMPILE([-mfunction-return=thunk]) # gcc + OSSH_CHECK_CFLAG_COMPILE([-mindirect-branch=thunk]) # gcc + ;; + esac OSSH_CHECK_CFLAG_COMPILE([-mretpoline]) # clang OSSH_CHECK_LDFLAG_LINK([-Wl,-z,retpolineplt]) OSSH_CHECK_CFLAG_COMPILE([-D_FORTIFY_SOURCE=2]) -- 2.14.4
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev