Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3367)

Issue 5601044: code review 5601044: cgo: Linux/ARM support *PREVIEW* (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by minux1
Modified:
12 years ago
Reviewers:
rsc, dave, mkrautz
CC:
golang-dev
Visibility:
Public.

Description

cgo: Linux/ARM support *PREVIEW* This is an unfinished preview for testers. Not for merging. Current status: 1. all pkg tests and tests in test/ directory are passed. 2. all but one tests in misc/cgo are passed. misc/cgo/test used to fail when GOMAXPROCS>1 on SMP ARM machines, but I believe this is fixed now. 3. cmd/go can handle cgo programs now. Known issues: 1. No thumb library support, you have to make sure your external library is compiled using '-marm'. 2. The ELF Dynamic linker is hard coded to be /lib/ld-linux.so.3, so on some distributions, like recent Ubuntu and Android, you might need to adjust src/cmd/5l/asm.c. I plan to add auto detection for this. Note: 1. You have to export CGO_ENABLED=1 by yourself. (Update: enabled in Patch Set 5) 2. At this time, it will take some time to set up enviroment to do the tests in misc/cgo. Mainly because the recent removal/rename of some scripts/commands (e.g. quietgcc, gotest; gopack -> pack) (Update: the restriction is removed in Patch Set 6)

Patch Set 1 #

Patch Set 2 : diff -r 5415659b0b42 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r da15310087d6 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r eb997f446b2e https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 9dd9374109a9 https://code.google.com/p/go/ #

Patch Set 6 : diff -r abf39116ffac https://code.google.com/p/go/ #

Patch Set 7 : diff -r 91a86970157c https://code.google.com/p/go/ #

Patch Set 8 : diff -r ee5c7588cb7f https://code.google.com/p/go/ #

Patch Set 9 : diff -r 016c4fefed77 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+842 lines, -79 lines) Patch
M src/cmd/5l/5.out.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M src/cmd/5l/asm.c View 1 2 3 15 chunks +476 lines, -33 lines 0 comments Download
M src/cmd/5l/l.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/5l/obj.c View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M src/cmd/5l/pass.c View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/cmd/5l/span.c View 1 2 3 5 chunks +22 lines, -19 lines 0 comments Download
M src/cmd/cgo/gcc.go View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M src/cmd/go/build.go View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -0 lines 0 comments Download
M src/cmd/ld/data.c View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/ld/elf.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/ld/ldelf.c View 1 2 5 chunks +27 lines, -8 lines 0 comments Download
M src/pkg/go/build/build.go View 1 2 3 4 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/asm_arm.s View 1 2 3 4 chunks +125 lines, -9 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_arm.S View 1 1 chunk +53 lines, -1 line 0 comments Download
M src/pkg/runtime/cgo/gcc_linux_arm.c View 1 2 2 chunks +92 lines, -3 lines 0 comments Download
M src/pkg/runtime/cgocall.c View 1 2 chunks +6 lines, -0 lines 0 comments Download
M src/pkg/runtime/signal_linux_arm.c View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/runtime/sys_linux_arm.s View 1 2 3 4 5 6 2 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 12
minux1
Hello krautz@gmail.com, dave@cheney.net (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 2 months ago (2012-01-30 16:12:11 UTC) #1
rsc
Very nice, thanks for working on this. We probably won't be able to review this ...
12 years, 2 months ago (2012-01-30 16:14:03 UTC) #2
minux1
PTAL. Also rebased to the latest tip. Go callbacks from C is now working. The ...
12 years, 2 months ago (2012-02-05 21:14:10 UTC) #3
minux1
I wonder how to properly support cgo on Android. Android's bionic libc uses a different ...
12 years, 2 months ago (2012-02-10 10:52:09 UTC) #4
rsc
Let's postpone this discussion until after Go 1.
12 years, 2 months ago (2012-02-14 18:52:55 UTC) #5
minux1
On 2012/02/14 18:52:55, rsc wrote: > Let's postpone this discussion until after Go 1. I ...
12 years ago (2012-03-30 17:35:01 UTC) #6
rsc
Splitting the CL into more easily digested chunks would be great. Thanks. Russ
12 years ago (2012-04-02 15:32:49 UTC) #7
dave_cheney.net
Hello, This latest CL appears to make the Go 1 API check go into an ...
12 years ago (2012-04-06 12:22:18 UTC) #8
minux1
On 2012/04/06 12:22:18, dfc wrote: > This latest CL appears to make the Go 1 ...
12 years ago (2012-04-06 21:05:54 UTC) #9
dave_cheney.net
Maybe I didn't give it enough time, I will try again. Sent from my iPad ...
12 years ago (2012-04-06 21:42:30 UTC) #10
dave_cheney.net
Correction, I was too impatient. go tool api completes without incident if you are patient
12 years ago (2012-04-06 22:55:11 UTC) #11
minux1
12 years ago (2012-04-07 19:34:27 UTC) #12
I've splited this CL into five parts.
The first two are the most difficult parts.

Thanks to our new build infrastructure, except for the last one, I think each
could be reviewed
and submitted in isolation.

CL 5991065: cmd/5l, cmd/ld: dynamic linking library support
CL 5989057: runtime: cgo support for Linux/ARM
CL 5991066: cmd/cgo: support Linux/ARM
CL 5989058: cmd/go: cgo for Linux/ARM
CL 5988057: go/build: cgo is supported on Linux/ARM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b