Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssl/dist/crypto Don't expose a getau...



details:   https://anonhg.NetBSD.org/src/rev/be45b3e32576
branches:  trunk
changeset: 446012:be45b3e32576
user:      maya <maya%NetBSD.org@localhost>
date:      Tue Nov 20 07:30:17 2018 +0000

description:
Don't expose a getauxval symbol.

The code already knows how to handle it, but it assumes anyone who uses
GCC or clang might resolve the getauxval function to something eventually.

The only time we will expose getauxval is if a package tries to substitute
getauxval too, and then code will start having mysterious failures.

getauxval is purely a linux function (as far as I can see), so limit it to
that.

PR pkg/53387, PR port-arm/53386

diffstat:

 crypto/external/bsd/openssl/dist/crypto/armcap.c |  2 +-
 crypto/external/bsd/openssl/dist/crypto/ppccap.c |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r b9ef3037c030 -r be45b3e32576 crypto/external/bsd/openssl/dist/crypto/armcap.c
--- a/crypto/external/bsd/openssl/dist/crypto/armcap.c  Tue Nov 20 06:43:26 2018 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/armcap.c  Tue Nov 20 07:30:17 2018 +0000
@@ -70,7 +70,7 @@
  * 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 && defined(__ELF__)
+# if defined(__linux__)
 extern unsigned long getauxval(unsigned long type) __attribute__ ((weak));
 # else
 static unsigned long (*getauxval) (unsigned long) = NULL;
diff -r b9ef3037c030 -r be45b3e32576 crypto/external/bsd/openssl/dist/crypto/ppccap.c
--- a/crypto/external/bsd/openssl/dist/crypto/ppccap.c  Tue Nov 20 06:43:26 2018 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/ppccap.c  Tue Nov 20 07:30:17 2018 +0000
@@ -178,7 +178,7 @@
  * feature detection, not *run-time*. In other words if we link with
  * symbol present, it's expected to be present even at run-time.
  */
-#if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__)
+#if defined(__linux__)
 extern unsigned long getauxval(unsigned long type) __attribute__ ((weak));
 #else
 static unsigned long (*getauxval) (unsigned long) = NULL;



Home | Main Index | Thread Index | Old Index