From: Dr. Stephen Henson Date: Sat, 21 Jul 2007 20:18:47 +0000 (+0000) Subject: For Unix fips builds... X-Git-Tag: FIPS_098_TEST_3~46 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1970bc2703489cc05107a89ea5ff9a6c070f51fd;p=oweals%2Fopenssl.git For Unix fips builds... 1. Make shared library build default. 2. Fix libcrypto build to work with shared builds. 3. Link fips utilities to fipscanister.o except for fipsdso builds. --- diff --git a/Configure b/Configure index 496260b820..4b819f81b1 100755 --- a/Configure +++ b/Configure @@ -903,6 +903,11 @@ print "Configuring for $target\n"; &usage if (!defined($table{$target})); +if ($fips && ($disabled{"shared"} eq "default")) + { + delete $disabled{"shared"}; + } + foreach (sort (keys %disabled)) { @@ -1179,7 +1184,7 @@ if ($zlib) my $shared_mark = ""; if ($shared_target eq "") { - $no_shared_warn = 1 if !$no_shared; + $no_shared_warn = 1 if !$no_shared && !$fips; $no_shared = 1; } if (!$no_shared) diff --git a/Makefile.org b/Makefile.org index 2843a9fbb0..6a19e9e898 100644 --- a/Makefile.org +++ b/Makefile.org @@ -354,7 +354,12 @@ libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS) $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \ $(AR) libcrypto.a fips-1.0/fipscanister.o ; \ else \ - $(MAKE) SHLIBDIRS='crypto' build-shared; \ + if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \ + FIPSLD_CC=$(CC); CC=fips-1.0/fipsld; \ + FIPSLD_NPT="y"; FIPSLD_LIBFIPS=y; \ + export CC FIPSLD_CC FIPSLD_NPT FIPSLD_LIBFIPS; \ + fi; \ + $(MAKE) -e SHLIBDIRS='crypto' build-shared; \ fi \ else \ echo "There's no support for shared libraries on this platform" >&2; \ diff --git a/test/Makefile b/test/Makefile index 8421b999aa..2338406d30 100644 --- a/test/Makefile +++ b/test/Makefile @@ -397,7 +397,7 @@ $(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO) FIPS_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \ shlib_target="$(SHLIB_TARGET)"; \ fi; \ - if [ -z "$(SHARED_LIBS)" -o "$${shlib_target}" = "darwin-shared" ] ; then \ + if [ "$(FIPSCANLIB)" != "libfips" -o -z "$(SHARED_LIBS)" -o "$${shlib_target}" = "darwin-shared" ] ; then \ LIBRARIES=""; \ if [ -n "$(FIPSCANLIB)" ]; then \ FIPSLD_CC=$(CC); CC=$(TOP)/fips-1.0/fipsld; FIPSLD_NPT="y" \