Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 659210 - net-misc/openssh: Cygwin requires --without-hardening (-mfunction-return=thunk does not work with gcc-7 yet)
Summary: net-misc/openssh: Cygwin requires --without-hardening (-mfunction-return=thun...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Other
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL: https://cygwin.com/ml/cygwin/2018-06/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-26 07:30 UTC by Michael Haubenwallner (RETIRED)
Modified: 2018-08-24 12:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed patch for net-misc/openssh ebuild (0001-net-misc-openssh-no-hardening-with-Cygwin-yet-659210.patch,1.10 KB, patch)
2018-06-26 07:44 UTC, Michael Haubenwallner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Haubenwallner (RETIRED) gentoo-dev 2018-06-26 07:30:53 UTC
As reported to Cygwin in https://cygwin.com/ml/cygwin/2018-06/msg00271.html

On Jun 25 14:08, Michael Haubenwallner wrote:
> Hi,
> 
> I'm encountering a package's configure script (openssh-7.7p1) that
> successfully tests for the compiler flag "-mfunction-return=thunk",
> which causes subsequent linker errors (and fails to identify zlib):
>  relocation truncated to fit: R_X86_64_32S against `.text'
> 
> The compiler used is gcc-7.3.0 with binutils-2.29.1.20171006 (current),
> and the easiest test case here is:
> 
> $ echo 'int main() { return 0; }' > conftest.c
> $ gcc -mfunction-return=thunk conftest.c
> /tmp/ccv1Ird0.o:conftest.c:(.text+0x1a): relocation truncated to fit: R_X86_64_32S against `.text'
> collect2: error: ld returned 1 exit status
> 
> Not sure though where to finally report this problem:
> * openssh, as they should do a link-test rather than compile-test
> * gcc, as their generated code is wrong for cygwin
> * binutils, as their ld is unable to link that code
> * cygwin, as the maintainers of cygwin support in binutils+gcc
> 
> After all, openssh-7.7p1-1.src cygwin package currently fails to compile.

configure with --without-hardening for the time being.

Corinna
Comment 1 Michael Haubenwallner (RETIRED) gentoo-dev 2018-06-26 07:44:38 UTC
Created attachment 537268 [details, diff]
proposed patch for net-misc/openssh ebuild
Comment 2 Fabian Groffen gentoo-dev 2018-08-23 16:46:40 UTC
@maintainer: are you ok with haubi's patch? can we apply it?
Comment 3 Larry the Git Cow gentoo-dev 2018-08-24 12:23:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03a41c5401c51ae7c55adb8b4de3d58f0d3dbb58

commit 03a41c5401c51ae7c55adb8b4de3d58f0d3dbb58
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-08-24 12:07:58 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-08-24 12:07:58 +0000

    net-misc/openssh: set "--without-hardening" for Cygwin
    
    Closes: https://bugs.gentoo.org/659210
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 net-misc/openssh/openssh-7.7_p1-r9.ebuild | 1 +
 1 file changed, 1 insertion(+)