]> Cypherpunks repositories - gostls13.git/commitdiff
mysterious bug: runtime.acid wasn't getting rebuilt
authorRuss Cox <rsc@golang.org>
Wed, 28 Oct 2009 21:03:16 +0000 (14:03 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 28 Oct 2009 21:03:16 +0000 (14:03 -0700)
when switching architectures.

fix bug twice: make sure clean removes the file,
and generate into architecture-specific file names.

R=r
http://go/go-review/1013018

src/pkg/runtime/Makefile
src/pkg/runtime/mkasmh.sh

index 1708b86b2a72a1aaf53700b90cdb1a5a595b6435..f66d4c2a58a3aa4cd1a8c2c2dabb6482f10c13f6 100644 (file)
@@ -82,9 +82,9 @@ include $(GOROOT)/src/Make.pkg
 clean: clean-local
 
 clean-local:
-       rm -f cgo2c */asm.h
+       rm -f cgo2c */asm.h runtime.acid.*
 
-$(GOARCH)/asm.h: mkasmh.sh runtime.acid
+$(GOARCH)/asm.h: mkasmh.sh runtime.acid.$(GOARCH)
        ./mkasmh.sh >$@.x
        mv -f $@.x $@
 
@@ -111,5 +111,5 @@ cgo2c: cgo2c.c
        $(AS) $<
 
 # for discovering offsets inside structs when debugging
-runtime.acid: runtime.h proc.c
-       $(CC) -a proc.c >runtime.acid
+runtime.acid.$(GOARCH): runtime.h proc.c
+       $(CC) -a proc.c >$@
index 291ee042dd4d4cd125372d6eea84d5436a66ee13..cb4b6d214f015214c4fd190bba3b81b4cc535bbc 100755 (executable)
@@ -55,5 +55,5 @@ aggr != "" && /^      / {
        offset=$(NF-1);
        printf("#define %s_%s %s\n", aggr, name, offset);
 }
-' runtime.acid
+' runtime.acid.$GOARCH