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
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 $@
$(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 >$@
offset=$(NF-1);
printf("#define %s_%s %s\n", aggr, name, offset);
}
-' runtime.acid
+' runtime.acid.$GOARCH