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

Issue 3921043: code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by niemeyer
Modified:
14 years, 1 month ago
Reviewers:
CC:
rsc, binet, golang-dev
Visibility:
Public.

Description

cgo: CGO_CFLAGS and CGO_LDFLAGS support This is a proposal to enable cgo to support a way of defining CGO_CFLAGS and CGO_LDFLAGS.

Patch Set 1 #

Patch Set 2 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 3 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 4 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 5 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 6 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 7 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 8 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 9 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 10 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 11 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Total comments: 1

Patch Set 12 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Patch Set 13 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Total comments: 1

Patch Set 14 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Total comments: 1

Patch Set 15 : code review 3921043: cgo: CGO_CFLAGS and CGO_LDFLAGS support #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -10 lines) Patch
M src/Make.pkg View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +16 lines, -6 lines 0 comments Download
M src/cmd/cgo/doc.go View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M src/cmd/cgo/gcc.go View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +102 lines, -0 lines 0 comments Download
M src/cmd/cgo/main.go View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +17 lines, -4 lines 0 comments Download
M src/cmd/cgo/out.go View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 25
niemeyer
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 2 months ago (2011-01-11 21:11:55 UTC) #1
niemeyer
There's a somewhat obvious problem with this approach which is a chicken and egg issue: ...
14 years, 2 months ago (2011-01-12 20:18:18 UTC) #2
niemeyer
Ok, problem solved by running a first pass of gcc with the -M -MG options, ...
14 years, 2 months ago (2011-01-12 23:33:40 UTC) #3
rsc
I don't want to have to invoke the C compiler to find out the flags. ...
14 years, 2 months ago (2011-01-13 00:06:11 UTC) #4
niemeyer
> I don't want to have to invoke the C compiler to find out the ...
14 years, 2 months ago (2011-01-13 00:47:59 UTC) #5
niemeyer
Implemented an approach similar to what was suggested. The proposed syntax is: #cgo CFLAGS: -I/usr/include/X11 ...
14 years, 2 months ago (2011-01-13 04:25:33 UTC) #6
rsc
On Wed, Jan 12, 2011 at 23:25, <n13m3y3r@gmail.com> wrote: > Implemented an approach similar to ...
14 years, 2 months ago (2011-01-13 15:20:26 UTC) #7
niemeyer
> Doesn't cgo invoke gcc separately for each file? > Why should the flags be ...
14 years, 2 months ago (2011-01-13 15:51:59 UTC) #8
rsc
Ok.
14 years, 2 months ago (2011-01-13 17:57:20 UTC) #9
niemeyer
Improved SplitQuoted function and submitted it for inclusion into the strings package at http://codereview.appspot.com/4051041 If ...
14 years, 2 months ago (2011-01-17 09:14:21 UTC) #10
binet
On 2011/01/17 09:14:21, niemeyer wrote: > Improved SplitQuoted function and submitted it for inclusion into ...
14 years, 1 month ago (2011-01-28 09:20:12 UTC) #11
niemeyer
Yes, pkg-config is an interesting example. For that to work, we'll either have to parse ...
14 years, 1 month ago (2011-01-28 15:51:26 UTC) #12
rsc
On Fri, Jan 28, 2011 at 10:51, <n13m3y3r@gmail.com> wrote: > Yes, pkg-config is an interesting ...
14 years, 1 month ago (2011-01-31 20:06:13 UTC) #13
niemeyer
> I don't want to have shell interpretation for now. > Let's get basic things ...
14 years, 1 month ago (2011-01-31 20:23:39 UTC) #14
rsc
s/SplitQuoted/splitQuoted/ please sync and upload to incorporate recent changes to cgo. http://codereview.appspot.com/3921043/diff/39001/src/Make.pkg File src/Make.pkg (right): ...
14 years, 1 month ago (2011-01-31 20:31:20 UTC) #15
niemeyer
Good point about the processing of _cgo_flags, sorry about that. If feasible, I would prefer ...
14 years, 1 month ago (2011-01-31 21:23:39 UTC) #16
rsc
http://codereview.appspot.com/3921043/diff/17002/src/Make.pkg File src/Make.pkg (right): http://codereview.appspot.com/3921043/diff/17002/src/Make.pkg#newcode120 src/Make.pkg:120: $(eval include _cgo_flags) this is a strange rule. i'd ...
14 years, 1 month ago (2011-01-31 23:48:45 UTC) #17
niemeyer
> this is a strange rule. > i'd move the eval into the _cgo_flags rule, ...
14 years, 1 month ago (2011-02-01 00:28:54 UTC) #18
niemeyer
> There's an ordering constraint which we must respect: > the _cgo_flags inclusion can't happen ...
14 years, 1 month ago (2011-02-01 00:30:51 UTC) #19
rsc
> Just for clarity here, there's no magic there. Oh, there's magic here. :-) http://codereview.appspot.com/3921043/diff/17008/src/Make.pkg ...
14 years, 1 month ago (2011-02-01 13:15:46 UTC) #20
niemeyer
> Oh, there's magic here. Yeah, after I mentioned it I was pondering about what's ...
14 years, 1 month ago (2011-02-01 13:18:48 UTC) #21
rsc
LGTM Okay, the next thing we need in order to make this useful with goinstall ...
14 years, 1 month ago (2011-02-01 13:33:19 UTC) #22
rsc
(But that suggestion is for a different CL.)
14 years, 1 month ago (2011-02-01 13:33:43 UTC) #23
rsc
*** Submitted as fd915bcad5d5 *** cgo: define CGO_CFLAGS and CGO_LDFLAGS in Go files R=rsc, binet ...
14 years, 1 month ago (2011-02-01 13:44:22 UTC) #24
niemeyer
14 years, 1 month ago (2011-02-01 13:49:11 UTC) #25
> I suggest changing it to allow an optional system constraint
> of the form $GOOS, $GOARCH, or $GOOS/$GOARCH before
> the name, as in

That sounds good.  I'll work on it.
Sign in to reply to this message.

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