Commit 7ded3472 by Ian Lance Taylor

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
parent c8ded430
924a1fcc5658a5d66f5015921d7258e3a77519bc ba68a42618d1e8516e38da093d3af731d7fd4f06
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -910,7 +910,7 @@ BUILDDEPS = \ ...@@ -910,7 +910,7 @@ BUILDDEPS = \
BUILDPACKAGE = \ BUILDPACKAGE = \
$(MKDIR_P) $(@D); \ $(MKDIR_P) $(@D); \
files=`echo $^ | sed -e 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; \ 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. # 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 # Matching .o file can either be in the same directory as the .lo (non-PIC
......
...@@ -1063,7 +1063,7 @@ BUILDDEPS = \ ...@@ -1063,7 +1063,7 @@ BUILDDEPS = \
BUILDPACKAGE = \ BUILDPACKAGE = \
$(MKDIR_P) $(@D); \ $(MKDIR_P) $(@D); \
files=`echo $^ | sed -e 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; \ 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. # How to build a .gox file from a .lo file.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment