[openssl-dev] [openssl.org #3945] broken cross-compilation for BSD-x86_64

Maxim Gorbachyov via RT rt at openssl.org
Wed Jul 15 10:43:46 UTC 2015


Hello.

I'm trying to cross-build OpenSSL 1.0.2d for BSD-x86_64 (on linux host):

./Configure -no-idea -no-mdc2 -no-rc5 -D_GNU_SOURCE
--cross-compile-prefix=x86_64-pc-freebsd8- BSD-x86_64 -no-asm && make
depend
...
Configured for BSD-x86_64.
making depend in crypto...
make[1]: Entering directory '.../openssl-1.0.2d/crypto'
../util/domd: 30: ../util/domd: makedepend: not found

Indeed, configured for BSD-x86_64 openssl-1.0.2d/Makefile wants
something strange:
MAKEDEPPROG=makedepend

For example, same thing when configured for BSD-x86:
MAKEDEPPROG= $(CROSS_COMPILE)gcc

I think the issue was introduced by this commit:
===
commit f877da9cedb95df94105d7292f8e0963175e58dc
Author: Ben Laurie <ben at links.org>
Date:   Fri May 1 15:53:46 2015 +0100

    Use cc instead of gcc so either clang or gcc is used as
appropriate. Add clang
    flags needed to keep it happy.

    Reviewed-by: Richard Levitte <levitte at openssl.org>
===

Among other changes it has:

-"BSD-x86_64",  "gcc:-DL_ENDIAN -O3
-Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT
DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"BSD-x86_64",  "cc:-DL_ENDIAN -O3
-Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT
DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",

But Configure uses that "gcc" to get MAKEDEPPROG:
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc";

I'm not sure what is the best way to fix it. I'm able to cross-build
for BSD-x86_64 with this line in Configure:
"BSD-x86_64",  "gcc:-DL_ENDIAN -O3
-Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT
DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
, but "cc" is there for a reason, I guess.

Could you please suggest how to fix it?

_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-mod at openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod



More information about the openssl-dev mailing list