-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: support -buildmode=c-shared on freebsd/amd64 #22078
Comments
Would you be interested in looking into this? It may already work, it may just need to be enabled in cmd/go and cmd/link. |
i am interested, what should i do? |
@whatest000 Thanks. Edit cmd/go/internal/work/build.go and cmd/link/internal/ld/config.go to permit c-shared on the three FreeBSD targets (freebsd-386, freebsd-amd64, freebsd-arm). Edit cmd/dist/test.go (*tester).supportedBuildMode to say that c-shared is supported on those targets. Run all.bash. See what fails. |
The relevant code in cmd/go/internal/work/build.go was moved. My bisection revealed it's now in src/cmd/go/internal/work/init.go as of commit 36323e4 on 6 November 2017. |
--buildmode=c-shard works in the latest Git. It was fixed by: commit 88129f0
|
And this bug is a duplicate of #14327. |
Thanks, closing. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.3 freebsd/amd64
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOOS="freebsd"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/freebsd_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build225258924=/tmp/go-build -gno-record-gcc-switches"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
build a .so file for my c program
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: