Skip to content
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, cmd/link: support -buildmode=shared on FreeBSD #29715

Open
kolbycrouch opened this issue Jan 13, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@kolbycrouch
Copy link

commented Jan 13, 2019

Hello. I noticed recently when trying to build a shared copy of std, that cmd/go and cmd/link don't support shared linking on FreeBSD for any architecture.

After simply adding FreeBSD/amd64 to the case in cmd/go/internal/work/init.go and adding a case for FreeBSD in cmd/link/internal/ld/config.go, I was able to get a libstd.so and link a hello world program dynamically. The hello world program worked as well.

I was wondering if there was some known issue with dynamic linking on FreeBSD, or if it was simply overlooked.

@ianlancetaylor ianlancetaylor changed the title -buildmode=shared on FreeBSD cmd/go, cmd/link: support -buildmode=shared on FreeBSD Jan 14, 2019

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 14, 2019

It was most likely simply untested. Want to send a patch?

@gopherbot

This comment has been minimized.

Copy link

commented Jan 14, 2019

Change https://golang.org/cl/157682 mentions this issue: cmd/go,cmd/link: Adds shared linking support for FreeBSD/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.