runtime: call timer functions via syscall
authorIan Lance Taylor <iant@golang.org>
Sun, 13 Feb 2022 01:12:41 +0000 (17:12 -0800)
committerIan Lance Taylor <iant@golang.org>
Sun, 13 Feb 2022 19:03:45 +0000 (11:03 -0800)
commit58aeb75d4097010ad9bb72b964265b18ab284f93
tree849876c3156f676db4c951f9b9f6a77e452b6a06
parent033ec967ec5583ea978d16ca83f9563c518e6dc6
runtime: call timer functions via syscall

It turns out to be painful to require linking against -lrt on
GNU/Linux, as that makes it harder to link Go code into C programs.
Instead just call the timer syscalls directly.  That is what the
upstream library does anyhow.

gcc/go/
* gospec.cc: Revert 2022-02-09 change:
(RTLIB, RT_LIBRARY): Don't define.
(lang_specific_driver): Don't add -lrt if linking statically
on GNU/Linux.

gotools/
* configure.ac: Revert 2022-02-09 change:
(RT_LIBS): Don't define.
* Makefile.am (check-runtime): Don't set GOLIBS to $(RT_LIBS).
* configure, Makefile.in: Regenerate.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/385475
12 files changed:
gcc/go/gofrontend/MERGE
gcc/go/gospec.cc
gotools/Makefile.am
gotools/Makefile.in
gotools/configure
gotools/configure.ac
libgo/Makefile.am
libgo/Makefile.in
libgo/configure
libgo/configure.ac
libgo/go/runtime/os_linux.go
libgo/testsuite/Makefile.in