]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/uclibc/0001-Revert-ldconfig-add-glibc-compatibility-fix.patch
uclibc: fix ldconfig for x86_64
[coffee/buildroot.git] / package / uclibc / 0001-Revert-ldconfig-add-glibc-compatibility-fix.patch
1 From 92d250d387e247029900c9074150f45866b29781 Mon Sep 17 00:00:00 2001
2 From: Waldemar Brodkorb <wbx@openadk.org>
3 Date: Sun, 29 Apr 2018 19:34:11 +0200
4 Subject: [PATCH] Revert "ldconfig: add glibc compatibility fix"
5
6 This reverts commit 2a3bb4daf5778c5875674cd26a3c75b3d460a042.
7
8 This is breaking ld.so.cache usage. Seen on Gentoo/amd64.
9
10 Reported-by: "Anthony G. Basile" <basile@freeharbor.net>
11 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
12 ---
13  utils/ldconfig.c | 11 ++++++-----
14  1 file changed, 6 insertions(+), 5 deletions(-)
15
16 diff --git a/utils/ldconfig.c b/utils/ldconfig.c
17 index 58939d6..e6b7881 100644
18 --- a/utils/ldconfig.c
19 +++ b/utils/ldconfig.c
20 @@ -184,9 +184,10 @@ static char *readsoname(char *name, FILE *infile, int expected_type,
21                 res = readsoname32(name, infile, expected_type, type);
22         else {
23                 res = readsoname64(name, infile, expected_type, type);
24 -
25 -               // For 64-bit glibc compatibility
26 -               *type |= FLAG_X8664_LIB64;
27 +#if 0
28 +               /* relies on multilib support which we dont have ... */
29 +               *type |= LIB_ELF64;
30 +#endif
31         }
32  
33         return res;
34 @@ -757,7 +758,7 @@ void cache_print(void)
35  
36         for (fd = 0; fd < header->nlibs; fd++) {
37                 printf("\t%s ", strs + libent[fd].sooffset);
38 -               switch (libent[fd].flags & ~LIB_ELF64 & FLAG_TYPE_MASK) {
39 +               switch (libent[fd].flags & ~LIB_ELF64) {
40                 case LIB_DLL:
41                         printf("(libc4)");
42                         break;
43 @@ -770,7 +771,7 @@ void cache_print(void)
44                 case LIB_ELF_LIBC5:
45                 case LIB_ELF_LIBC6:
46                         printf("(libc%d%s)",
47 -                              (libent[fd].flags & ~LIB_ELF64 & FLAG_TYPE_MASK) + 3,
48 +                              (libent[fd].flags & ~LIB_ELF64) + 3,
49                                libent[fd].flags & LIB_ELF64 ? "/64" : "");
50                         break;
51                 default:
52 -- 
53 2.1.4
54