Skip to content

cmd/go: accept -Wl,-R,path #32167

@ghost

Description

What version of Go are you using (go version)?

$ go112 version
go version go1.12.4 netbsd/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go112 env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ng0/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="netbsd"
GOOS="netbsd"
GOPATH="/home/ng0/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/pkg/go112"
GOTMPDIR=""
GOTOOLDIR="/usr/pkg/go112/pkg/tool/netbsd_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build011870882=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Given any code which involves:

#cgo LDFLAGS: -Wl,-R/usr/pkg/lib

or similar,

go build command-line-arguments: invalid flag in #cgo LDFLAGS: -Wl,-R/usr/pkg/lib

is returned.

What did you expect to see?

A successful treatment of the LDFLAGS.

I don't know if this is a feature limitation or a bug, but given that I need to invoke
LDFLAGS this way for out-of-pkgsrc builds usually, I consider this a bug.

What did you see instead?

See above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions