libgo: only build syscall test with -static on GNU/Linux
authorIan Lance Taylor <iant@golang.org>
Thu, 14 May 2020 19:50:30 +0000 (12:50 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 14 May 2020 20:37:12 +0000 (13:37 -0700)
For PR go/95061

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234019

gcc/go/gofrontend/MERGE
libgo/Makefile.am
libgo/Makefile.in

index b63bb3bd547d8f73bbb9fffc3e94a6055ec5a0d1..4776f78e5fa5a19eea7d657c0e8b124aa5f3e9db 100644 (file)
@@ -1,4 +1,4 @@
-93b3d88515db85e203d54f382200b84b56b0ae4c
+cae8d4c388d4cc701c7f8fc221c9f6431760d93a
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index eff0e00e787ae5de084aa0f629ab94f412bb7b3f..0bbe54cfe1bed7397078276391d9ee089bc8afdf 100644 (file)
@@ -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)
index 872663865b8f4ef91f5ea95ca2f6a95c8c4e4a4e..982253d72932536c91fabc5e1580cf3d010a1618 100644 (file)
@@ -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