diff options
Diffstat (limited to 'meta/recipes-core/glibc/ldconfig-native-2.12.1')
4 files changed, 119 insertions, 8 deletions
diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch index a9af110623..f4e38d4256 100644 --- a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch @@ -64,7 +64,7 @@ index 0bf0de3..6e87afc 100644 #undef check_ptr #define check_ptr(ptr) \ do \ -@@ -290,6 +295,35 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, +@@ -290,6 +295,48 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, libc5/libc6. */ *flag = FLAG_ELF; @@ -73,23 +73,36 @@ index 0bf0de3..6e87afc 100644 + switch (elf_header->e_machine) + { + case EM_IA_64: -+ *flag |= FLAG_IA64_LIB64; ++ /* Intel 64bit libraries are always libc.so.6+. */ ++ /* see sysdeps/unix/sysv/linux/ia64/readelflib.c */ ++ *flag |= FLAG_IA64_LIB64|FLAG_ELF_LIBC6; + break; + case EM_X86_64: -+ *flag |= FLAG_X8664_LIB64; ++ /* X86-64 64bit libraries are always libc.so.6+. */ ++ /* see sysdeps/unix/sysv/linux/i386/readelflib.c */ ++ *flag |= FLAG_X8664_LIB64|FLAG_ELF_LIBC6; + break; + case EM_S390: -+ *flag |= FLAG_S390_LIB64; ++ /* S/390 64bit libraries are always libc.so.6+. */ ++ /* see sysdeps/unix/sysv/linux/s390/readelflib.c */ ++ *flag |= FLAG_S390_LIB64|FLAG_ELF_LIBC6; + break; + case EM_PPC64: -+ *flag |= FLAG_POWERPC_LIB64; ++ /* PowerPC 64bit libraries are always libc.so.6+. */ ++ /* see sysdeps/unix/sysv/linux/powerpc/readelflib.c */ ++ *flag |= FLAG_POWERPC_LIB64|FLAG_ELF_LIBC6; + break; + case EM_MIPS: + case EM_MIPS_RS3_LE: -+ *flag |= FLAG_MIPS64_LIBN64; ++ /* n64 libraries are always libc.so.6+. */ ++ /* NOTE: This does not correctly distinguish NAN2008 binaries and is possibly broken */ ++ /* see sysdeps/unix/sysv/linux/mips/readelflib.c */ ++ *flag |= FLAG_MIPS64_LIBN64|FLAG_ELF_LIBC6; + break; + case EM_AARCH64: -+ *flag |= FLAG_AARCH64_LIB64; ++ /* AArch64 libraries are always libc.so.6+. */ ++ /* see sysdeps/unix/sysv/linux/arm/readelflib.c */ ++ *flag |= FLAG_AARCH64_LIB64|FLAG_ELF_LIBC6; + break; + default: + error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n", diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-riscv-support.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-riscv-support.patch new file mode 100644 index 0000000000..fc41aee264 --- /dev/null +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-riscv-support.patch @@ -0,0 +1,79 @@ +From fd50228cc213d2d87f5e3cf1f123acb3fda9b04e Mon Sep 17 00:00:00 2001 +From: Christoph Muellner <cmuellner@linux.com> +Date: Mon, 28 Jun 2021 00:34:12 +0200 +Subject: [PATCH] ldconfig: Add RISC-V support + +ldconfig-native does not support RISC-V at the moment. +Let's pull the reqired constants from upstream and add +the required parsing code. + +Upstream-Status: Backport + +Signed-off-by: Christoph Muellner <cmuellner@linux.com> +--- + cache.c | 6 ++++++ + ldconfig.h | 2 ++ + readelflib.c | 10 ++++++++++ + 3 files changed, 18 insertions(+) + +diff --git a/cache.c b/cache.c +index c4f5411..a3b9e70 100644 +--- a/cache.c ++++ b/cache.c +@@ -125,6 +125,12 @@ print_entry (const char *lib, int flag, unsigned int osversion, + case FLAG_AARCH64_LIB64: + fputs (",AArch64", stdout); + break; ++ case FLAG_RISCV_FLOAT_ABI_SOFT: ++ fputs (",soft-float", stdout); ++ break; ++ case FLAG_RISCV_FLOAT_ABI_DOUBLE: ++ fputs (",double-float", stdout); ++ break; + case 0: + break; + default: +diff --git a/ldconfig.h b/ldconfig.h +index 6a8a750..2e5e379 100644 +--- a/ldconfig.h ++++ b/ldconfig.h +@@ -38,6 +38,8 @@ + #define FLAG_ARM_LIBHF 0x0900 + #define FLAG_AARCH64_LIB64 0x0a00 + #define FLAG_ARM_LIBSF 0x0b00 ++#define FLAG_RISCV_FLOAT_ABI_SOFT 0x0f00 ++#define FLAG_RISCV_FLOAT_ABI_DOUBLE 0x1000 + + /* Name of auxiliary cache. */ + #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache" +diff --git a/readelflib.c b/readelflib.c +index 9ec0a54..a01e1ce 100644 +--- a/readelflib.c ++++ b/readelflib.c +@@ -33,6 +33,10 @@ + #define EM_AARCH64 183 /* ARM AARCH64 */ + #endif + ++#ifndef EM_RISCV ++#define EM_RISCV 243 /* RISC-V */ ++#endif ++ + #undef check_ptr + #define check_ptr(ptr) \ + do \ +@@ -331,6 +335,12 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, + /* see sysdeps/unix/sysv/linux/arm/readelflib.c */ + *flag |= FLAG_AARCH64_LIB64|FLAG_ELF_LIBC6; + break; ++ case EM_RISCV: ++ /* RISC-V libraries are always libc.so.6+. */ ++ /* NOTE: This does not correctly handle soft-float binaries */ ++ /* see sysdeps/unix/sysv/linux/riscv/readelflib.c */ ++ *flag |= FLAG_RISCV_FLOAT_ABI_DOUBLE|FLAG_ELF_LIBC6; ++ break; + default: + error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n", + file_name, (long)elf_header->e_machine); +-- +2.25.1 + diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch index 52986e61c7..d1835c7a10 100644 --- a/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch @@ -400,7 +400,7 @@ Index: ldconfig-native-2.12.1/ldconfig.c return 0; } -+#define REPORT_BUGS_TO "mailing list : poky@yoctoproject.org" ++#define REPORT_BUGS_TO "mailing list : poky@lists.yoctoproject.org" /* Print bug-reporting information in the help message. */ static char * more_help (int key, const char *text, void *input) diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/no-aux-cache.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/no-aux-cache.patch new file mode 100644 index 0000000000..c6765ba00d --- /dev/null +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/no-aux-cache.patch @@ -0,0 +1,19 @@ +The ldconfig auxiliary cache is a dictionary where the keys include inode, so +there is no point in writing these files on the build host. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/ldconfig.c b/ldconfig.c +index 2c4eb57..2d6dc92 100644 +--- a/ldconfig.c ++++ b/ldconfig.c +@@ -1399,8 +1399,6 @@ main (int argc, char **argv) + if (opt_build_cache) + { + save_cache (cache_file); +- if (aux_cache_file) +- save_aux_cache (aux_cache_file); + } + + return 0; |