aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-05-14 12:50:30 -0700
committerIan Lance Taylor <iant@golang.org>2020-05-14 13:37:12 -0700
commit3a36428b5fbc825e2d3455f5770b5d6e71c63413 (patch)
tree3a14bea83dae378c2aa4adef514a1fc0ac788b6e /libgo
parent75d0b3d728864116144f9db52b156c573ae8d879 (diff)
downloadgcc-3a36428b5fbc825e2d3455f5770b5d6e71c63413.zip
gcc-3a36428b5fbc825e2d3455f5770b5d6e71c63413.tar.gz
gcc-3a36428b5fbc825e2d3455f5770b5d6e71c63413.tar.bz2
libgo: only build syscall test with -static on GNU/Linux
For PR go/95061 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234019
Diffstat (limited to 'libgo')
-rw-r--r--libgo/Makefile.am2
-rw-r--r--libgo/Makefile.in2
2 files changed, 3 insertions, 1 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index eff0e00..0bbe54c 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -967,9 +967,11 @@ endif
# Also use -fno-inline to get better results from the memory profiler.
runtime_pprof_check_GOCFLAGS = -static-libgo -fno-inline
+if LIBGO_IS_LINUX
# Use -static for the syscall tests, because otherwise when
# running as root the re-execs ignore LD_LIBRARY_PATH.
syscall_check_GOCFLAGS = -static
+endif
extra_go_files_runtime_internal_sys = version.go
runtime/internal/sys.lo.dep: $(extra_go_files_runtime_internal_sys)
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 8726638..982253d 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -1107,7 +1107,7 @@ runtime_pprof_check_GOCFLAGS = -static-libgo -fno-inline
# Use -static for the syscall tests, because otherwise when
# running as root the re-execs ignore LD_LIBRARY_PATH.
-syscall_check_GOCFLAGS = -static
+@LIBGO_IS_LINUX_TRUE@syscall_check_GOCFLAGS = -static
extra_go_files_runtime_internal_sys = version.go
extra_go_files_internal_cpu = cpugen.go
extra_go_files_golang_org_x_sys_cpu = gcpugen.go