On Sat, Mar 8, 2014 at 11:28 PM, <0xE2.0x9A.0x9B@gmail.com> wrote: > > https://codereview.appspot.com/72820045/diff/20001/src/cmd/go/build.go > File ...
11 years, 3 months ago
(2014-03-09 16:36:55 UTC)
#2
On Sat, Mar 8, 2014 at 11:28 PM, <0xE2.0x9A.0x9B@gmail.com> wrote:
>
> https://codereview.appspot.com/72820045/diff/20001/src/cmd/go/build.go
> File src/cmd/go/build.go (right):
>
>
https://codereview.appspot.com/72820045/diff/20001/src/cmd/go/build.go#newcod...
> src/cmd/go/build.go:2167: if err := b.run(p.Dir, p.ImportPath, cgoenv,
> cgoExe, "-objdir", obj, cgoflags, "--", cgoCPPFLAGS, cgoCFLAGS,
> p.CgoFiles); err != nil {
> This line fails also with go1.2.1 if CGO_CFLAGS is set in the
> environment. The line was expecting cgoCFLAGS to be an empty list.
>
> We could simply delete cgoCFLAGS from the list of arguments here. This
> will maintain the behavior of go1.2.1.
Deleting cgoCFLAGS can't be right, since that would ignore any #pragma
cgo CFLAGS that might be providing, for example, required -I options.
I guess in this case we have to not add the default -g -O2. Or we
have to fix cgo work when -O2 is provided.
Does your CL have the same issue?
Ian
On 2014/03/09 16:36:55, iant wrote: > On Sat, Mar 8, 2014 at 11:28 PM, <mailto:0xE2.0x9A.0x9B@gmail.com> ...
11 years, 3 months ago
(2014-03-09 17:41:12 UTC)
#3
On 2014/03/09 16:36:55, iant wrote:
> On Sat, Mar 8, 2014 at 11:28 PM, <mailto:0xE2.0x9A.0x9B@gmail.com> wrote:
> >
> > https://codereview.appspot.com/72820045/diff/20001/src/cmd/go/build.go
> > File src/cmd/go/build.go (right):
> >
> >
>
https://codereview.appspot.com/72820045/diff/20001/src/cmd/go/build.go#newcod...
> > src/cmd/go/build.go:2167: if err := b.run(p.Dir, p.ImportPath, cgoenv,
> > cgoExe, "-objdir", obj, cgoflags, "--", cgoCPPFLAGS, cgoCFLAGS,
> > p.CgoFiles); err != nil {
> > This line fails also with go1.2.1 if CGO_CFLAGS is set in the
> > environment. The line was expecting cgoCFLAGS to be an empty list.
> >
> > We could simply delete cgoCFLAGS from the list of arguments here. This
> > will maintain the behavior of go1.2.1.
>
> Deleting cgoCFLAGS can't be right, since that would ignore any #pragma
> cgo CFLAGS that might be providing, for example, required -I options.
> I guess in this case we have to not add the default -g -O2. Or we
> have to fix cgo work when -O2 is provided.
>
> Does your CL have the same issue?
Yes.
Issue 72820045: cmd/go: respect system CGO_CFLAGS and CGO_CXXFLAGS
(Closed)
Created 11 years, 3 months ago by iant
Modified 11 years, 3 months ago
Reviewers: 0xe2.0x9a.0x9b_gmail.com
Base URL:
Comments: 1