mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
gcc: Fix preprocessor redefines for header pathes
When building for powerpc64 using musl as C library we get preprocessor macro redefinition errors since gcc-configure-common.inc adds #define of STANDARD_STARTFILE_PREFIX_1 and STANDARD_STARTFILE_PREFIX_2 to gcc/defaults.h after ones added by a patch that ensures target gcc headers included. Since gcc-configure-common.inc included in every gcc recipe either directly or indirectly, do_configure task is not disabled/deleted for any of them (except gcc-source.inc) and there is no precondition that skips gcc/defaults.h patching in gcc-configure-common.inc::do_configure_prepend() we can just remove conflicting parts of mentioned above patch to have single place where start files prefixes defined in do_configure() task. (From OE-Core rev: 0622a4168aac627b44547f72fe93589cf1050e42) Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
9d2ea1ea50
commit
e0aabf1442
-36
@@ -57,42 +57,6 @@ index 10b96eca0a7..c8da0884872 100644
|
||||
#ifdef LOCAL_INCLUDE_DIR
|
||||
/* /usr/local/include comes before the fixincluded header files. */
|
||||
{ LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
|
||||
diff --git a/gcc/defaults.h b/gcc/defaults.h
|
||||
index 7ad92d920f8..39848cc9c0e 100644
|
||||
--- a/gcc/defaults.h
|
||||
+++ b/gcc/defaults.h
|
||||
@@ -1475,4 +1475,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
|
||||
#endif
|
||||
|
||||
+/* Default prefixes to attach to command names. */
|
||||
+
|
||||
+#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#endif
|
||||
+#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
+#endif
|
||||
+
|
||||
#endif /* ! GCC_DEFAULTS_H */
|
||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||
index c73d4023987..b27245dbf77 100644
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -1472,13 +1472,6 @@ static const char *gcc_libexec_prefix;
|
||||
|
||||
/* Default prefixes to attach to command names. */
|
||||
|
||||
-#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
-#endif
|
||||
-#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
-#endif
|
||||
-
|
||||
#ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
|
||||
#undef MD_EXEC_PREFIX
|
||||
#undef MD_STARTFILE_PREFIX
|
||||
--
|
||||
2.12.2
|
||||
|
||||
|
||||
-36
@@ -57,42 +57,6 @@ index b36a979d5ba..e2e187dedaf 100644
|
||||
#ifdef LOCAL_INCLUDE_DIR
|
||||
/* /usr/local/include comes before the fixincluded header files. */
|
||||
{ LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
|
||||
diff --git a/gcc/defaults.h b/gcc/defaults.h
|
||||
index 78a08a33f12..c8851277674 100644
|
||||
--- a/gcc/defaults.h
|
||||
+++ b/gcc/defaults.h
|
||||
@@ -1451,4 +1451,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
|
||||
#endif
|
||||
|
||||
+/* Default prefixes to attach to command names. */
|
||||
+
|
||||
+#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#endif
|
||||
+#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
+#endif
|
||||
+
|
||||
#endif /* ! GCC_DEFAULTS_H */
|
||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||
index 570cdc00034..3fb64d453f1 100644
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -1464,13 +1464,6 @@ static const char *gcc_libexec_prefix;
|
||||
|
||||
/* Default prefixes to attach to command names. */
|
||||
|
||||
-#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
-#endif
|
||||
-#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
-#endif
|
||||
-
|
||||
#ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
|
||||
#undef MD_EXEC_PREFIX
|
||||
#undef MD_STARTFILE_PREFIX
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user