config: detect if assembler supports --noexecstack and pass it down [from HEAD].
[oweals/openssl.git] / fips / fipsld
index 461f1effdd89fa357351c0550a14e7c46f52222e..8c26c8596dec1f1e85b5c100f17fbadfdc083ecf 100755 (executable)
@@ -117,15 +117,16 @@ lib*|*.dll)       # must be linking a shared lib...
                ${_WL_PREMAIN} "$@"
 
        # generate signature...
-       SIG=`"${THERE}/fips/fips_premain_dso" "${TARGET}"`
-echo $TARGET: $SIG >>/tmp/fipsld.log
-incore $TARGET >>/tmp/fipsld.log 2>&1
+       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
        fi
 
-
        # recompile with signature...
        ${CC}   ${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
                -DHMAC_SHA1_SIG=\"${SIG}\" "${PREMAIN_C}" \
@@ -159,9 +160,11 @@ incore $TARGET >>/tmp/fipsld.log 2>&1
                ${_WL_PREMAIN} "$@"
 
        # generate signature...
-       SIG=`"${TARGET}"`
-echo $TARGET: $SIG >>/tmp/fipsld.log
-incore $TARGET >>/tmp/fipsld.log 2>&1
+       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