Packages use 'aarch64-poky-linux-gcc -print-multi-os-directory' to get the value of install directory. The value is set by MULTILIB_OSDIRNAMES and default is '/lib64'. Add the dynamic linker ld-linux-aarch64.so.1 from package eglibc is installed to /lib64.
But the default dynamic linker defined in gcc/config/aarch64/aarch64-linux.h is: Then cause all the ELF files fail to launch because fail to find the linker. Signed-off-by: Kai Kang <[email protected]> --- meta/recipes-devtools/gcc/gcc-4.9.inc | 1 + ...0056-gcc-redefine-library-dir-for-aarch64.patch | 29 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-4.9/0056-gcc-redefine-library-dir-for-aarch64.patch diff --git a/meta/recipes-devtools/gcc/gcc-4.9.inc b/meta/recipes-devtools/gcc/gcc-4.9.inc index 25778bd..b747703 100644 --- a/meta/recipes-devtools/gcc/gcc-4.9.inc +++ b/meta/recipes-devtools/gcc/gcc-4.9.inc @@ -70,6 +70,7 @@ SRC_URI = "\ file://0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch \ file://0054-gcc-Makefile.in-fix-parallel-building-failure.patch \ file://0055-PR-rtl-optimization-61801.patch \ + file://0056-gcc-redefine-library-dir-for-aarch64.patch \ " SRC_URI[md5sum] = "fddf71348546af523353bd43d34919c1" SRC_URI[sha256sum] = "d334781a124ada6f38e63b545e2a3b8c2183049515a1abab6d513f109f1d717e" diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0056-gcc-redefine-library-dir-for-aarch64.patch b/meta/recipes-devtools/gcc/gcc-4.9/0056-gcc-redefine-library-dir-for-aarch64.patch new file mode 100644 index 0000000..23cdb95 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.9/0056-gcc-redefine-library-dir-for-aarch64.patch @@ -0,0 +1,29 @@ +Redefine default library directory for aarch64. + +Packages use 'aarch64-poky-linux-gcc -print-multi-os-directory' to get the +value of install directory. The value is set by MULTILIB_OSDIRNAMES and default +is '/lib64'. Add the dynamic linker ld-linux-aarch64.so.1 from package eglibc +is installed to /lib64. + +But the default dynamic linker defined in gcc/config/aarch64/aarch64-linux.h +is: + +#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" + +Then cause all the ELF files fail to launch because fail to find the linker. + +Upstream-Status: Pending + +Signed-off-by: Kai Kang <[email protected]> +--- +--- gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux.orig 2014-09-19 14:38:47.550669143 +0800 ++++ gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux 2014-09-19 14:39:01.234669516 +0800 +@@ -22,7 +22,7 @@ + LIB1ASMFUNCS = _aarch64_sync_cache_range + + AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) +-MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) ++MULTILIB_OSDIRNAMES = .=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) + MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) + + # Disable the multilib for linux-gnu targets for the time being; focus -- 1.9.1 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
