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

Issue 8465043: code review 8465043: cmd/cgo: record CGO_LDFLAGS env var in _cgo_flags (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by axw
Modified:
11 years ago
Reviewers:
CC:
iant, minux1, golang-dev
Visibility:
Public.

Description

cmd/cgo: record CGO_LDFLAGS env var in _cgo_flags cgo stores cgo LDFLAGS in _cgo_flags and _cgo_defun.c. The _cgo_defun.c records the flags via "#pragma cgo_ldflag <flag>", which external linking relies upon for passing libraries (and search paths) to the host linker. The go command will allow LDFLAGS for cgo to be passed through the environment (CGO_LDFLAGS); cgo ignores this environment variable, and so its value doesn't make it into the above mentioned files. This CL changes cgo to record CGO_LDFLAGS also. Fixes issue 5205.

Patch Set 1 #

Patch Set 2 : diff -r 8633d8460c82 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 8633d8460c82 https://code.google.com/p/go/ #

Patch Set 4 : diff -r d58997478ec6 https://code.google.com/p/go/ #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -0 lines) Patch
M src/cmd/cgo/main.go View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 9
axw
Hello iant@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years ago (2013-04-07 11:42:27 UTC) #1
minux1
Fixes issue 5205. Do we need to support embedded space in $CGO_LDFLAGS?
11 years ago (2013-04-07 16:04:35 UTC) #2
axw
On 2013/04/07 16:04:35, minux wrote: > Fixes issue 5205. > > Do we need to ...
11 years ago (2013-04-07 23:42:49 UTC) #3
axw
Hello iant@golang.org, minux.ma@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years ago (2013-04-08 12:02:37 UTC) #4
minux1
LGTM. Please add "Fixes issue 5205." to the CL description.
11 years ago (2013-04-08 12:44:15 UTC) #5
axw
On 2013/04/08 12:44:15, minux wrote: > LGTM. > > Please add "Fixes issue 5205." to ...
11 years ago (2013-04-08 13:47:48 UTC) #6
minux1
On Mon, Apr 8, 2013 at 9:47 PM, <axwalk@gmail.com> wrote: > I don't have commit ...
11 years ago (2013-04-08 14:45:37 UTC) #7
iant
LGTM Thanks.
11 years ago (2013-04-08 18:28:45 UTC) #8
minux1
11 years ago (2013-04-08 23:35:19 UTC) #9
*** Submitted as https://code.google.com/p/go/source/detail?r=38bb920f0beb ***

cmd/cgo: record CGO_LDFLAGS env var in _cgo_flags

cgo stores cgo LDFLAGS in _cgo_flags and _cgo_defun.c.
The _cgo_defun.c records the flags via
"#pragma cgo_ldflag <flag>", which external linking
relies upon for passing libraries (and search paths)
to the host linker.

The go command will allow LDFLAGS for cgo to be passed
through the environment (CGO_LDFLAGS); cgo ignores
this environment variable, and so its value doesn't
make it into the above mentioned files. This CL changes
cgo to record CGO_LDFLAGS also.

Fixes issue 5205.

R=iant, minux.ma
CC=golang-dev
https://codereview.appspot.com/8465043

Committer: Shenghou Ma <minux.ma@gmail.com>
Sign in to reply to this message.

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