vanilla build of 7.7p1 release on linux/4.17 fails with gcc8 @ "/usr/bin/ld: unrecognized option '-Wl,-z,retpolineplt'"

Darren Tucker dtucker at
Fri Jun 8 09:03:41 AEST 2018

On 8 June 2018 at 07:09, PGNet Dev < at> wrote:
> Verifying a report I just got pinged about, building vanilla openssh 7.7p1 on linux configures ok, but fails build around 'retpoline'
> Should the retpoline flag be getting added?  If so, what's needed to make LD happy with it?

configure checks to see if the linker accepts those flags, so my guess
is that something is added later in configure that causes it to fail.
I suggest looking at config.log to see what the actaul compiler
messages are from these parts:

OSSH_CHECK_CFLAG_COMPILE([-mretpoline]) # clang

and the actual compiler output show up in config.log.

I wrote and tested this patch against the development versions of gcc
and clang which was all that was available at the time, it's possible
the released versions don't behave quite the same.

Darren Tucker (dtucker at
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

More information about the openssh-unix-dev mailing list