Skip to contentSkip to conversation

ldconfig-native: default to both lib and lib64 directories

PATCH Superseded Ming Liu 2 participants 3 messages May 4, 2014 – May 5, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ming Liu

author
#0 lore raw

PATCH 1/1 ldconfig-native: default to both lib and lib64 directories

make ldconfig default to both /lib+/usr/lib and /lib64+/usr/lib64 on bi-ABI architectures.

---
 .../ldconfig-default-to-both-lib-and-lib64.patch   | 32 ++++++++++++++++++++++
 meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb |  4 ++-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-both-lib-and-lib64.patch
meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-both-lib-and-lib64.patch new file +32 -0
new file mode 100644
index 0000000..230502e
@@ -0,0 +1,32 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+make ldconfig default to both /lib+/usr/lib and /lib64+/usr/lib64
+on bi-ABI architectures.
+
+---
+ ldconfig.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff -urpN a/ldconfig.c b/ldconfig.c
+--- a/ldconfig.c
++++ b/ldconfig.c
+@@ -52,7 +52,9 @@
+ 
+ #define SYSCONFDIR "/etc"
+ #define LIBDIR "/usr/lib"
++#define LIBDIR64 "/usr/lib64"
+ #define SLIBDIR "/lib"
++#define SLIBDIR64 "/lib64"
+ # define N_(msgid)  msgid
+ #define _(msg) msg
+ 
+@@ -1373,6 +1375,9 @@ main (int argc, char **argv)
+       add_system_dir (SLIBDIR);
+       if (strcmp (SLIBDIR, LIBDIR))
+ 	add_system_dir (LIBDIR);
++      add_system_dir (SLIBDIR64);
++      if (strcmp (SLIBDIR64, LIBDIR64))
++	add_system_dir (LIBDIR64);
+     }
+ 
+   const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb +3 -1
index d7bc444..69748a4 100644
@@ -10,7 +10,9 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
            file://32and64bit.patch \
            file://endian-ness_handling.patch \
            file://flag_fix.patch \
-           file://endianess-header.patch"
+           file://endianess-header.patch \
+           file://ldconfig-default-to-both-lib-and-lib64.patch \
+"
 
 PR = "r2"
 
Signature · 1 line
1.8.4.1
#1 lore raw
Quoted 2 lines · Ming Liu

make ldconfig default to both /lib+/usr/lib and /lib64+/usr/lib64 on bi-ABI architectures.

There is also lib32 and usr/lib32 version when you have mips. So this is half solution if you want to solve mutlilib

Quoted 69 lines
---
 .../ldconfig-default-to-both-lib-and-lib64.patch   | 32 ++++++++++++++++++++++
 meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb |  4 ++-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-both-lib-and-lib64.patch
meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-both-lib-and-lib64.patch new file +32 -0
new file mode 100644
index 0000000..230502e
@@ -0,0 +1,32 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+make ldconfig default to both /lib+/usr/lib and /lib64+/usr/lib64
+on bi-ABI architectures.
+
+---
+ ldconfig.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff -urpN a/ldconfig.c b/ldconfig.c
+--- a/ldconfig.c
++++ b/ldconfig.c
+@@ -52,7 +52,9 @@
+
+ #define SYSCONFDIR "/etc"
+ #define LIBDIR "/usr/lib"
++#define LIBDIR64 "/usr/lib64"
+ #define SLIBDIR "/lib"
++#define SLIBDIR64 "/lib64"
+ # define N_(msgid)  msgid
+ #define _(msg) msg
+
+@@ -1373,6 +1375,9 @@ main (int argc, char **argv)
+       add_system_dir (SLIBDIR);
+       if (strcmp (SLIBDIR, LIBDIR))
+       add_system_dir (LIBDIR);
++      add_system_dir (SLIBDIR64);
++      if (strcmp (SLIBDIR64, LIBDIR64))
++      add_system_dir (LIBDIR64);
+     }
+
+   const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb +3 -2
index d7bc444..69748a4 100644
@@ -10,7 +10,9 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
            file://32and64bit.patch \
            file://endian-ness_handling.patch \
            file://flag_fix.patch \
-           file://endianess-header.patch"
+           file://endianess-header.patch \
+           file://ldconfig-default-to-both-lib-and-lib64.patch \
+"
 
 PR = "r2"
 
--

1.8.4.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#2 lore raw
Quoted 5 lines · Khem Raj
Quoted 2 lines · Ming Liu

make ldconfig default to both /lib+/usr/lib and /lib64+/usr/lib64 on bi-ABI architectures.

There is also lib32 and usr/lib32 version when you have mips. So this is half solution if you want to solve mutlilib

Thanks for the reminder, you are correct, it's not complete, I will send a V2.

//Ming Liu

Quoted 70 lines
Quoted 69 lines
---
  .../ldconfig-default-to-both-lib-and-lib64.patch   | 32 ++++++++++++++++++++++
  meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb |  4 ++-
  2 files changed, 35 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-both-lib-and-lib64.patch

meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-both-lib-and-lib64.patch new file +32 -0
new file mode 100644
index 0000000..230502e
@@ -0,0 +1,32 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+make ldconfig default to both /lib+/usr/lib and /lib64+/usr/lib64
+on bi-ABI architectures.
+
+---
+ ldconfig.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff -urpN a/ldconfig.c b/ldconfig.c
+--- a/ldconfig.c
++++ b/ldconfig.c
+@@ -52,7 +52,9 @@
+
+ #define SYSCONFDIR "/etc"
+ #define LIBDIR "/usr/lib"
++#define LIBDIR64 "/usr/lib64"
+ #define SLIBDIR "/lib"
++#define SLIBDIR64 "/lib64"
+ # define N_(msgid)  msgid
+ #define _(msg) msg
+
+@@ -1373,6 +1375,9 @@ main (int argc, char **argv)
+       add_system_dir (SLIBDIR);
+       if (strcmp (SLIBDIR, LIBDIR))
+       add_system_dir (LIBDIR);
++      add_system_dir (SLIBDIR64);
++      if (strcmp (SLIBDIR64, LIBDIR64))
++      add_system_dir (LIBDIR64);
+     }
+
+   const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb +3 -2
index d7bc444..69748a4 100644
@@ -10,7 +10,9 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
             file://32and64bit.patch \
             file://endian-ness_handling.patch \
             file://flag_fix.patch \
-           file://endianess-header.patch"
+           file://endianess-header.patch \
+           file://ldconfig-default-to-both-lib-and-lib64.patch \
+"
 
  PR = "r2"
 
--

1.8.4.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core