[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] tests/xenstore: link in librt if necessary


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 17 Aug 2021 16:18:54 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+Y2rxcoZFOXHVvpU2N0ib2jFMGgi4FKvKeff0a1h5Ag=; b=S5Z5wIrK9R/XwdtefkMepnj/5Eg4n6ae391FL/2wKLvQuBUkYt22okMn8lUtdIWEJ0hQ2rDsjM9LHGO+LhSIvRT0cXT39UTeXthdmeuESRUa2yVzl9UtpjJCZa6tlLYRtXkun5yGHC0Nh6dpJJNpI4O8A2a2nqLb8bNJqmg7pbkiIiq7IipENpinATsQ35WS9gA7nxHkrmWKQPo/wY4ew4/PINt4jVbULZn8DPb9H/iQvBeiIGvtuR43y8Soldl/JdCEF+g8jFEYBF/1NxHvMcAnVNDZReO6U/ApW20izSIsVTmEYS4w3QH2bMWGmSAQSHfxsT27ZTpB2n7PZvv1qA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RlRhZwCUVk8n09e/eQMMcCIkJURTuj9Z/WYejbmY3eEcEsTOBSz5UiCed7kQeExlRm2cTOxHR1ptmaM04WMp7NnBvmSaziFWtjuRmMDDQECYuMYNeVfgKN840wqnjOsmZkxZGvwxhbDDZst5xXU2AV3d3J47+h1K6GW9Tzn3bHBROIGTS7Sy55ANkKnJzeK5HpUv4kq2O9mz9wevZIGSwD4IorQrv8AqEMdSqZJiO9PoG2seuVVsB+angJHEWx3kAl+hYBliVxqwUfvX6sBCWKgSjFp3/8KSLYPwPQyG+XaI7zjSYzt9ujtzCqmxfTn6DeDeR3L06BbffLUGGSuFNg==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Tue, 17 Aug 2021 14:19:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Old enough glibc has clock_gettime() in librt.so, hence the library
needs to be specified to the linker. Newer glibc has the symbol
available in both libraries, so make sure that libc.so is preferred (to
avoid an unnecessary dependency on librt.so).

Fixes: 93c9edbef51b ("tests/xenstore: Rework Makefile")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: Use --as-needed and put last in LDFLAGS. Restict to just Linux.

--- a/tools/tests/xenstore/Makefile
+++ b/tools/tests/xenstore/Makefile
@@ -33,6 +33,9 @@ CFLAGS += $(APPEND_CFLAGS)
 
 LDFLAGS += $(LDLIBS_libxenstore)
 LDFLAGS += $(APPEND_LDFLAGS)
+ifeq ($(CONFIG_Linux),y)
+LDFLAGS += -Wl,--as-needed -lc -lrt
+endif
 
 %.o: Makefile
 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.