diff options
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch | 179 |
1 files changed, 170 insertions, 9 deletions
diff --git a/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch b/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch index 3958e9c212..b1054fa749 100644 --- a/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch +++ b/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 35c084a051bcd6587ebc73e4acb045cb2bdf7e99 Mon Sep 17 00:00:00 2001 | 1 | From 354682ad8f71f62643dcd83f64b51b5979615a0c Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 7 Dec 2015 23:39:54 +0000 | 3 | Date: Mon, 7 Dec 2015 23:39:54 +0000 |
| 4 | Subject: [PATCH] handle sysroot support for nativesdk-gcc | 4 | Subject: [PATCH] handle sysroot support for nativesdk-gcc |
| @@ -23,6 +23,9 @@ b) Add other paths which need relocation into a .gccrelocprefix section | |||
| 23 | Upstream-Status: Inappropriate | 23 | Upstream-Status: Inappropriate |
| 24 | RP 2015/7/28 | 24 | RP 2015/7/28 |
| 25 | 25 | ||
| 26 | Extend the gccrelocprefix support to musl config too, this ensures | ||
| 27 | that gcc will get right bits in SDK installations | ||
| 28 | |||
| 26 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 29 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 27 | 30 | ||
| 28 | Added PREFIXVAR and EXEC_PREFIXVAR to support runtime relocation. Without | 31 | Added PREFIXVAR and EXEC_PREFIXVAR to support runtime relocation. Without |
| @@ -32,16 +35,18 @@ implementation.) | |||
| 32 | 35 | ||
| 33 | Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> | 36 | Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> |
| 34 | --- | 37 | --- |
| 35 | gcc/c-family/c-opts.c | 4 +-- | 38 | gcc/c-family/c-opts.c | 4 +-- |
| 36 | gcc/cppdefault.c | 63 ++++++++++++++++++++++++++----------------- | 39 | gcc/config/linux.h | 24 +++++++-------- |
| 37 | gcc/cppdefault.h | 13 ++++----- | 40 | gcc/config/rs6000/sysv4.h | 24 +++++++-------- |
| 38 | gcc/gcc.c | 20 +++++++++----- | 41 | gcc/cppdefault.c | 63 ++++++++++++++++++++++++--------------- |
| 39 | gcc/incpath.c | 12 ++++----- | 42 | gcc/cppdefault.h | 13 ++++---- |
| 40 | gcc/prefix.c | 6 +++-- | 43 | gcc/gcc.c | 20 +++++++++---- |
| 41 | 6 files changed, 70 insertions(+), 48 deletions(-) | 44 | gcc/incpath.c | 12 ++++---- |
| 45 | gcc/prefix.c | 6 ++-- | ||
| 46 | 8 files changed, 94 insertions(+), 72 deletions(-) | ||
| 42 | 47 | ||
| 43 | diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c | 48 | diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c |
| 44 | index bd15b9cd902..2bd667e3f58 100644 | 49 | index 89e05a4c551..5577383665d 100644 |
| 45 | --- a/gcc/c-family/c-opts.c | 50 | --- a/gcc/c-family/c-opts.c |
| 46 | +++ b/gcc/c-family/c-opts.c | 51 | +++ b/gcc/c-family/c-opts.c |
| 47 | @@ -1436,8 +1436,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain) | 52 | @@ -1436,8 +1436,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain) |
| @@ -55,6 +60,162 @@ index bd15b9cd902..2bd667e3f58 100644 | |||
| 55 | 60 | ||
| 56 | path = (char *) xmalloc (prefix_len + suffix_len + 1); | 61 | path = (char *) xmalloc (prefix_len + suffix_len + 1); |
| 57 | memcpy (path, prefix, prefix_len); | 62 | memcpy (path, prefix, prefix_len); |
| 63 | diff --git a/gcc/config/linux.h b/gcc/config/linux.h | ||
| 64 | index b525bcd56b3..ba02c013e30 100644 | ||
| 65 | --- a/gcc/config/linux.h | ||
| 66 | +++ b/gcc/config/linux.h | ||
| 67 | @@ -129,53 +129,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
| 68 | * Unfortunately, this is mostly duplicated from cppdefault.c */ | ||
| 69 | #if DEFAULT_LIBC == LIBC_MUSL | ||
| 70 | #define INCLUDE_DEFAULTS_MUSL_GPP \ | ||
| 71 | - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ | ||
| 72 | + { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
| 73 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ | ||
| 74 | - { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ | ||
| 75 | + { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
| 76 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ | ||
| 77 | - { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ | ||
| 78 | + { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
| 79 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, | ||
| 80 | |||
| 81 | #ifdef LOCAL_INCLUDE_DIR | ||
| 82 | #define INCLUDE_DEFAULTS_MUSL_LOCAL \ | ||
| 83 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ | ||
| 84 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, | ||
| 85 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, \ | ||
| 86 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, | ||
| 87 | #else | ||
| 88 | #define INCLUDE_DEFAULTS_MUSL_LOCAL | ||
| 89 | #endif | ||
| 90 | |||
| 91 | #ifdef PREFIX_INCLUDE_DIR | ||
| 92 | #define INCLUDE_DEFAULTS_MUSL_PREFIX \ | ||
| 93 | - { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, | ||
| 94 | + { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0}, | ||
| 95 | #else | ||
| 96 | #define INCLUDE_DEFAULTS_MUSL_PREFIX | ||
| 97 | #endif | ||
| 98 | |||
| 99 | #ifdef CROSS_INCLUDE_DIR | ||
| 100 | #define INCLUDE_DEFAULTS_MUSL_CROSS \ | ||
| 101 | - { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, | ||
| 102 | + { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0}, | ||
| 103 | #else | ||
| 104 | #define INCLUDE_DEFAULTS_MUSL_CROSS | ||
| 105 | #endif | ||
| 106 | |||
| 107 | #ifdef TOOL_INCLUDE_DIR | ||
| 108 | #define INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
| 109 | - { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, | ||
| 110 | + { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0}, | ||
| 111 | #else | ||
| 112 | #define INCLUDE_DEFAULTS_MUSL_TOOL | ||
| 113 | #endif | ||
| 114 | |||
| 115 | #ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
| 116 | #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
| 117 | - { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0}, | ||
| 118 | + { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0}, | ||
| 119 | #else | ||
| 120 | #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET | ||
| 121 | #endif | ||
| 122 | |||
| 123 | #ifdef NATIVE_SYSTEM_HEADER_DIR | ||
| 124 | #define INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
| 125 | - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ | ||
| 126 | - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, | ||
| 127 | + { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 2 }, \ | ||
| 128 | + { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 0 }, | ||
| 129 | #else | ||
| 130 | #define INCLUDE_DEFAULTS_MUSL_NATIVE | ||
| 131 | #endif | ||
| 132 | @@ -200,7 +200,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
| 133 | INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
| 134 | INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
| 135 | INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
| 136 | - { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ | ||
| 137 | + { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \ | ||
| 138 | { 0, 0, 0, 0, 0, 0 } \ | ||
| 139 | } | ||
| 140 | #endif | ||
| 141 | diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h | ||
| 142 | index 0c2bba5ea32..313a8de4417 100644 | ||
| 143 | --- a/gcc/config/rs6000/sysv4.h | ||
| 144 | +++ b/gcc/config/rs6000/sysv4.h | ||
| 145 | @@ -959,53 +959,53 @@ ncrtn.o%s" | ||
| 146 | /* Include order changes for musl, same as in generic linux.h. */ | ||
| 147 | #if DEFAULT_LIBC == LIBC_MUSL | ||
| 148 | #define INCLUDE_DEFAULTS_MUSL_GPP \ | ||
| 149 | - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ | ||
| 150 | + { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
| 151 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ | ||
| 152 | - { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ | ||
| 153 | + { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
| 154 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ | ||
| 155 | - { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ | ||
| 156 | + { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
| 157 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, | ||
| 158 | |||
| 159 | #ifdef LOCAL_INCLUDE_DIR | ||
| 160 | #define INCLUDE_DEFAULTS_MUSL_LOCAL \ | ||
| 161 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ | ||
| 162 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, | ||
| 163 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, \ | ||
| 164 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, | ||
| 165 | #else | ||
| 166 | #define INCLUDE_DEFAULTS_MUSL_LOCAL | ||
| 167 | #endif | ||
| 168 | |||
| 169 | #ifdef PREFIX_INCLUDE_DIR | ||
| 170 | #define INCLUDE_DEFAULTS_MUSL_PREFIX \ | ||
| 171 | - { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, | ||
| 172 | + { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0}, | ||
| 173 | #else | ||
| 174 | #define INCLUDE_DEFAULTS_MUSL_PREFIX | ||
| 175 | #endif | ||
| 176 | |||
| 177 | #ifdef CROSS_INCLUDE_DIR | ||
| 178 | #define INCLUDE_DEFAULTS_MUSL_CROSS \ | ||
| 179 | - { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, | ||
| 180 | + { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0}, | ||
| 181 | #else | ||
| 182 | #define INCLUDE_DEFAULTS_MUSL_CROSS | ||
| 183 | #endif | ||
| 184 | |||
| 185 | #ifdef TOOL_INCLUDE_DIR | ||
| 186 | #define INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
| 187 | - { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, | ||
| 188 | + { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0}, | ||
| 189 | #else | ||
| 190 | #define INCLUDE_DEFAULTS_MUSL_TOOL | ||
| 191 | #endif | ||
| 192 | |||
| 193 | #ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
| 194 | #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
| 195 | - { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0}, | ||
| 196 | + { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0}, | ||
| 197 | #else | ||
| 198 | #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET | ||
| 199 | #endif | ||
| 200 | |||
| 201 | #ifdef NATIVE_SYSTEM_HEADER_DIR | ||
| 202 | #define INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
| 203 | - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ | ||
| 204 | - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, | ||
| 205 | + { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 2 }, \ | ||
| 206 | + { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 0 }, | ||
| 207 | #else | ||
| 208 | #define INCLUDE_DEFAULTS_MUSL_NATIVE | ||
| 209 | #endif | ||
| 210 | @@ -1030,7 +1030,7 @@ ncrtn.o%s" | ||
| 211 | INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
| 212 | INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
| 213 | INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
| 214 | - { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ | ||
| 215 | + { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \ | ||
| 216 | { 0, 0, 0, 0, 0, 0 } \ | ||
| 217 | } | ||
| 218 | #endif | ||
| 58 | diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c | 219 | diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c |
| 59 | index d54d6ce0076..784a92a0c24 100644 | 220 | index d54d6ce0076..784a92a0c24 100644 |
| 60 | --- a/gcc/cppdefault.c | 221 | --- a/gcc/cppdefault.c |
