diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-17 20:16:13 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-17 20:16:13 +0000 |
commit | 7bd7c2ef8a5eb2c73b6a5d1ea7f8acf68bc778bf (patch) | |
tree | 2ba2a473fd80e8c4744b9b1352dfb3bb06f134fa /libgo | |
parent | ad9ea48a8a90a65af20fd4bf9e4f2af5c206dcf5 (diff) | |
download | gcc-7bd7c2ef8a5eb2c73b6a5d1ea7f8acf68bc778bf.tar.gz |
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
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/Makefile.am | 2 | ||||
-rw-r--r-- | libgo/Makefile.in | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am index d18f1b89a31..8bbd4377144 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 0a060387684..cbdd3799836 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. |