Default Makefile doesn't link correctly (solaris 10 x86_64)

Darren Tucker dtucker at zip.com.au
Fri Jun 6 00:25:40 EST 2008


Avleen Vig wrote:
> On Solaris 10, I found that if $CC=gcc, and $LD=gcc, the following
> combination of things will cause problems:
> 
> 1. Using gcc provided by Sun to make 64bit binaries
> 2. Setting CFLAGS=-m64
> 3. OpenSSL was compiled 64bit
> 
> OpenSSH compiles up to the point of linking. Because $CFLAGS isn't
> used when linking, gcc is called without -m64.
> This causes the following fatal error:
>   Wrong ELF class: ELFCLASS64

configure takes your word for it when you specify CC and LD yourself, so 
it's up to you to give it ones that work (including any necessary flags).

> It is easily worked around by setting LDFLAGS=-m64, but I expect that
> will cause problems where $LD=ld.

or CC="gcc -m64" and letting configure work out LD for itself.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


More information about the openssh-unix-dev mailing list