]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: iterate over names in deterministic order
authorMatthew Dempsky <mdempsky@google.com>
Mon, 11 Aug 2014 23:49:13 +0000 (16:49 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 11 Aug 2014 23:49:13 +0000 (16:49 -0700)
commit03e6a88ef04abd5916cd54d5255e7f6d6c78789f
tree208bada53f297ba11edd26d25045ebbc372d3ed0
parentfce63888cecd22dfc01bf1b6dcb5a1429aecbc17
cmd/cgo: iterate over names in deterministic order

This makes GCC behavior (and cgo build failures) deterministic.

Fixes #8487.

Ran this shell command on linux/amd64 (Ubuntu 12.04) before and
after this change:

    for x in `seq 100`; do
      go tool cgo -debug-gcc=true issue8441.go 2>&1 | md5sum
    done | sort | uniq -c

Before:
    67 2cdcb8c7c4e290f7d9009abc581b83dd  -
    10 9a55390df94f7cec6d810f3e20590789  -
    10 acfad22140d43d9b9517bbc5dfc3c0df  -
    13 c337f8fee2304b3a8e3158a4362d8698  -

After:
    100 785c316cbcbcd50896695050e2fa23c1  -

LGTM=minux, iant
R=golang-codereviews, bradfitz, minux, iant
CC=golang-codereviews
https://golang.org/cl/126990043
src/cmd/cgo/gcc.go