All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tests/xenstore: link in librt if necessary
@ 2021-08-17 14:18 Jan Beulich
  2021-08-19 12:23 ` Juergen Gross
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2021-08-17 14:18 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Wei Liu, Juergen Gross, Julien Grall

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@suse.com>
---
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
 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] tests/xenstore: link in librt if necessary
  2021-08-17 14:18 [PATCH v2] tests/xenstore: link in librt if necessary Jan Beulich
@ 2021-08-19 12:23 ` Juergen Gross
  2021-09-02 16:36   ` Ian Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Juergen Gross @ 2021-08-19 12:23 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Ian Jackson, Wei Liu, Julien Grall


[-- Attachment #1.1.1: Type: text/plain, Size: 475 bytes --]

On 17.08.21 16:18, Jan Beulich wrote:
> 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@suse.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] tests/xenstore: link in librt if necessary
  2021-08-19 12:23 ` Juergen Gross
@ 2021-09-02 16:36   ` Ian Jackson
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2021-09-02 16:36 UTC (permalink / raw)
  To: Juergen Gross; +Cc: Jan Beulich, xen-devel, Wei Liu, Julien Grall

Juergen Gross writes ("Re: [PATCH v2] tests/xenstore: link in librt if necessary"):
> On 17.08.21 16:18, Jan Beulich wrote:
> > 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@suse.com>
> 
> Reviewed-by: Juergen Gross <jgross@suse.com>

Thanks.

While I peronally think this is not warranted, the extra Makefile
clutter is a very minor wart and I definitely don't want to stand in
the way of people dealing with things that are a problem for them.

So:

Acked-by: Ian Jackson <iwj@xenproject.org>

and queued.  I will push it today.

Ian.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-02 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 14:18 [PATCH v2] tests/xenstore: link in librt if necessary Jan Beulich
2021-08-19 12:23 ` Juergen Gross
2021-09-02 16:36   ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.