* [PATCH] tests/xenstore: link in librt
@ 2021-08-11 12:30 Jan Beulich
2021-08-12 11:24 ` Ian Jackson
0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2021-08-11 12:30 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.
Fixes: 93c9edbef51b ("tests/xenstore: Rework Makefile")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Cc list based on the assumption that the XENSTORE section of
./MAINTAINERS probably ought to list the containing directory.
--- a/tools/tests/xenstore/Makefile
+++ b/tools/tests/xenstore/Makefile
@@ -31,6 +31,7 @@ CFLAGS += -Werror
CFLAGS += $(CFLAGS_libxenstore)
CFLAGS += $(APPEND_CFLAGS)
+LDFLAGS += -lrt
LDFLAGS += $(LDLIBS_libxenstore)
LDFLAGS += $(APPEND_LDFLAGS)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] tests/xenstore: link in librt
2021-08-11 12:30 [PATCH] tests/xenstore: link in librt Jan Beulich
@ 2021-08-12 11:24 ` Ian Jackson
2021-08-12 12:11 ` Jan Beulich
0 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2021-08-12 11:24 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Wei Liu, Juergen Gross, Julien Grall
Jan Beulich writes ("[PATCH] tests/xenstore: link in librt"):
> Old enough glibc has clock_gettime() in librt.so, hence the library
> needs to be specified to the linker.
>
> Fixes: 93c9edbef51b ("tests/xenstore: Rework Makefile")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> Cc list based on the assumption that the XENSTORE section of
> ./MAINTAINERS probably ought to list the containing directory.
>
> --- a/tools/tests/xenstore/Makefile
> +++ b/tools/tests/xenstore/Makefile
> @@ -31,6 +31,7 @@ CFLAGS += -Werror
> CFLAGS += $(CFLAGS_libxenstore)
> CFLAGS += $(APPEND_CFLAGS)
>
> +LDFLAGS += -lrt
Don't this unconditionally is definitely not right.
How old a glibc are we talking about ? (I looked at the minimum
versions listed in README and there's notthing about glibc; perhaps
should be.)
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tests/xenstore: link in librt
2021-08-12 11:24 ` Ian Jackson
@ 2021-08-12 12:11 ` Jan Beulich
2021-08-13 11:09 ` Ian Jackson
0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2021-08-12 12:11 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel, Wei Liu, Juergen Gross, Julien Grall
On 12.08.2021 13:24, Ian Jackson wrote:
> Jan Beulich writes ("[PATCH] tests/xenstore: link in librt"):
>> Old enough glibc has clock_gettime() in librt.so, hence the library
>> needs to be specified to the linker.
>>
>> Fixes: 93c9edbef51b ("tests/xenstore: Rework Makefile")
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> ---
>> Cc list based on the assumption that the XENSTORE section of
>> ./MAINTAINERS probably ought to list the containing directory.
>>
>> --- a/tools/tests/xenstore/Makefile
>> +++ b/tools/tests/xenstore/Makefile
>> @@ -31,6 +31,7 @@ CFLAGS += -Werror
>> CFLAGS += $(CFLAGS_libxenstore)
>> CFLAGS += $(APPEND_CFLAGS)
>>
>> +LDFLAGS += -lrt
>
> Don't this unconditionally is definitely not right.
Assuming you meant "Doing this ..." - why? If the concern is that
librt.so may needlessly get recorded in a DT_NEEDED entry, then I
can replace the early addition with a late
LDFLAGS += -Wl,--as-needed -lc -lrt
one.
> How old a glibc are we talking about ? (I looked at the minimum
> versions listed in README and there's notthing about glibc; perhaps
> should be.)
I've hit this with 2.11.3. I guess it has been made available by
libc.so from 2.17 onwards, considering the symbol version is
GLIBC_2.17.
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tests/xenstore: link in librt
2021-08-12 12:11 ` Jan Beulich
@ 2021-08-13 11:09 ` Ian Jackson
2021-08-13 12:35 ` Jan Beulich
0 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2021-08-13 11:09 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Wei Liu, Juergen Gross, Julien Grall
Jan Beulich writes ("Re: [PATCH] tests/xenstore: link in librt"):
> On 12.08.2021 13:24, Ian Jackson wrote:
> >> +LDFLAGS += -lrt
> >
> > Don't this unconditionally is definitely not right.
>
> Assuming you meant "Doing this ..." - why? If the concern is that
> librt.so may needlessly get recorded in a DT_NEEDED entry, then I
> can replace the early addition with a late
>
> LDFLAGS += -Wl,--as-needed -lc -lrt
>
> one.
librt might not exist at all on some platforms.
> > How old a glibc are we talking about ? (I looked at the minimum
> > versions listed in README and there's notthing about glibc; perhaps
> > should be.)
>
> I've hit this with 2.11.3. I guess it has been made available by
> libc.so from 2.17 onwards, considering the symbol version is
> GLIBC_2.17.
According to
https://www.sourceware.org/glibc/wiki/Glibc%20Timeline
glibc 2.17 was released more than eight years ago on 2012-12-25.
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tests/xenstore: link in librt
2021-08-13 11:09 ` Ian Jackson
@ 2021-08-13 12:35 ` Jan Beulich
2021-08-16 5:38 ` Juergen Gross
0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2021-08-13 12:35 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel, Wei Liu, Juergen Gross, Julien Grall
On 13.08.2021 13:09, Ian Jackson wrote:
> Jan Beulich writes ("Re: [PATCH] tests/xenstore: link in librt"):
>> On 12.08.2021 13:24, Ian Jackson wrote:
>>>> +LDFLAGS += -lrt
>>>
>>> Don't this unconditionally is definitely not right.
>>
>> Assuming you meant "Doing this ..." - why? If the concern is that
>> librt.so may needlessly get recorded in a DT_NEEDED entry, then I
>> can replace the early addition with a late
>>
>> LDFLAGS += -Wl,--as-needed -lc -lrt
>>
>> one.
>
> librt might not exist at all on some platforms.
Hmm, indeed. Do you have any suggestion then? Adding a ./configure
check is going to be beyond what I'd we willing to spend time on ...
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tests/xenstore: link in librt
2021-08-13 12:35 ` Jan Beulich
@ 2021-08-16 5:38 ` Juergen Gross
0 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2021-08-16 5:38 UTC (permalink / raw)
To: Jan Beulich, Ian Jackson; +Cc: xen-devel, Wei Liu, Julien Grall
[-- Attachment #1.1.1: Type: text/plain, Size: 903 bytes --]
On 13.08.21 14:35, Jan Beulich wrote:
> On 13.08.2021 13:09, Ian Jackson wrote:
>> Jan Beulich writes ("Re: [PATCH] tests/xenstore: link in librt"):
>>> On 12.08.2021 13:24, Ian Jackson wrote:
>>>>> +LDFLAGS += -lrt
>>>>
>>>> Don't this unconditionally is definitely not right.
>>>
>>> Assuming you meant "Doing this ..." - why? If the concern is that
>>> librt.so may needlessly get recorded in a DT_NEEDED entry, then I
>>> can replace the early addition with a late
>>>
>>> LDFLAGS += -Wl,--as-needed -lc -lrt
>>>
>>> one.
>>
>> librt might not exist at all on some platforms.
>
> Hmm, indeed. Do you have any suggestion then? Adding a ./configure
> check is going to be beyond what I'd we willing to spend time on ...
libxl is using (probably due to the same problem):
LDUSELIBS-$(CONFIG_Linux) += -lrt
So I guess the same construct is possible here, too.
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] 6+ messages in thread
end of thread, other threads:[~2021-08-16 5:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 12:30 [PATCH] tests/xenstore: link in librt Jan Beulich
2021-08-12 11:24 ` Ian Jackson
2021-08-12 12:11 ` Jan Beulich
2021-08-13 11:09 ` Ian Jackson
2021-08-13 12:35 ` Jan Beulich
2021-08-16 5:38 ` Juergen Gross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).