aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-05-17 20:16:13 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-05-17 20:16:13 +0000
commit7ded3472ae5e5eec41909fcefc911e1092479f9b (patch)
tree2ba2a473fd80e8c4744b9b1352dfb3bb06f134fa /libgo
parentc8ded43049f35d69287fed9a1f25f3f283080014 (diff)
downloadgcc-7ded3472ae5e5eec41909fcefc911e1092479f9b.zip
gcc-7ded3472ae5e5eec41909fcefc911e1092479f9b.tar.gz
gcc-7ded3472ae5e5eec41909fcefc911e1092479f9b.tar.bz2
libgo: add "vendor" to pkgpath for vendored standard packages
Ensure 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. Reviewed-on: https://go-review.googlesource.com/43610 From-SVN: r248168
Diffstat (limited to 'libgo')
-rw-r--r--libgo/Makefile.am2
-rw-r--r--libgo/Makefile.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index d18f1b8..8bbd437 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -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
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 0a06038..cbdd379 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -1063,7 +1063,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.