summaryrefslogtreecommitdiff
path: root/packages/glibc/glibc-2.3.2/ldso-disable-hwcap.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/glibc/glibc-2.3.2/ldso-disable-hwcap.patch
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/glibc/glibc-2.3.2/ldso-disable-hwcap.patch')
-rw-r--r--packages/glibc/glibc-2.3.2/ldso-disable-hwcap.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/packages/glibc/glibc-2.3.2/ldso-disable-hwcap.patch b/packages/glibc/glibc-2.3.2/ldso-disable-hwcap.patch
index e69de29bb2..5538d20672 100644
--- a/packages/glibc/glibc-2.3.2/ldso-disable-hwcap.patch
+++ b/packages/glibc/glibc-2.3.2/ldso-disable-hwcap.patch
@@ -0,0 +1,62 @@
+--- glibc-2.3.2/sysdeps/generic/dl-sysdep.c.orig 2003-10-28 12:22:33.000000000 -0500
++++ glibc-2.3.2/sysdeps/generic/dl-sysdep.c 2003-10-28 12:38:49.000000000 -0500
+@@ -354,7 +354,11 @@ _dl_important_hwcaps (const char *platfo
+ #ifdef USE_TLS
+ /* For TLS enabled builds always add 'tls'. */
+ ++cnt;
+-#else
++#endif
++
++ if (__access ("/etc/ld.so.nohwcap", F_OK) == 0)
++ cnt = 0;
++
+ if (cnt == 0)
+ {
+ /* If we have platform name and no important capability we only have
+@@ -369,7 +373,6 @@ _dl_important_hwcaps (const char *platfo
+ *sz = 1;
+ return result;
+ }
+-#endif
+
+ /* Create temporary data structure to generate result table. */
+ temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp));
+@@ -411,9 +414,7 @@ _dl_important_hwcaps (const char *platfo
+ result = (struct r_strlenpair *) malloc (*sz * sizeof (*result) + total);
+ if (result == NULL)
+ {
+-#ifndef USE_TLS
+ no_memory:
+-#endif
+ INTUSE(_dl_signal_error) (ENOMEM, NULL, NULL,
+ N_("cannot create capability list"));
+ }
+--- glibc-2.3.2/sysdeps/generic/dl-cache.c.orig 2003-10-28 12:32:36.000000000 -0500
++++ glibc-2.3.2/sysdeps/generic/dl-cache.c 2003-10-28 12:38:57.000000000 -0500
+@@ -246,6 +246,7 @@ _dl_load_cache_lookup (const char *name)
+ /* This file ends in static libraries where we don't have a hwcap. */
+ unsigned long int *hwcap;
+ uint64_t platform;
++ int disable_hwcap = 0;
+ #ifndef SHARED
+ weak_extern (_dl_hwcap);
+ #endif
+@@ -261,6 +262,9 @@ _dl_load_cache_lookup (const char *name)
+ if (platform != (uint64_t) -1)
+ platform = 1ULL << platform;
+
++ if (__access ("/etc/ld.so.nohwcap", F_OK) == 0)
++ disable_hwcap = 1;
++
+ #ifdef USE_TLS
+ # define TLS_BIT (1ULL << 63)
+ #else
+@@ -272,6 +276,8 @@ _dl_load_cache_lookup (const char *name)
+ if (GL(dl_osversion) \
+ && cache_new->libs[middle].osversion > GL(dl_osversion)) \
+ continue; \
++ if (disable_hwcap && lib->hwcap != 0) \
++ continue; \
+ if (_DL_PLATFORMS_COUNT && platform != -1 \
+ && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \
+ && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \