OpenSSL CVS Repository
http://cvs.openssl.org/
____________________________________________________________
________________
Server: cvs.openssl.org Name: Andy
Polyakov
Root: /v/openssl/cvs Email: appro openssl.org
Module: openssl Date:
21-Oct-2006 15:38:16
Branch: HEAD Handle:
2006102114381501
Modified files:
openssl Configure Makefile.org
Makefile.shared
openssl/apps Makefile
Log:
Rudimentary support for cross-compiling.
Summary:
Revision Changes Path
1.542 +18 -2 openssl/Configure
1.277 +11 -7 openssl/Makefile.org
1.58 +3 -1 openssl/Makefile.shared
1.23 +1 -3 openssl/apps/Makefile
____________________________________________________________
________________
patch -p0 <<' .'
Index: openssl/Configure
============================================================
================
$ cvs diff -u -r1.541 -r1.542 Configure
--- openssl/Configure 17 Oct 2006 13:38:08 -0000 1.541
+++ openssl/Configure 21 Oct 2006 13:38:15 -0000 1.542
 -38,6 +38,8 
# --test-sanity Make a number of sanity checks on the
data in this file.
# This is a debugging tool for OpenSSL
developers.
#
+# --cross-compile-prefix Add specified prefix to binutils
components.
+#
# no-hw-xxx do not compile support for specific
crypto hardware.
# Generic OpenSSL-style methods relating to
this support
# are always compiled but return NULL if
the hardware
 -571,6 +573,7 
my $openssldir="";
my $exe_ext="";
my $install_prefix="";
+my $cross_compile_prefix="";
my $no_threads=0;
my $threads=0;
my $no_shared=0; # but "no-shared" is default
 -764,6 +767,10 
{
$withargs{"zlib-include"}="-I$1";
}
+ elsif (/^--cross-compile-prefix=(.*)$/)
+ {
+ $cross_compile_prefix=$1;
+ }
else
{
print STDERR $usage;
 -1310,7 +1317,17 
s/^PLATFORM=.*$/PLATFORM=$target/;
s/^OPTIONS=.*$/OPTIONS=$options/;
s/^CONFIGURE_ARGS=.*$/CONFIGURE_ARGS=$argvstring/;
- s/^CC=.*$/CC= $cc/;
+ if ($cross_compile_prefix)
+ {
+ s/^CC=.*$/CROSS_COMPILE_PREFIX=
$cross_compile_prefixnCC= $(CROSS_COMPILE_PREFIX)$cc/;
+ s/^AR=s*/AR= $(CROSS_COMPILE_PREFIX)/;
+ s/^NM=s*/NM= $(CROSS_COMPILE_PREFIX)/;
+ s/^RANLIB=s*/RANLIB= $(CROSS_COMPILE_PREFIX)/;
+ }
+ else {
+ s/^CC=.*$/CC= $cc/;
+ s/^RANLIB=.*/RANLIB= $ranlib/;
+ }
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq
"gcc";
s/^CFLAG=.*$/CFLAG= $cflags/;
s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
 -1329,7 +1346,6 
s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
s/^WP_ASM_OBJ=.*$/WP_ASM_OBJ= $wp_obj/;
s/^PROCESSOR=.*/PROCESSOR= $processor/;
- s/^RANLIB=.*/RANLIB= $ranlib/;
s/^ARFLAGS=.*/ARFLAGS= $arflags/;
s/^PERL=.*/PERL= $perl/;
s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-incl
ude"}/;
 .
patch -p0 <<' .'
Index: openssl/Makefile.org
============================================================
================
$ cvs diff -u -r1.276 -r1.277 Makefile.org
--- openssl/Makefile.org 9 Jun 2006 15:44:19 -0000 1.276
+++ openssl/Makefile.org 21 Oct 2006 13:38:15 -0000 1.277
 -66,6 +66,7 
ARFLAGS=
AR=ar $(ARFLAGS) r
RANLIB= ranlib
+NM= nm
PERL= perl
TAR= tar
TARFLAGS= --no-recursion
 -174,7 +175,8 
BUILDENV= PLATFORM='$' PROCESSOR='$'
CC='$' CFLAG='$'
AS='$' ASFLAG='$ -c'
- AR='$' PERL='$' RANLIB='$'
+ AR='$' NM='$' RANLIB='$'
+ PERL='$'
SDIRS='$' LIBRPATH='$/lib'
INSTALL_PREFIX='$'
INSTALLTOP='$' OPENSSLDIR='$'
 -383,12 +385,14 
set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
rehash: rehash.time
-rehash.time: certs
- (OPENSSL="`pwd`/util/opensslwrap.sh";
- OPENSSL_DEBUG_MEMORY=on;
- export OPENSSL OPENSSL_DEBUG_MEMORY;
- $(PERL) tools/c_rehash certs)
- touch rehash.time
+rehash.time: certs apps
+ if [ -z "$(CROSS_COMPILE_PREFIX)" ]; then
+ (OPENSSL="`pwd`/util/opensslwrap.sh";
+ OPENSSL_DEBUG_MEMORY=on;
+ export OPENSSL OPENSSL_DEBUG_MEMORY;
+ $(PERL) tools/c_rehash certs) &&
+ touch rehash.time;
+ else :; fi
test: tests
 .
patch -p0 <<' .'
Index: openssl/Makefile.shared
============================================================
================
$ cvs diff -u -r1.57 -r1.58 Makefile.shared
--- openssl/Makefile.shared 20 May 2006 08:52:34
-0000 1.57
+++ openssl/Makefile.shared 21 Oct 2006 13:38:15
-0000 1.58
 -14,6 +14,8 
LDFLAGS=
SHARED_LDFLAGS=
+NM=nm
+
# LIBNAME contains just the name of the library, without
prefix ("lib"
# on Unix, "cyg" for certain forms under
Cygwin...) or suffix (.a, .so,
# .dll, ...). This one MUST have a value when using this
makefile to
 -101,7 +103,7 
LIBDEPS="$${LIBDEPS (LIBDEPS)}&q
uot;;
SHAREDCMD="$${SHAREDCMD (CC)}";
SHAREDFLAGS="$${SHAREDFLAGS (CFLAGS)
$(SHARED_LDFLAGS)}";
- nm -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' '
> lib$(LIBNAME).exp;
+ $(NM) -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d'
' > lib$(LIBNAME).exp;
LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^
*-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^
*-L//'; fi; done | uniq`;
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`;
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH
 .
patch -p0 <<' .'
Index: openssl/apps/Makefile
============================================================
================
$ cvs diff -u -r1.22 -r1.23 Makefile
--- openssl/apps/Makefile 9 Jun 2006 15:44:24 -0000 1.22
+++ openssl/apps/Makefile 21 Oct 2006 13:38:16 -0000 1.23
 -163,9 +163,7 
APPNAME=$(EXE) OBJECTS="$(PROGRAM).o
$(E_OBJ)"
LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)"
link_app.$$
- -(cd ..;
- OPENSSL="`pwd`/util/opensslwrap.sh"; export
OPENSSL;
- $(PERL) tools/c_rehash certs)
+ (cd ..; $(MAKE) rehash)
progs.h: progs.pl
$(PERL) progs.pl $(E_EXE) >progs.h
 .
____________________________________________________________
__________
OpenSSL Project http://www.openssl.org
CVS Repository Commit List
openssl-cvs openssl.org
Automated List Manager
majordomo openssl.org
|