public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* linker error with gcc flag -mfunction-return=thunk
@ 2018-06-25 12:41 Michael Haubenwallner
  2018-06-25 14:08 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Haubenwallner @ 2018-06-25 12:41 UTC (permalink / raw)
  To: cygwin

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.

Thanks!
/haubi/

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-25 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 12:41 linker error with gcc flag -mfunction-return=thunk Michael Haubenwallner
2018-06-25 14:08 ` Corinna Vinschen
2018-06-25 14:25   ` Corinna Vinschen
2018-06-25 18:33     ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).