From e280035fc1afdf4c1855d74bc4178ff0a8a18332 Mon Sep 17 00:00:00 2001 From: Anthony Martin Date: Wed, 1 Feb 2012 04:14:37 -0800 Subject: [PATCH] gc, cc: avoid using the wrong library when building the compilers This can happen on Plan 9 if we we're building with the 32-bit and 64-bit host compilers, one after the other. R=rsc CC=golang-dev https://golang.org/cl/5599053 --- .hgignore | 2 +- src/cmd/5c/Makefile | 2 +- src/cmd/5g/Makefile | 2 +- src/cmd/6c/Makefile | 2 +- src/cmd/6g/Makefile | 2 +- src/cmd/8c/Makefile | 2 +- src/cmd/8g/Makefile | 2 +- src/cmd/cc/Makefile | 2 +- src/cmd/gc/Makefile | 2 +- src/cmd/gc/go.h | 2 ++ 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.hgignore b/.hgignore index 81c3d41560a..488bc97fc87 100644 --- a/.hgignore +++ b/.hgignore @@ -3,7 +3,7 @@ syntax:glob .git .gitignore *.[568ao] -*.ao +*.a[568o] *.so *.pyc ._* diff --git a/src/cmd/5c/Makefile b/src/cmd/5c/Makefile index 60268e1c955..d2cddfa5221 100644 --- a/src/cmd/5c/Makefile +++ b/src/cmd/5c/Makefile @@ -26,7 +26,7 @@ OFILES=\ ../5l/enam.$O\ LIB=\ - ../cc/cc.a\ + ../cc/cc.a$O\ include ../../Make.ctool diff --git a/src/cmd/5g/Makefile b/src/cmd/5g/Makefile index 3c2a65fdf14..647446246ba 100644 --- a/src/cmd/5g/Makefile +++ b/src/cmd/5g/Makefile @@ -28,7 +28,7 @@ OFILES=\ reg.$O\ LIB=\ - ../gc/gc.a\ + ../gc/gc.a$O\ include ../../Make.ctool diff --git a/src/cmd/6c/Makefile b/src/cmd/6c/Makefile index e78b2b1aaa6..169a080d519 100644 --- a/src/cmd/6c/Makefile +++ b/src/cmd/6c/Makefile @@ -28,7 +28,7 @@ OFILES=\ ../6l/enam.$O\ LIB=\ - ../cc/cc.a\ + ../cc/cc.a$O\ include ../../Make.ctool diff --git a/src/cmd/6g/Makefile b/src/cmd/6g/Makefile index 870984a8c66..43e375174e6 100644 --- a/src/cmd/6g/Makefile +++ b/src/cmd/6g/Makefile @@ -27,7 +27,7 @@ OFILES=\ reg.$O\ LIB=\ - ../gc/gc.a\ + ../gc/gc.a$O\ include ../../Make.ctool diff --git a/src/cmd/8c/Makefile b/src/cmd/8c/Makefile index f078fbdf587..22ffedad8c5 100644 --- a/src/cmd/8c/Makefile +++ b/src/cmd/8c/Makefile @@ -29,7 +29,7 @@ OFILES=\ ../8l/enam.$O\ LIB=\ - ../cc/cc.a\ + ../cc/cc.a$O\ include ../../Make.ctool diff --git a/src/cmd/8g/Makefile b/src/cmd/8g/Makefile index 617cf1bb689..1422d07cc2c 100644 --- a/src/cmd/8g/Makefile +++ b/src/cmd/8g/Makefile @@ -28,7 +28,7 @@ OFILES=\ reg.$O\ LIB=\ - ../gc/gc.a\ + ../gc/gc.a$O\ include ../../Make.ctool diff --git a/src/cmd/cc/Makefile b/src/cmd/cc/Makefile index 8327d9516ff..737af1f42da 100644 --- a/src/cmd/cc/Makefile +++ b/src/cmd/cc/Makefile @@ -5,7 +5,7 @@ include ../../Make.inc O:=$(HOST_O) -LIB=cc.a +LIB=cc.a$O HFILES=\ cc.h\ diff --git a/src/cmd/gc/Makefile b/src/cmd/gc/Makefile index bb0d01637e9..060b086c6e6 100644 --- a/src/cmd/gc/Makefile +++ b/src/cmd/gc/Makefile @@ -5,7 +5,7 @@ include ../../Make.inc O:=$(HOST_O) -LIB=gc.a +LIB=gc.a$O HFILES=\ go.h\ diff --git a/src/cmd/gc/go.h b/src/cmd/gc/go.h index 9584bb74439..7dc8e57e509 100644 --- a/src/cmd/gc/go.h +++ b/src/cmd/gc/go.h @@ -4,6 +4,8 @@ #include +#pragma lib "../gc/gc.a$O" + #undef OAPPEND // avoid