This libgo patch ensures that the packages vendored into the standard
library do not have the same pkgpath as the actual packages.  If we
don't, attempts to build and test the actual packages will get
confused.  The specific error I was seeing was import loops, causing
some of the packages to fail to get initialized, causing an obscure
run time crash.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline and GCC 7 branch.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 248082)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-924a1fcc5658a5d66f5015921d7258e3a77519bc
+ba68a42618d1e8516e38da093d3af731d7fd4f06
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/Makefile.am
===================================================================
--- libgo/Makefile.am   (revision 247848)
+++ libgo/Makefile.am   (working copy)
@@ -910,7 +910,7 @@ BUILDDEPS = \
 BUILDPACKAGE = \
        $(MKDIR_P) $(@D); \
        files=`echo $^ | sed -e 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; \
-       $(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//'` 
$($(subst -,_,$(subst .,_,$(subst /,_,$@)))_GOCFLAGS) -o $@ $$files
+       $(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//' -e 
's|golang_org|vendor/golang_org|'` $($(subst -,_,$(subst .,_,$(subst 
/,_,$@)))_GOCFLAGS) -o $@ $$files
 
 # How to build a .gox file from a .lo file.
 # Matching .o file can either be in the same directory as the .lo (non-PIC

Reply via email to