golang/go
View on GitHubcmd/go: with -compiler=gccgo, only call runtime.setmodinfo if using a version of gccgo that supports it
Open
#42,916 opened on Dec 1, 2020
GoCommandNeedsFixhelp wanted
Repository metrics
- Stars
- (133,883 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
What version of Go are you using (go version)?
Does this issue reproduce with the latest release?
No. It is on tip only.
$ gccgo --version
gccgo (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
What operating system and processor architecture are you using (go env)?
What did you do?
go run -compiler=gccgo example.go
What did you expect to see?
Normal run.
What did you see instead?
# command-line-arguments
/usr/bin/ld: $WORK/b001/_pkg_.a(_go_.o): in function `main.main..init0':
/tmp/go-build/b001/_gomod_.go:5: undefined reference to `runtime.setmodinfo
It is on Debian 10 stable.