]> Cypherpunks repositories - gostls13.git/commit
cmd/link: fix handling of cgo_dynamic_interpreter
authorIan Lance Taylor <iant@golang.org>
Tue, 23 Aug 2016 04:49:32 +0000 (21:49 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 23 Aug 2016 05:08:46 +0000 (05:08 +0000)
commit93b753f525b62a2a860fc2ba2d4ea3f788c275f9
treeddf915eec4483d93747a1391552dfd63698f3294
parent550caa1c87ea11aa54c6482ff66f98b4036c474f
cmd/link: fix handling of cgo_dynamic_interpreter

CL 27473 accidentally changed `!Debug['I']` to `*flagInterpreter != ""`.
Since the old `Debug['I']` was set when the new *flagInterpreter was
set, this inverted the sense of the condition. The effect was to always
ignore the cgo_dynamic_interpreter setting from runtime/cgo. This worked
OK when the default interpreter was the correct one, but failed when it
was not, as is currently the case on, at least, PPC64 and ARM.

This CL restores the old behavior by using a separate variable to track
whether the -I flag was used, just as we used to.

Change-Id: Icf9b65fa41349ed2e4de477fec0a557ef1eb8189
Reviewed-on: https://go-review.googlesource.com/27562
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/link/internal/ld/go.go
src/cmd/link/internal/ld/main.go