diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch b/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch index 3b54719536..e05fd4e6a2 100644 --- a/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch +++ b/meta/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4fbbd40d7db89cdbeaf93df1e1da692b1f80a5bc Mon Sep 17 00:00:00 2001 | 1 | From 4f9c952ad5fa68260d6a40570b0fdb7359c85057 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 |
@@ -38,15 +38,15 @@ Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> | |||
38 | gcc/c-family/c-opts.cc | 4 +-- | 38 | gcc/c-family/c-opts.cc | 4 +-- |
39 | gcc/config/linux.h | 24 +++++++-------- | 39 | gcc/config/linux.h | 24 +++++++-------- |
40 | gcc/config/rs6000/sysv4.h | 24 +++++++-------- | 40 | gcc/config/rs6000/sysv4.h | 24 +++++++-------- |
41 | gcc/cppdefault.cc | 63 ++++++++++++++++++++++++--------------- | 41 | gcc/cppdefault.cc | 65 ++++++++++++++++++++++++--------------- |
42 | gcc/cppdefault.h | 13 ++++---- | 42 | gcc/cppdefault.h | 13 +++----- |
43 | gcc/gcc.cc | 20 +++++++++---- | 43 | gcc/gcc.cc | 20 ++++++++---- |
44 | gcc/incpath.cc | 12 ++++---- | 44 | gcc/incpath.cc | 12 ++++---- |
45 | gcc/prefix.cc | 6 ++-- | 45 | gcc/prefix.cc | 6 ++-- |
46 | 8 files changed, 94 insertions(+), 72 deletions(-) | 46 | 8 files changed, 95 insertions(+), 73 deletions(-) |
47 | 47 | ||
48 | diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc | 48 | diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc |
49 | index a341a061758..83b0bef4dbb 100644 | 49 | index c68a2a27469..77e9b5eceaa 100644 |
50 | --- a/gcc/c-family/c-opts.cc | 50 | --- a/gcc/c-family/c-opts.cc |
51 | +++ b/gcc/c-family/c-opts.cc | 51 | +++ b/gcc/c-family/c-opts.cc |
52 | @@ -1458,8 +1458,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain) | 52 | @@ -1458,8 +1458,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain) |
@@ -61,10 +61,10 @@ index a341a061758..83b0bef4dbb 100644 | |||
61 | path = (char *) xmalloc (prefix_len + suffix_len + 1); | 61 | path = (char *) xmalloc (prefix_len + suffix_len + 1); |
62 | memcpy (path, prefix, prefix_len); | 62 | memcpy (path, prefix, prefix_len); |
63 | diff --git a/gcc/config/linux.h b/gcc/config/linux.h | 63 | diff --git a/gcc/config/linux.h b/gcc/config/linux.h |
64 | index 8a3cd4f2d34..58143dff731 100644 | 64 | index 57496ff1f2f..c921cf6ef63 100644 |
65 | --- a/gcc/config/linux.h | 65 | --- a/gcc/config/linux.h |
66 | +++ b/gcc/config/linux.h | 66 | +++ b/gcc/config/linux.h |
67 | @@ -134,53 +134,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | 67 | @@ -121,53 +121,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
68 | * Unfortunately, this is mostly duplicated from cppdefault.cc */ | 68 | * Unfortunately, this is mostly duplicated from cppdefault.cc */ |
69 | #if DEFAULT_LIBC == LIBC_MUSL | 69 | #if DEFAULT_LIBC == LIBC_MUSL |
70 | #define INCLUDE_DEFAULTS_MUSL_GPP \ | 70 | #define INCLUDE_DEFAULTS_MUSL_GPP \ |
@@ -129,7 +129,7 @@ index 8a3cd4f2d34..58143dff731 100644 | |||
129 | #else | 129 | #else |
130 | #define INCLUDE_DEFAULTS_MUSL_NATIVE | 130 | #define INCLUDE_DEFAULTS_MUSL_NATIVE |
131 | #endif | 131 | #endif |
132 | @@ -205,7 +205,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | 132 | @@ -192,7 +192,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
133 | INCLUDE_DEFAULTS_MUSL_TOOL \ | 133 | INCLUDE_DEFAULTS_MUSL_TOOL \ |
134 | INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | 134 | INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ |
135 | INCLUDE_DEFAULTS_MUSL_NATIVE \ | 135 | INCLUDE_DEFAULTS_MUSL_NATIVE \ |
@@ -139,10 +139,10 @@ index 8a3cd4f2d34..58143dff731 100644 | |||
139 | } | 139 | } |
140 | #endif | 140 | #endif |
141 | diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h | 141 | diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h |
142 | index e5dd6538358..b496849b792 100644 | 142 | index 3a443abcf6b..ef83a5a432e 100644 |
143 | --- a/gcc/config/rs6000/sysv4.h | 143 | --- a/gcc/config/rs6000/sysv4.h |
144 | +++ b/gcc/config/rs6000/sysv4.h | 144 | +++ b/gcc/config/rs6000/sysv4.h |
145 | @@ -958,53 +958,53 @@ ncrtn.o%s" | 145 | @@ -950,53 +950,53 @@ ncrtn.o%s" |
146 | /* Include order changes for musl, same as in generic linux.h. */ | 146 | /* Include order changes for musl, same as in generic linux.h. */ |
147 | #if DEFAULT_LIBC == LIBC_MUSL | 147 | #if DEFAULT_LIBC == LIBC_MUSL |
148 | #define INCLUDE_DEFAULTS_MUSL_GPP \ | 148 | #define INCLUDE_DEFAULTS_MUSL_GPP \ |
@@ -207,7 +207,7 @@ index e5dd6538358..b496849b792 100644 | |||
207 | #else | 207 | #else |
208 | #define INCLUDE_DEFAULTS_MUSL_NATIVE | 208 | #define INCLUDE_DEFAULTS_MUSL_NATIVE |
209 | #endif | 209 | #endif |
210 | @@ -1029,7 +1029,7 @@ ncrtn.o%s" | 210 | @@ -1021,7 +1021,7 @@ ncrtn.o%s" |
211 | INCLUDE_DEFAULTS_MUSL_TOOL \ | 211 | INCLUDE_DEFAULTS_MUSL_TOOL \ |
212 | INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | 212 | INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ |
213 | INCLUDE_DEFAULTS_MUSL_NATIVE \ | 213 | INCLUDE_DEFAULTS_MUSL_NATIVE \ |
@@ -217,7 +217,7 @@ index e5dd6538358..b496849b792 100644 | |||
217 | } | 217 | } |
218 | #endif | 218 | #endif |
219 | diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc | 219 | diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc |
220 | index 52cf14e92f8..d8977afc05e 100644 | 220 | index 734590a7059..b4a8fc29e4a 100644 |
221 | --- a/gcc/cppdefault.cc | 221 | --- a/gcc/cppdefault.cc |
222 | +++ b/gcc/cppdefault.cc | 222 | +++ b/gcc/cppdefault.cc |
223 | @@ -35,6 +35,30 @@ | 223 | @@ -35,6 +35,30 @@ |
@@ -272,7 +272,7 @@ index 52cf14e92f8..d8977afc05e 100644 | |||
272 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, | 272 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, |
273 | #endif | 273 | #endif |
274 | #ifdef GPLUSPLUS_LIBCXX_INCLUDE_DIR | 274 | #ifdef GPLUSPLUS_LIBCXX_INCLUDE_DIR |
275 | @@ -62,23 +86,23 @@ const struct default_include cpp_include_defaults[] | 275 | @@ -62,26 +86,26 @@ const struct default_include cpp_include_defaults[] |
276 | #endif | 276 | #endif |
277 | #ifdef GCC_INCLUDE_DIR | 277 | #ifdef GCC_INCLUDE_DIR |
278 | /* This is the dir for gcc's private headers. */ | 278 | /* This is the dir for gcc's private headers. */ |
@@ -297,12 +297,16 @@ index 52cf14e92f8..d8977afc05e 100644 | |||
297 | #endif | 297 | #endif |
298 | #ifdef FIXED_INCLUDE_DIR | 298 | #ifdef FIXED_INCLUDE_DIR |
299 | /* This is the dir for fixincludes. */ | 299 | /* This is the dir for fixincludes. */ |
300 | #ifndef SYSROOT_HEADERS_SUFFIX_SPEC | ||
301 | - { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, 2 }, | ||
302 | + { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 2 }, | ||
303 | #endif | ||
300 | - { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, | 304 | - { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, |
301 | + { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, | 305 | + { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, |
302 | /* A multilib suffix needs adding if different multilibs use | 306 | /* A multilib suffix needs adding if different multilibs use |
303 | different headers. */ | 307 | different headers. */ |
304 | #ifdef SYSROOT_HEADERS_SUFFIX_SPEC | 308 | #ifdef SYSROOT_HEADERS_SUFFIX_SPEC |
305 | @@ -90,33 +114,24 @@ const struct default_include cpp_include_defaults[] | 309 | @@ -93,33 +117,24 @@ const struct default_include cpp_include_defaults[] |
306 | #endif | 310 | #endif |
307 | #ifdef CROSS_INCLUDE_DIR | 311 | #ifdef CROSS_INCLUDE_DIR |
308 | /* One place the target system's headers might be. */ | 312 | /* One place the target system's headers might be. */ |
@@ -343,7 +347,7 @@ index 52cf14e92f8..d8977afc05e 100644 | |||
343 | /* This value is set by cpp_relocated at runtime */ | 347 | /* This value is set by cpp_relocated at runtime */ |
344 | const char *gcc_exec_prefix; | 348 | const char *gcc_exec_prefix; |
345 | diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h | 349 | diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h |
346 | index fb97c0b5814..6267150facc 100644 | 350 | index e26b424e99c..c9abb090dcd 100644 |
347 | --- a/gcc/cppdefault.h | 351 | --- a/gcc/cppdefault.h |
348 | +++ b/gcc/cppdefault.h | 352 | +++ b/gcc/cppdefault.h |
349 | @@ -33,7 +33,8 @@ | 353 | @@ -33,7 +33,8 @@ |
@@ -378,10 +382,10 @@ index fb97c0b5814..6267150facc 100644 | |||
378 | subdirectory of the actual installation. */ | 382 | subdirectory of the actual installation. */ |
379 | extern const char *gcc_exec_prefix; | 383 | extern const char *gcc_exec_prefix; |
380 | diff --git a/gcc/gcc.cc b/gcc/gcc.cc | 384 | diff --git a/gcc/gcc.cc b/gcc/gcc.cc |
381 | index aa4cf92fb78..5569a39a14a 100644 | 385 | index 8af0c814c33..605fe3b8c0d 100644 |
382 | --- a/gcc/gcc.cc | 386 | --- a/gcc/gcc.cc |
383 | +++ b/gcc/gcc.cc | 387 | +++ b/gcc/gcc.cc |
384 | @@ -252,6 +252,8 @@ FILE *report_times_to_file = NULL; | 388 | @@ -255,6 +255,8 @@ FILE *report_times_to_file = NULL; |
385 | #endif | 389 | #endif |
386 | static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT; | 390 | static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT; |
387 | 391 | ||
@@ -390,7 +394,7 @@ index aa4cf92fb78..5569a39a14a 100644 | |||
390 | /* Nonzero means pass the updated target_system_root to the compiler. */ | 394 | /* Nonzero means pass the updated target_system_root to the compiler. */ |
391 | 395 | ||
392 | static int target_system_root_changed; | 396 | static int target_system_root_changed; |
393 | @@ -575,6 +577,7 @@ or with constant text in a single argument. | 397 | @@ -578,6 +580,7 @@ or with constant text in a single argument. |
394 | %G process LIBGCC_SPEC as a spec. | 398 | %G process LIBGCC_SPEC as a spec. |
395 | %R Output the concatenation of target_system_root and | 399 | %R Output the concatenation of target_system_root and |
396 | target_sysroot_suffix. | 400 | target_sysroot_suffix. |
@@ -398,7 +402,7 @@ index aa4cf92fb78..5569a39a14a 100644 | |||
398 | %S process STARTFILE_SPEC as a spec. A capital S is actually used here. | 402 | %S process STARTFILE_SPEC as a spec. A capital S is actually used here. |
399 | %E process ENDFILE_SPEC as a spec. A capital E is actually used here. | 403 | %E process ENDFILE_SPEC as a spec. A capital E is actually used here. |
400 | %C process CPP_SPEC as a spec. | 404 | %C process CPP_SPEC as a spec. |
401 | @@ -1627,10 +1630,10 @@ static const char *gcc_libexec_prefix; | 405 | @@ -1619,10 +1622,10 @@ static const char *gcc_libexec_prefix; |
402 | gcc_exec_prefix is set because, in that case, we know where the | 406 | gcc_exec_prefix is set because, in that case, we know where the |
403 | compiler has been installed, and use paths relative to that | 407 | compiler has been installed, and use paths relative to that |
404 | location instead. */ | 408 | location instead. */ |
@@ -413,7 +417,7 @@ index aa4cf92fb78..5569a39a14a 100644 | |||
413 | 417 | ||
414 | /* For native compilers, these are well-known paths containing | 418 | /* For native compilers, these are well-known paths containing |
415 | components that may be provided by the system. For cross | 419 | components that may be provided by the system. For cross |
416 | @@ -1638,9 +1641,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; | 420 | @@ -1630,9 +1633,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; |
417 | static const char *md_exec_prefix = MD_EXEC_PREFIX; | 421 | static const char *md_exec_prefix = MD_EXEC_PREFIX; |
418 | static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; | 422 | static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; |
419 | static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; | 423 | static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; |
@@ -425,7 +429,7 @@ index aa4cf92fb78..5569a39a14a 100644 | |||
425 | = STANDARD_STARTFILE_PREFIX_2; | 429 | = STANDARD_STARTFILE_PREFIX_2; |
426 | 430 | ||
427 | /* A relative path to be used in finding the location of tools | 431 | /* A relative path to be used in finding the location of tools |
428 | @@ -6676,6 +6679,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) | 432 | @@ -6652,6 +6655,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) |
429 | } | 433 | } |
430 | break; | 434 | break; |
431 | 435 | ||
@@ -438,7 +442,7 @@ index aa4cf92fb78..5569a39a14a 100644 | |||
438 | value = do_spec_1 (startfile_spec, 0, NULL); | 442 | value = do_spec_1 (startfile_spec, 0, NULL); |
439 | if (value != 0) | 443 | if (value != 0) |
440 | diff --git a/gcc/incpath.cc b/gcc/incpath.cc | 444 | diff --git a/gcc/incpath.cc b/gcc/incpath.cc |
441 | index c80f100f476..5ac03c08693 100644 | 445 | index 46c0d543205..d088dae7b04 100644 |
442 | --- a/gcc/incpath.cc | 446 | --- a/gcc/incpath.cc |
443 | +++ b/gcc/incpath.cc | 447 | +++ b/gcc/incpath.cc |
444 | @@ -135,7 +135,7 @@ add_standard_paths (const char *sysroot, const char *iprefix, | 448 | @@ -135,7 +135,7 @@ add_standard_paths (const char *sysroot, const char *iprefix, |
@@ -485,10 +489,10 @@ index c80f100f476..5ac03c08693 100644 | |||
485 | str = update_path (ostr, p->component); | 489 | str = update_path (ostr, p->component); |
486 | free (ostr); | 490 | free (ostr); |
487 | diff --git a/gcc/prefix.cc b/gcc/prefix.cc | 491 | diff --git a/gcc/prefix.cc b/gcc/prefix.cc |
488 | index 096ed5afa3d..2526f0ecc39 100644 | 492 | index c2a37bde5ea..33944701ced 100644 |
489 | --- a/gcc/prefix.cc | 493 | --- a/gcc/prefix.cc |
490 | +++ b/gcc/prefix.cc | 494 | +++ b/gcc/prefix.cc |
491 | @@ -72,7 +72,9 @@ License along with GCC; see the file COPYING3. If not see | 495 | @@ -73,7 +73,9 @@ License along with GCC; see the file COPYING3. If not see |
492 | #include "prefix.h" | 496 | #include "prefix.h" |
493 | #include "common/common-target.h" | 497 | #include "common/common-target.h" |
494 | 498 | ||
@@ -499,7 +503,7 @@ index 096ed5afa3d..2526f0ecc39 100644 | |||
499 | 503 | ||
500 | static const char *get_key_value (char *); | 504 | static const char *get_key_value (char *); |
501 | static char *translate_name (char *); | 505 | static char *translate_name (char *); |
502 | @@ -212,7 +214,7 @@ translate_name (char *name) | 506 | @@ -213,7 +215,7 @@ translate_name (char *name) |
503 | prefix = getenv (key); | 507 | prefix = getenv (key); |
504 | 508 | ||
505 | if (prefix == 0) | 509 | if (prefix == 0) |