libgo: build syscall test with -static

This avoids problems finding libgo.so when running the test as root,
which invokes the test as a child process in various limited environments.

Fixes https://gcc.gnu.org/PR95061

Change-Id: Ib9e464dd6b5550013db676fee758b413fc072db4
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233897
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2 files changed