summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-configure-common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-configure-common.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 9f5ba335c0..869d1b6d60 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -64,11 +64,15 @@ SYSTEMLIBS1 = "${target_libdir}/"
64do_configure_prepend () { 64do_configure_prepend () {
65 # Change the default dynamic linker path, only useful for SDK, other's value 65 # Change the default dynamic linker path, only useful for SDK, other's value
66 # are not changed according to the SYSTEMLIBS_DIR 66 # are not changed according to the SYSTEMLIBS_DIR
67 #
68 # We want something like the following:
69 # #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
70 # becomes
71 # #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
72 #
67 sed -i ${S}/gcc/config/*/linux*.h -e \ 73 sed -i ${S}/gcc/config/*/linux*.h -e \
68 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#' 74 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\) \( *"/lib.*\)/\(.*\)#\1 SYSTEMLIBS_DIR "\3#'
69 75
70 SYSTEMLIBS_DIR=`dirname ${SYSTEMLIBS}`
71 [ "$SYSTEMLIBS_DIR" = "/" ] && SYSTEMLIBS_DIR=""
72 # teach gcc to find correct target includedir when checking libc ssp support 76 # teach gcc to find correct target includedir when checking libc ssp support
73 mkdir -p ${B}/gcc 77 mkdir -p ${B}/gcc
74 echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe 78 echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe
@@ -83,7 +87,7 @@ do_configure_prepend () {
83#ifndef STANDARD_STARTFILE_PREFIX_2 87#ifndef STANDARD_STARTFILE_PREFIX_2
84#define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}" 88#define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
85#endif 89#endif
86#define SYSTEMLIBS_DIR "$SYSTEMLIBS_DIR" 90#define SYSTEMLIBS_DIR "${SYSTEMLIBS}"
87#endif /* ! GCC_DEFAULTS_H */ 91#endif /* ! GCC_DEFAULTS_H */
88_EOF 92_EOF
89 mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h 93 mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h