summaryrefslogtreecommitdiffstats
path: root/crypto/armcap.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2015-01-05 11:25:10 +0100
committerAndy Polyakov <appro@openssl.org>2015-01-23 15:38:41 +0100
commit9b05cbc33e7895ed033b1119e300782d9e0cf23c (patch)
treec3dca986e01d13b3ca7ac8d6ff776ca5e0183026 /crypto/armcap.c
parent27c7609cf8e72dfa2956bc00f166301ee983581a (diff)
Add assembly support to ios64-cross.
Fix typos in ios64-cross config line. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/armcap.c')
-rw-r--r--crypto/armcap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/armcap.c b/crypto/armcap.c
index 356fa15287..3dbe5748ea 100644
--- a/crypto/armcap.c
+++ b/crypto/armcap.c
@@ -46,12 +46,14 @@ unsigned long OPENSSL_rdtsc(void)
return 0;
}
+# if defined(__GNUC__) && __GNUC__>=2
+void OPENSSL_cpuid_setup(void) __attribute__ ((constructor));
+# endif
/*
* Use a weak reference to getauxval() so we can use it if it is available but
* don't break the build if it is not.
*/
-# if defined(__GNUC__) && __GNUC__>=2
-void OPENSSL_cpuid_setup(void) __attribute__ ((constructor));
+# if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__)
extern unsigned long getauxval(unsigned long type) __attribute__ ((weak));
# else
static unsigned long (*getauxval) (unsigned long) = NULL;