From af6295211178e1237df6b9b05b5cfe275238e8dc Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Thu, 26 Aug 2010 14:55:34 +0200 Subject: Fix SSL build failure when building in minimal source tree Building in a source tree without prebuilt platform independent build results failed on the SSL examples when cross building. This has been solved by not building the SSL examples during a cross build. --- configure.in | 2 +- erts/configure.in | 9 ++++++++- lib/ssl/Makefile | 5 +++-- make/otp.mk.in | 5 +++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index f9fa34cedf..d0879c6291 100644 --- a/configure.in +++ b/configure.in @@ -97,7 +97,7 @@ fi TARGET=$host AC_SUBST(TARGET) -if test X$cross_compiling = Xyes; then +if test "$cross_compiling" = "yes"; then CROSS_COMPILING=yes else CROSS_COMPILING=no diff --git a/erts/configure.in b/erts/configure.in index 5d02fd1ee4..9cc0307e37 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -90,6 +90,13 @@ else host_os=$host fi +if test "$cross_compiling" = "yes"; then + CROSS_COMPILING=yes +else + CROSS_COMPILING=no +fi +AC_SUBST(CROSS_COMPILING) + ERL_XCOMP_SYSROOT_INIT AC_ISC_POSIX @@ -3605,7 +3612,7 @@ dnl Should one use EXEEXT or ac_exeext? if test -f "$erl_xcomp_sysroot$SSL_BINDIR/openssl$EXEEXT"; then if test "$cross_compiling" = "yes"; then dnl Cannot test it; hope it is working... - OPENSSL_CMD="$SSL_BINDIR/openssl" + OPENSSL_CMD="$erl_xcomp_sysroot$SSL_BINDIR/openssl" else if "$SSL_BINDIR/openssl" version > /dev/null 2>&1; then OPENSSL_CMD="$SSL_BINDIR/openssl" diff --git a/lib/ssl/Makefile b/lib/ssl/Makefile index b8b51270c9..5c6b7a2941 100644 --- a/lib/ssl/Makefile +++ b/lib/ssl/Makefile @@ -28,9 +28,10 @@ ifeq ($(findstring win32,$(TARGET)),win32) ifeq ($(HOST_OS),) HOST_OS := $(shell $(ERL_TOP)/erts/autoconf/config.guess) endif -ifeq ($(findstring solaris,$(HOST_OS)),solaris) -SKIP_BUILDING_BINARIES := true endif + +ifeq ($(CROSS_COMPILING),yes) +SKIP_BUILDING_BINARIES := true else SKIP_BUILDING_BINARIES := false endif diff --git a/make/otp.mk.in b/make/otp.mk.in index 9f0486a609..6ae7c5b456 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -24,6 +24,11 @@ .SUFFIXES: .erl .beam .yrl .xrl .bin .mib .hrl .sgml .xml .xmlsrc .html .ps \ .3 .1 .fig .dvi .tex .class .java .pdf .fo .psframe .pscrop .el .elc +# ---------------------------------------------------- +# Cross Compiling +# ---------------------------------------------------- +CROSS_COMPILING = @CROSS_COMPILING@ + # ---------------------------------------------------- # Common macros # ---------------------------------------------------- -- cgit v1.2.3