FIPSLD_NPT environment variable to disable pass-thru when building
authorDr. Stephen Henson <steve@openssl.org>
Sun, 11 Feb 2007 00:51:58 +0000 (00:51 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 11 Feb 2007 00:51:58 +0000 (00:51 +0000)
standalone utilities.

fips-1.0/fipsld
test/Makefile

index 92c864ede4e20f91a454f936844a08cf0d62a478..ec10e20c0f9656d3fed3e3de6e2a92e23cec4114 100755 (executable)
@@ -27,6 +27,9 @@ CC=${FIPSLD_CC:-${CC}}
 # simple checks.  Pass-thru to compiler directly if not linking
 # to libcrypto, allowing auto-tooled applications to utilize fipsld
 # (e.g.  CC=/usr/local/ssl/bin/fipsld FIPSLD_CC=gcc ./configure && make )
+# If FIPSLD_NPT is set never call the pass-thru: the standalone fips commands
+# need this because they don't link to libcrypto
+[ "x$FIPSLD_NPT" != "x" ] || {
 case "$*" in
        *libcrypto.a*)
        ;;
@@ -36,6 +39,7 @@ case "$*" in
                exec ${CC} $*
        ;;
 esac
+}
 
 # Turn on debugging output?
 (   while [ "x$1" != "x" -a "x$1" != "x-DDEBUG_FINGERPRINT_PREMAIN" ]; do shift; done;
index 1eeba890eb404636502903c6a6f815bf0c723a24..34724f9993bccf80b5ef20832dde6be216fe774c 100644 (file)
@@ -352,7 +352,8 @@ STANDALONE_BUILD_CMD=SHARED_LIBS="$(SHARED_LIBS)"; \
        fi
 
 FIPS_BUILD_CMD=if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
-         FIPSLD_CC=$(CC); CC=$(TOP)/fips-1.0/fipsld; export CC FIPSLD_CC; \
+         FIPSLD_CC=$(CC); CC=$(TOP)/fips-1.0/fipsld; FIPSLD_NPT="y"\
+         export CC FIPSLD_CC FIPSLD_STANDALONE ; \
        fi; $(STANDALONE_BUILD_CMD)
 
 FIPS_CRYPTO_BUILD_CMD=if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \