]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix mkasmh.h
authorAnthony Martin <ality@pbrane.org>
Tue, 31 Jan 2012 03:25:40 +0000 (19:25 -0800)
committerAnthony Martin <ality@pbrane.org>
Tue, 31 Jan 2012 03:25:40 +0000 (19:25 -0800)
We weren't properly deleting the various header
files (that were temporarily renamed) if a $CC
for the current $GOARCH didn't exist.  And since
the compiler checks the current directory for
headers before any -I arguments, this had the
unfortunate side effect of including the last
generated headers instead of the correct ones.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5581055

src/pkg/runtime/mkasmh.sh

index ab856b3ab5a9cbaf85a1b5a5f69cedb242ec1c16..eaabe07085ba4cd598b21da2365edb6ec0dc6c2e 100755 (executable)
@@ -3,6 +3,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
+trap "rm -f arch_GOARCH.h defs_GOOS_GOARCH.h os_GOOS.h signals_GOOS.h" EXIT SIGINT SIGTERM
 set -e
 
 SYS=$1
@@ -135,5 +136,3 @@ aggr != "" && /^    / {
        printf("#define %s_%s %s\n", aggr, name, offset);
 }
 '
-
-rm -f arch_GOARCH.h defs_GOOS_GOARCH.h os_GOOS.h signals_GOOS.h