mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
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/branches/gcc-7-branch@248169 138bc75d-0d04-0410-961f-82ee72b054a4
This commit is contained in:
@@ -920,7 +920,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.
|
||||
BUILDGOX = \
|
||||
|
||||
@@ -1075,7 +1075,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.
|
||||
|
||||
Reference in New Issue
Block a user