components/openssl/openssl-0.9.8-fips-140/patches/sparc-01-ccwrap.patch
changeset 363 9c0cad004039
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/openssl/openssl-0.9.8-fips-140/patches/sparc-01-ccwrap.patch	Sun Jul 03 23:28:09 2011 -0700
@@ -0,0 +1,54 @@
+diff -ruN ../a/openssl-0.9.8k/fips/fipsld openssl-0.9.8k/fips/fipsld
+--- ../a/openssl-0.9.8k/fips/fipsld	2008-09-16 12:12:10.000000000 +0200
++++ openssl-0.9.8k/fips/fipsld	2009-10-06 16:45:34.379991933 +0200
+@@ -12,6 +12,14 @@
+ 
+ #set -x
+ 
++# Solaris OpenSSL:
++# Wrap the calls to cc to remove the "-g" option when compiling
++# (SPARC only). If "-g" is used on SPARC to build libcrypto.so
++# the fingerprint will be incorrectly generated as "-g" promotes
++# static symbols to globals which then interacts with the linker to
++# produce a changed text section.
++CCWRAP=ccwrap
++
+ CC=${FIPSLD_CC:-${CC}}
+ [ -n "${CC}" ] || { echo '$CC is not defined'; exit 1; }
+ 
+@@ -112,7 +120,7 @@
+ 	fi
+ 
+ 	/bin/rm -f "${TARGET}"
+-	${CC}	${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
++	${CCWRAP} ${CC}	${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
+ 		"${PREMAIN_C}" \
+ 		${_WL_PREMAIN} "$@"
+ 
+@@ -124,7 +132,7 @@
+ 	fi
+ 
+ 	# recompile with signature...
+-	${CC}	${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
++	${CCWRAP} ${CC}	${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
+ 		-DHMAC_SHA1_SIG=\"${SIG}\" "${PREMAIN_C}" \
+ 		${_WL_PREMAIN} "$@"
+ 	;;
+@@ -151,7 +159,7 @@
+ 	{ echo "${PREMAIN_C} fingerprint mismatch"; exit 1; }
+ 
+ 	/bin/rm -f "${TARGET}"
+-	${CC}	${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
++	${CCWRAP} ${CC}	${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
+ 		"${PREMAIN_C}" \
+ 		${_WL_PREMAIN} "$@"
+ 
+@@ -163,7 +171,7 @@
+ 	fi
+ 
+ 	# recompile with signature...
+-	${CC}	${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
++	${CCWRAP} ${CC}	${CANISTER_O_CMD:+"${CANISTER_O_CMD}"} \
+ 		-DHMAC_SHA1_SIG=\"${SIG}\" "${PREMAIN_C}" \
+ 		${_WL_PREMAIN} "$@"
+ 	;;