diff options
author | Joseph Benden <joe@benden.us> | 2019-05-08 11:52:56 -0700 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2019-06-16 16:40:08 +0200 |
commit | 88c07c655262ea63c342e7c9df67cfe36fe3e5df (patch) | |
tree | 249f0c4db7f90c33210d986937d0828d5c183106 /toolchain/gcc/patches/9.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch | |
parent | 9b53201d9c53cd7021455ac9748b3dba744b468b (diff) | |
download | upstream-88c07c655262ea63c342e7c9df67cfe36fe3e5df.tar.gz upstream-88c07c655262ea63c342e7c9df67cfe36fe3e5df.tar.bz2 upstream-88c07c655262ea63c342e7c9df67cfe36fe3e5df.zip |
toolchain: Add GCC 9.1.0 release
Most of the patches are copied over from GCC 8.3.
The following patches are backported from the GCC 9.X development branch:
toolchain/gcc/patches/9.1.0/970-recompute-dom-fast-queries-before-vn.patch
toolchain/gcc/patches/9.1.0/975-g++-ICE-with-generic-lambda.patch
The specs file changed with gcc 9, now it contains "%@{L*}" instead of
"%{L*}" in older GCC versions.
Signed-off-by: Joseph Benden <joe@benden.us>
Diffstat (limited to 'toolchain/gcc/patches/9.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch')
-rw-r--r-- | toolchain/gcc/patches/9.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/toolchain/gcc/patches/9.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches/9.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch new file mode 100644 index 0000000000..b1d7576328 --- /dev/null +++ b/toolchain/gcc/patches/9.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch @@ -0,0 +1,67 @@ +From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou <yszhou4tech@gmail.com> +Date: Fri, 4 May 2018 18:20:53 +0800 +Subject: [PATCH] gotools: fix compilation when making cross compiler + +libgo is "the runtime support library for the Go programming language. +This library is intended for use with the Go frontend." + +gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but +the linker will complain that it cannot find it. That's because shared libgcc +is not present in the install directory yet. libgo.so was made without problem +because gcc will emit -lgcc_s when compiled with -shared option. When gotools +were being made, it was supplied with -static-libgcc thus no link option was +provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec +for linking with libgo.so + +- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation +- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html + +When 3-pass GCC compilation is used, shared libgcc runtime libraries will be +available after gcc pass2 completed and will meet the gotools link requirement +at gcc pass3 +--- + gotools/Makefile.am | 4 +++- + gotools/Makefile.in | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/gotools/Makefile.am ++++ b/gotools/Makefile.am +@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} + STAMP = echo timestamp > + + libgodir = ../$(target_noncanonical)/libgo ++libgccdir = ../$(target_noncanonical)/libgcc + LIBGODEP = $(libgodir)/libgo.la + + LIBGOTOOL = $(libgodir)/libgotool.a +@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) + GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) + + AM_GOCFLAGS = -I $(libgodir) +-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs ++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ ++ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s + GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ + + libgosrcdir = $(srcdir)/../libgo/go +--- a/gotools/Makefile.in ++++ b/gotools/Makefile.in +@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd + PWD_COMMAND = $${PWDCMD-pwd} + STAMP = echo timestamp > + libgodir = ../$(target_noncanonical)/libgo ++libgccdir = ../$(target_noncanonical)/libgcc + LIBGODEP = $(libgodir)/libgo.la + LIBGOTOOL = $(libgodir)/libgotool.a + @NATIVE_FALSE@GOCOMPILER = $(GOC) +@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a + GOCFLAGS = $(CFLAGS_FOR_TARGET) + GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) + AM_GOCFLAGS = -I $(libgodir) +-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs ++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ ++ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s + GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ + libgosrcdir = $(srcdir)/../libgo/go + cmdsrcdir = $(libgosrcdir)/cmd |