Patchwork libgo patch committed: Pick up local packages first

login
register
mail settings
Submitter Ian Taylor
Date Jan. 25, 2011, 5:45 a.m.
Message ID <mcr8vy95yf5.fsf@google.com>
Download mbox | patch
Permalink /patch/80318/
State New
Headers show

Comments

Ian Taylor - Jan. 25, 2011, 5:45 a.m.
This patch to the libgo Makefile.am fixes a few cases where a libgo
build would pick up installed packages before local packages.  This
should fix PR go/47452.  Bootstrapped on x86_64-unknown-linux-gnu.
Committed to mainline.

Ian

Patch

diff -r b51345ec3bf5 libgo/Makefile.am
--- a/libgo/Makefile.am	Mon Jan 24 16:39:02 2011 -0800
+++ b/libgo/Makefile.am	Mon Jan 24 21:42:49 2011 -0800
@@ -1439,7 +1439,7 @@ 
 bytes/libbytes.a: $(go_bytes_files) $(go_bytes_c_files) io.gox os.gox \
 		unicode.gox utf8.gox
 	test -d bytes || $(MKDIR_P) bytes
-	$(LTGOCOMPILE) -c -o bytes/bytes.$(OBJEXT) -fgo-prefix=libgo_bytes $(srcdir)/go/bytes/buffer.go $(srcdir)/go/bytes/bytes.go $(srcdir)/go/bytes/bytes_decl.go
+	$(LTGOCOMPILE) -I . -c -o bytes/bytes.$(OBJEXT) -fgo-prefix=libgo_bytes $(srcdir)/go/bytes/buffer.go $(srcdir)/go/bytes/bytes.go $(srcdir)/go/bytes/bytes_decl.go
 	$(LTCOMPILE) -c -o bytes/index.$(OBJEXT) $(srcdir)/go/bytes/indexbyte.c
 	rm -f $@
 	$(AR) rc $@ bytes/bytes.$(OBJEXT) bytes/index.$(OBJEXT)
@@ -1694,7 +1694,7 @@ 
 
 sync/libsync.a: $(go_sync_files) $(go_sync_c_files) runtime.gox
 	test -d sync || $(MKDIR_P) sync
-	$(LTGOCOMPILE) -c -o sync/mutex.$(OBJEXT) -fgo-prefix=libgo_sync $(srcdir)/go/sync/mutex.go $(srcdir)/go/sync/once.go $(srcdir)/go/sync/rwmutex.go
+	$(LTGOCOMPILE) -I . -c -o sync/mutex.$(OBJEXT) -fgo-prefix=libgo_sync $(srcdir)/go/sync/mutex.go $(srcdir)/go/sync/once.go $(srcdir)/go/sync/rwmutex.go
 	$(LTCOMPILE) -c -o sync/cas.$(OBJEXT) $(srcdir)/go/sync/cas.c
 	rm -f $@
 	$(AR) rc $@ sync/mutex.$(OBJEXT) sync/cas.$(OBJEXT)
@@ -2470,7 +2470,7 @@ 
 	rm -f syscall.gox syscalls/libsyscall.a
 	test -d syscalls || $(MKDIR_P) syscalls
 	files=`echo $^ | sed -e 's/[^ ]*\.gox//g' -e's/[^ ]*\.c//g'`; \
-	$(LTGOCOMPILE) -c -fgo-prefix="libgo_syscalls" -o syscalls/syscall.$(OBJEXT) $$files
+	$(LTGOCOMPILE) -I . -c -fgo-prefix="libgo_syscalls" -o syscalls/syscall.$(OBJEXT) $$files
 	$(LTCOMPILE) -c -o syscalls/errno.$(OBJEXT) $(srcdir)/syscalls/errno.c
 	$(AR) rc syscalls/libsyscall.a syscalls/syscall.$(OBJEXT) syscalls/errno.$(OBJEXT)
 syscalls/libsyscall.la: syscalls/libsyscall.a