diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-10-15 14:14:35 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-10-15 14:14:35 +0000 |
commit | 8196257f00a03d342be9a8713a7610be7c7a1d85 (patch) | |
tree | 73c1fdffe556093f185d023bd540592206630991 /fips | |
parent | ac923d33778ae5f170005570796e51ab6cc3b7a8 (diff) |
Cross compilation updates.
Diffstat (limited to 'fips')
-rw-r--r-- | fips/Makefile | 8 | ||||
-rwxr-xr-x | fips/fipsld | 12 | ||||
-rw-r--r-- | fips/sha/Makefile | 6 |
3 files changed, 21 insertions, 5 deletions
diff --git a/fips/Makefile b/fips/Makefile index 6e7d56945a..720a883a69 100644 --- a/fips/Makefile +++ b/fips/Makefile @@ -63,7 +63,7 @@ testapps: all: @if [ -z "$(FIPSLIBDIR)" ]; then \ $(MAKE) -e subdirs lib fips_premain_dso$(EXE_EXT); \ - else \ + else \ $(MAKE) -e lib fips_premain_dso$(EXE_EXT) fips_standalone_sha1$(EXE_EXT); \ fi @@ -123,7 +123,11 @@ fips_premain_dso$(EXE_EXT): fips_premain.c $(FIPSLIBDIR)fipscanister.o ../libcrypto.a $(EX_LIBS) # this is executed only when linking with external fipscanister.o fips_standalone_sha1$(EXE_EXT): sha/fips_standalone_sha1.c - $(CC) $(CFLAGS) -DFIPSCANISTER_O -o $@ sha/fips_standalone_sha1.c $(FIPSLIBDIR)fipscanister.o $(EX_LIBS) + if [ -z $(HOSTCC) ] ; then \ + $(CC) $(CFLAGS) -DFIPSCANISTER_O -o $@ sha/fips_standalone_sha1.c $(FIPSLIBDIR)fipscanister.o $(EX_LIBS) ; \ + else \ + $(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../include -I../crypto sha/fips_standalone_sha1.c ../crypto/sha/sha1dgst.c ; \ + fi subdirs: @target=all; $(RECURSIVE_MAKE) diff --git a/fips/fipsld b/fips/fipsld index c71d4d95a5..8c26c8596d 100755 --- a/fips/fipsld +++ b/fips/fipsld @@ -117,7 +117,11 @@ lib*|*.dll) # must be linking a shared lib... ${_WL_PREMAIN} "$@" # generate signature... - SIG=`"${THERE}/fips/fips_premain_dso" "${TARGET}"` + if [ -z "${FIPS_SIG}" ]; then + SIG=`"${THERE}/fips/fips_premain_dso" "${TARGET}"` + else + SIG=`"${FIPS_SIG}" -dso "${TARGET}"` + fi /bin/rm -f "${TARGET}" if [ -z "${SIG}" ]; then echo "unable to collect signature"; exit 1 @@ -156,7 +160,11 @@ lib*|*.dll) # must be linking a shared lib... ${_WL_PREMAIN} "$@" # generate signature... - SIG=`"${TARGET}"` + if [ -z "${FIPS_SIG}" ]; then + SIG=`"${TARGET}"` + else + SIG=`"${FIPS_SIG}" -exe "${TARGET}"` + fi /bin/rm -f "${TARGET}" if [ -z "${SIG}" ]; then echo "unable to collect signature"; exit 1 diff --git a/fips/sha/Makefile b/fips/sha/Makefile index a661640bc6..0f8cca975a 100644 --- a/fips/sha/Makefile +++ b/fips/sha/Makefile @@ -46,8 +46,12 @@ lib: $(LIBOBJ) @echo $(LIBOBJ) > lib ../fips_standalone_sha1$(EXE_EXT): fips_standalone_sha1.o + if [ -z "$(HOSTCC)" ] ; then \ FIPS_SHA_ASM=""; for i in $(SHA1_ASM_OBJ) sha1dgst.o ; do FIPS_SHA_ASM="$$FIPS_SHA_ASM ../../crypto/sha/$$i" ; done; \ - $(CC) -o $@ $(CFLAGS) fips_standalone_sha1.o $$FIPS_SHA_ASM + $(CC) -o $@ $(CFLAGS) fips_standalone_sha1.o $$FIPS_SHA_ASM ; \ + else \ + $(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../../include -I../../crypto fips_standalone_sha1.c ../../crypto/sha/sha1dgst.c ; \ + fi files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO |