aboutsummaryrefslogtreecommitdiff
path: root/gotools/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-02-09 13:11:55 -0800
committerIan Lance Taylor <iant@golang.org>2022-02-09 13:13:17 -0800
commitf6ff6738fa25fb012ed208e01de5a84d8668d538 (patch)
tree8b39147f24010e5fa562b9c9d0471b4bcb3390b2 /gotools/configure
parent4cf3c339815cdfa636b25a512f91b63d7c313fd6 (diff)
downloadgcc-f6ff6738fa25fb012ed208e01de5a84d8668d538.zip
gcc-f6ff6738fa25fb012ed208e01de5a84d8668d538.tar.gz
gcc-f6ff6738fa25fb012ed208e01de5a84d8668d538.tar.bz2
gccgo: link static libgo against -lrt on GNU/Linux
The upcoming Go 1.18 release requires linking against -lrt on GNU/Linux (only) in order to call timer_create and friends. Also change gotools to link the runtime test against -lrt. * gospec.cc (RTLIB, RT_LIBRARY): Define. (lang_specific_driver): Add -lrt if linking statically on GNU/Linux. * configure.ac (RT_LIBS): Define. * Makefile.am (check-runtime): Set GOLIBS to $(RT_LIBS). * configure, Makefile.in: Regenerate.
Diffstat (limited to 'gotools/configure')
-rwxr-xr-xgotools/configure7
1 files changed, 7 insertions, 0 deletions
diff --git a/gotools/configure b/gotools/configure
index ff71d2a..5b66722 100755
--- a/gotools/configure
+++ b/gotools/configure
@@ -586,6 +586,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+RT_LIBS
NET_LIBS
NATIVE_FALSE
NATIVE_TRUE
@@ -4211,6 +4212,12 @@ if test "$ac_res" != no; then :
fi
+RT_LIBS=
+case ${target} in
+ *-*-linux*) RT_LIBS=-lrt ;;
+esac
+
+
ac_config_files="$ac_config_files Makefile"