1
0
mirror of https://github.com/golang/go synced 2024-09-24 11:10:12 -06:00
go/misc/cgo
Alex Brainman dfbbe06a20 cmd/link, cmd/go: delay linking of mingwex and mingw32 until very end
cmd/go links mingwex and mingw32 libraries to every package it builds.
This breaks when 2 different packages call same gcc standard library
function pow. gcc linker appends pow implementation to the compiled
package, and names that function "pow". But when these 2 compiled
packages are linked together into the final executable, linker
complains, because it finds two "pow" functions with the same name.

This CL stops linking of mingwex and mingw32 during package build -
that leaves pow function reference unresolved. pow reference gets
resolved as final executable is built, by having both internal and
external linker use mingwex and mingw32 libraries.

Fixes #8756

Change-Id: I50ddc79529ea5463c67118d668488345ecf069bc
Reviewed-on: https://go-review.googlesource.com/26670
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-08-31 06:30:26 +00:00
..
errors cmd/cgo: error, not panic, if not enough arguments to function 2016-06-21 04:32:04 +00:00
fortran misc/cgo/fortran: fix gfortran compile test 2016-05-04 15:08:16 +00:00
gmp all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
life all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nocgo cmd/ld: really import runtime/cgo for external link 2014-05-20 21:36:50 -07:00
stdio all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
test cmd/link, cmd/go: delay linking of mingwex and mingw32 until very end 2016-08-31 06:30:26 +00:00
testasan runtime: more flexible heap memory mapping on 64-bits 2013-06-12 18:47:16 +04:00
testcarchive cmd/go, cmd/link: build c-archive as position independent on ELF 2016-08-23 13:12:56 +00:00
testcshared all: fix spelling mistakes 2016-04-03 17:03:15 +00:00
testgodefs all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
testsanitizers runtime/cgo: add tsan acquire/release around setenv/unsetenv 2016-08-23 14:07:58 +00:00
testshared go/build: don't alter InstallSuffix for default compile options 2016-08-26 23:01:37 +00:00
testsigfwd misc/cgo/testsigfwd: add missing return statement 2016-08-30 21:44:14 +00:00
testso cmd/dist: convert testso test into Go 2015-06-12 04:33:50 +00:00
testsovar misc/cgo/testsovar: needs the extern keyword to export variables on non-windows platforms 2015-07-21 18:10:57 +00:00
testtls all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00