1
0
mirror of https://github.com/golang/go synced 2024-11-17 14:14:56 -07:00
go/misc/cgo
Shenghou Ma 551d8b9ff5 cmd/go: new cgo build procedure
This CL adds a step to the build procedure for cgo programs. It uses 'ld -r'
to combine all gcc compiled object file and generate a relocatable object file
for our ld. Additionally, this linking step will combine some static linking
gcc library into the relocatable object file, so that we can use libgcc,
libmingwex and libmingw32 without problem.

   Fixes #3261.
   Fixes #1741.
   Added a testcase for linking in libgcc.

TODO:
1. still need to fix the INDIRECT_SYMBOL_LOCAL problem on Darwin/386.
2. still need to enable the libgcc test on Linux/ARM, because 5l can't deal
with thumb libgcc.

Tested on Darwin/amd64, Darwin/386, FreeBSD/amd64, FreeBSD/386, Linux/amd64,
Linux/386, Linux/ARM, Windows/amd64, Windows/386

R=iant, rsc, bradfitz, coldredlemur
CC=golang-dev
https://golang.org/cl/5822049
2012-08-17 03:42:34 +08:00
..
gmp misc/cgo/gmp: update for Go 1 2012-03-21 00:51:48 +08:00
life misc/cgo/life: explicitly specify library for assert function (fixes windows/amd64 build) 2012-08-09 17:00:31 +10:00
stdio misc/cgo/{life,stdio}, test/run.go: use test/run.go to do the cgo tests 2012-08-07 09:38:35 +08:00
test cmd/go: new cgo build procedure 2012-08-17 03:42:34 +08:00
testso cmd/go: add env command, use to fix misc/cgo/testso 2012-03-08 14:28:44 -05:00