commit: 3c8762a46f4ae91d8e5bb71018b244b2f430b7f1
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 2 23:31:23 2018 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Sep 2 23:31:23 2018 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3c8762a4
2.95.3: fix stage1 bulding against modern toolchain
3 new patches:
- 44_all_gcc-texi.patch: fix buuild failure against makeinfo-6.3
- 45_all_libexec-gcc-as.patch: lookup as in /usr/libexec/gcc/<TARGET>
- 46_all_libexec-gcc-binutils.patch: add /usr/libexec/gcc/<TARGET> to search
path
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
2.95.3/gentoo/44_all_gcc-texi.patch | 14 ++++++
2.95.3/gentoo/45_all_libexec-gcc-as.patch | 26 +++++++++++
2.95.3/gentoo/46_all_libexec-gcc-binutils.patch | 61 +++++++++++++++++++++++++
3 files changed, 101 insertions(+)
diff --git a/2.95.3/gentoo/44_all_gcc-texi.patch
b/2.95.3/gentoo/44_all_gcc-texi.patch
new file mode 100644
index 0000000..a4b7044
--- /dev/null
+++ b/2.95.3/gentoo/44_all_gcc-texi.patch
@@ -0,0 +1,14 @@
+makeinfo-6.3 allows @itemx only after @item and fails the build as:
+ gcc-2.95.3/gcc/install.texi:1607: @itemx must follow @item
+
+--- a/gcc/install.texi
++++ b/gcc/install.texi
+@@ -1604,7 +1604,7 @@ linker that are fixed by using the GNU versions of these
tools.
+ Embedded PowerPC system in little endian mode for use in running under
+ the PSIM simulator.
+
+-@itemx powerpcle-*-eabi
++@item powerpcle-*-eabi
+ Embedded PowerPC system in little endian mode.
+
+ You can specify a default version for the @samp{-mcpu=}@var{cpu_type}
diff --git a/2.95.3/gentoo/45_all_libexec-gcc-as.patch
b/2.95.3/gentoo/45_all_libexec-gcc-as.patch
new file mode 100644
index 0000000..e857363
--- /dev/null
+++ b/2.95.3/gentoo/45_all_libexec-gcc-as.patch
@@ -0,0 +1,26 @@
+Before gcc-3.4 assembler was supposed to be in /usr/lib/gcc-lib/<TARGET>
+After gcc-3.4 assembler location moved to /usr/libexec/gcc/<TARGET>
+
+Add gcc-3.4-style path.
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -8161,3 +8161,7 @@ elif test x$host = x$target; then
+
+- test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
++ test_dirs="$test_prefix/libexec/gcc/$target/$gcc_version \
++ $test_prefix/libexec/gcc/$target \
++ /usr/libexec/gcc/$target/$gcc_version \
++ /usr/libexec/gcc/$target \
++ $test_prefix/lib/gcc-lib/$target/$gcc_version \
+ $test_prefix/lib/gcc-lib/$target \
+--- a/gcc/configure.in
++++ b/gcc/configure.in
+@@ -4010,3 +4010,7 @@ elif test x$host = x$target; then
+
+- test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
++ test_dirs="$test_prefix/libexec/gcc/$target/$gcc_version \
++ $test_prefix/libexec/gcc/$target \
++ /usr/libexec/gcc/$target/$gcc_version \
++ /usr/libexec/gcc/$target \
++ $test_prefix/lib/gcc-lib/$target/$gcc_version \
+ $test_prefix/lib/gcc-lib/$target \
diff --git a/2.95.3/gentoo/46_all_libexec-gcc-binutils.patch
b/2.95.3/gentoo/46_all_libexec-gcc-binutils.patch
new file mode 100644
index 0000000..fb97b42
--- /dev/null
+++ b/2.95.3/gentoo/46_all_libexec-gcc-binutils.patch
@@ -0,0 +1,61 @@
+Before gcc-3.4 gcc libraries and searched executables
+were in /usr/lib/gcc-lib/<TARGET> (STANDARD_EXEC_PREFIX)
+
+After gcc-3.4 the split happened:
+- /usr/lib/gcc/<TARGET> for libraries (STARDARD_EXEC_PREFIX)
+- /usr/libexec/gcc/<TARGET> for executables (STANDARD_LIBEXEC_PREFIX)
+
+This patch adds STANDARD_LIBEXEC_PREFIX to allow bootstrapping
+on 3.4+-only system.
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -271,8 +271,13 @@ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+ # Directory in which to put the directories used by the compiler.
+ libdir = @libdir@
++# Directory in which GCC puts its executables.
++libexecdir = @libexecdir@
++
+ # Directory in which the compiler finds executables, libraries, etc.
+ libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
++# Directory in which the compiler finds executables
++libexecsubdir = $(libexecdir)/gcc/$(target_alias)/$(version)
+ # Used to produce a relative $(gcc_tooldir) in gcc.o
+ unlibsubdir = ../../..
+ # Directory in which to find other cross-compilation tools and headers.
+@@ -650,6 +655,7 @@ ORDINARY_FLAGS_TO_PASS = \
+ "gcc_tooldir=$(gcc_tooldir)" \
+ "bindir=$(bindir)" \
+ "libsubdir=$(libsubdir)" \
++ "libexecsubdir=$(libsubdir)" \
+ "datadir=$(datadir)" \
+ "distdir=../tmp/\$$(subdir)" \
+ "localedir=$(localedir)"
+@@ -1412,6 +1418,7 @@ c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H)
c-tree.h c-lex.h \
+ DRIVER_DEFINES = \
+ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
+ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
++ -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
+ -DDEFAULT_TARGET_VERSION=\"$(version)\" \
+ -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
+ -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\"
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1379,6 +1379,8 @@ static const char *standard_exec_prefix_1 =
"/usr/lib/gcc/";
+ static const char *md_exec_prefix = MD_EXEC_PREFIX;
+ #endif
+
++static const char *standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
++
+ #ifndef STANDARD_STARTFILE_PREFIX
+ #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/"
+ #endif /* !defined STANDARD_STARTFILE_PREFIX */
+@@ -3062,6 +3064,8 @@ process_command (argc, argv)
+ 0, 2, warn_std_ptr);
+ add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
+ 0, 2, warn_std_ptr);
++ add_prefix (&exec_prefixes, standard_libexec_prefix, "BINUTILS",
++ 0, 2, warn_std_ptr);
+ #endif
+
+ add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",