Go patch committed: Support bootstrapping Go 1.21

2 views
Skip to first unread message

Ian Lance Taylor

unread,
Jun 23, 2023, 7:17:45 PM6/23/23
to gcc-patches, gofrontend-dev
compiler, libgo: support bootstrapping gc compiler

In the Go 1.21 release the package internal/profile imports
internal/lazyregexp. That works when bootstrapping with Go 1.17,
because that compiler has internal/lazyregep and permits importing it.
We also have internal/lazyregexp in libgo, but since it is not
installed it is not available for importing. This patch adds
internal/lazyregexp to the list of internal packages that are
installed for bootstrapping.

The Go 1.21, and earlier, releases have a couple of functions in the
internal/abi package that are always fully intrinsified. The Go
frontend recognizes and intrinsifies those functions as well.
However, the Go frontend was also building function descriptors for
references to the functions without calling them, which failed because
there was nothing to refer to. That is OK for the gc compiler, which
guarantees that the functions are only called, not referenced. This
patch arranges to not generate function descriptors for these
functions.

This helps address https://go.dev/issue/60913.

Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline and GCC 12 and 13 branches.

Ian
patch.txt
Reply all
Reply to author
Forward
0 new messages