golang/go

cmd/go: with -compiler=gccgo, only call runtime.setmodinfo if using a version of gccgo that supports it

Aperta

#42.916 aperta il 1 dic 2020

 (6 commenti) (0 reazioni) (0 assegnatari)Go (19.008 fork)batch import
GoCommandNeedsFixhelp wanted

Metriche repository

Star
 (133.883 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor