diff mbox

[2/2] build: replace librt check function

Message ID 1329739880-18752-2-git-send-email-roger.pau@entel.upc.edu
State New
Headers show

Commit Message

Roger Pau Monne Feb. 20, 2012, 12:11 p.m. UTC
Replace clock_gettime with timer_gettime, since at least under
uclibc 0.9.33 the clock_getttime function can be used without linking
against librt (although the manual page states the opposite).

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
---
 configure |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Anthony Liguori Feb. 22, 2012, 7:25 p.m. UTC | #1
On 02/20/2012 06:11 AM, Roger Pau Monne wrote:
> Replace clock_gettime with timer_gettime, since at least under
> uclibc 0.9.33 the clock_getttime function can be used without linking
> against librt (although the manual page states the opposite).
>
> Signed-off-by: Roger Pau Monne<roger.pau@entel.upc.edu>

I don't think this is against qemu.git.  Please do not send patches to 
qemu-devel that are not against qemu.git without clearly indicating this.

Regards,

Anthony Liguori

> ---
>   configure |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/configure b/configure
> index 7bcd547..fb99632 100755
> --- a/configure
> +++ b/configure
> @@ -2438,7 +2438,8 @@ fi
>   cat>  $TMPC<<EOF
>   #include<signal.h>
>   #include<time.h>
> -int main(void) { clockid_t id; return clock_gettime(id, NULL); }
> +int main(void) { timer_t tid; struct itimerspec it; \
> +                 return timer_gettime(tid,&it); }
>   EOF
>
>   if compile_prog "" "" ; then
Roger Pau Monne Feb. 23, 2012, 1:34 p.m. UTC | #2
2012/2/22 Anthony Liguori <anthony@codemonkey.ws>:
> On 02/20/2012 06:11 AM, Roger Pau Monne wrote:
>>
>> Replace clock_gettime with timer_gettime, since at least under
>> uclibc 0.9.33 the clock_getttime function can be used without linking
>> against librt (although the manual page states the opposite).
>>
>> Signed-off-by: Roger Pau Monne<roger.pau@entel.upc.edu>
>
>
> I don't think this is against qemu.git.  Please do not send patches to
> qemu-devel that are not against qemu.git without clearly indicating this.

Sorry, this is against qemu-xen-upstream, should I add a tag to my
patches and resend them to qemu-devel?

Thanks, Roger.

> Regards,
>
> Anthony Liguori
>
>
>> ---
>>  configure |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 7bcd547..fb99632 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2438,7 +2438,8 @@ fi
>>  cat>  $TMPC<<EOF
>>  #include<signal.h>
>>  #include<time.h>
>> -int main(void) { clockid_t id; return clock_gettime(id, NULL); }
>> +int main(void) { timer_t tid; struct itimerspec it; \
>> +                 return timer_gettime(tid,&it); }
>>  EOF
>>
>>  if compile_prog "" "" ; then
>
>
Ian Campbell Feb. 27, 2012, 9:52 a.m. UTC | #3
On Thu, 2012-02-23 at 13:34 +0000, Roger Pau Monné wrote:
> 2012/2/22 Anthony Liguori <anthony@codemonkey.ws>:
> > On 02/20/2012 06:11 AM, Roger Pau Monne wrote:
> >>
> >> Replace clock_gettime with timer_gettime, since at least under
> >> uclibc 0.9.33 the clock_getttime function can be used without linking
> >> against librt (although the manual page states the opposite).
> >>
> >> Signed-off-by: Roger Pau Monne<roger.pau@entel.upc.edu>
> >
> >
> > I don't think this is against qemu.git.  Please do not send patches to
> > qemu-devel that are not against qemu.git without clearly indicating this.
> 
> Sorry, this is against qemu-xen-upstream, should I add a tag to my
> patches and resend them to qemu-devel?

qemu-xen-upstream is based upon the upstream qemu stable branch, not the
development branch.

However patches for qemu-xen-upstream should have already been applied
upstream. This means that patches should be against the mainline (e.g.
development branch) version of qemu and sent to qemu-devel. Once
committed there they will be backported as required to the stable branch
maintained by Xen.org as qemu-xen-upstream.

(Stefano, is that correct? Is there somewhere we can (or do!) document
this? Perhaps http://wiki.xen.org/xenwiki/QEMUUpstream linked to from
Submitting_Xen_Patches? The backport policy should also be covered, e.g.
http://marc.info/?l=xen-devel&m=132872001218724 )

Ian.

> 
> Thanks, Roger.
> 
> > Regards,
> >
> > Anthony Liguori
> >
> >
> >> ---
> >>  configure |    3 ++-
> >>  1 files changed, 2 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/configure b/configure
> >> index 7bcd547..fb99632 100755
> >> --- a/configure
> >> +++ b/configure
> >> @@ -2438,7 +2438,8 @@ fi
> >>  cat>  $TMPC<<EOF
> >>  #include<signal.h>
> >>  #include<time.h>
> >> -int main(void) { clockid_t id; return clock_gettime(id, NULL); }
> >> +int main(void) { timer_t tid; struct itimerspec it; \
> >> +                 return timer_gettime(tid,&it); }
> >>  EOF
> >>
> >>  if compile_prog "" "" ; then
> >
> >
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
Roger Pau Monne Feb. 27, 2012, 10:07 a.m. UTC | #4
2012/2/27 Ian Campbell <Ian.Campbell@citrix.com>:
> On Thu, 2012-02-23 at 13:34 +0000, Roger Pau Monné wrote:
>> 2012/2/22 Anthony Liguori <anthony@codemonkey.ws>:
>> > On 02/20/2012 06:11 AM, Roger Pau Monne wrote:
>> >>
>> >> Replace clock_gettime with timer_gettime, since at least under
>> >> uclibc 0.9.33 the clock_getttime function can be used without linking
>> >> against librt (although the manual page states the opposite).
>> >>
>> >> Signed-off-by: Roger Pau Monne<roger.pau@entel.upc.edu>
>> >
>> >
>> > I don't think this is against qemu.git.  Please do not send patches to
>> > qemu-devel that are not against qemu.git without clearly indicating this.
>>
>> Sorry, this is against qemu-xen-upstream, should I add a tag to my
>> patches and resend them to qemu-devel?
>
> qemu-xen-upstream is based upon the upstream qemu stable branch, not the
> development branch.
>
> However patches for qemu-xen-upstream should have already been applied
> upstream. This means that patches should be against the mainline (e.g.
> development branch) version of qemu and sent to qemu-devel. Once
> committed there they will be backported as required to the stable branch
> maintained by Xen.org as qemu-xen-upstream.

Ok, I'm going to rework this against qemu development branch, thanks
for the tip.

> (Stefano, is that correct? Is there somewhere we can (or do!) document
> this? Perhaps http://wiki.xen.org/xenwiki/QEMUUpstream linked to from
> Submitting_Xen_Patches? The backport policy should also be covered, e.g.
> http://marc.info/?l=xen-devel&m=132872001218724 )
>
> Ian.
>
>>
>> Thanks, Roger.
>>
>> > Regards,
>> >
>> > Anthony Liguori
>> >
>> >
>> >> ---
>> >>  configure |    3 ++-
>> >>  1 files changed, 2 insertions(+), 1 deletions(-)
>> >>
>> >> diff --git a/configure b/configure
>> >> index 7bcd547..fb99632 100755
>> >> --- a/configure
>> >> +++ b/configure
>> >> @@ -2438,7 +2438,8 @@ fi
>> >>  cat>  $TMPC<<EOF
>> >>  #include<signal.h>
>> >>  #include<time.h>
>> >> -int main(void) { clockid_t id; return clock_gettime(id, NULL); }
>> >> +int main(void) { timer_t tid; struct itimerspec it; \
>> >> +                 return timer_gettime(tid,&it); }
>> >>  EOF
>> >>
>> >>  if compile_prog "" "" ; then
>> >
>> >
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
>
>
Stefano Stabellini Feb. 27, 2012, 12:49 p.m. UTC | #5
On Mon, 27 Feb 2012, Ian Campbell wrote:
> On Thu, 2012-02-23 at 13:34 +0000, Roger Pau Monné wrote:
> > 2012/2/22 Anthony Liguori <anthony@codemonkey.ws>:
> > > On 02/20/2012 06:11 AM, Roger Pau Monne wrote:
> > >>
> > >> Replace clock_gettime with timer_gettime, since at least under
> > >> uclibc 0.9.33 the clock_getttime function can be used without linking
> > >> against librt (although the manual page states the opposite).
> > >>
> > >> Signed-off-by: Roger Pau Monne<roger.pau@entel.upc.edu>
> > >
> > >
> > > I don't think this is against qemu.git.  Please do not send patches to
> > > qemu-devel that are not against qemu.git without clearly indicating this.
> > 
> > Sorry, this is against qemu-xen-upstream, should I add a tag to my
> > patches and resend them to qemu-devel?
> 
> qemu-xen-upstream is based upon the upstream qemu stable branch, not the
> development branch.
> 
> However patches for qemu-xen-upstream should have already been applied
> upstream. This means that patches should be against the mainline (e.g.
> development branch) version of qemu and sent to qemu-devel. Once
> committed there they will be backported as required to the stable branch
> maintained by Xen.org as qemu-xen-upstream.
> 
> (Stefano, is that correct? Is there somewhere we can (or do!) document
> this? Perhaps http://wiki.xen.org/xenwiki/QEMUUpstream linked to from
> Submitting_Xen_Patches? The backport policy should also be covered, e.g.
> http://marc.info/?l=xen-devel&m=132872001218724 )

Yes, it is correct.

I added few lines to
http://wiki.xen.org/wiki?title=Submitting_Xen_Patches to explain this
concept. I have also linked http://wiki.qemu.org/Contribute/SubmitAPatch
that is the reference on how to submit patches to qemu-devel.
diff mbox

Patch

diff --git a/configure b/configure
index 7bcd547..fb99632 100755
--- a/configure
+++ b/configure
@@ -2438,7 +2438,8 @@  fi
 cat > $TMPC <<EOF
 #include <signal.h>
 #include <time.h>
-int main(void) { clockid_t id; return clock_gettime(id, NULL); }
+int main(void) { timer_t tid; struct itimerspec it; \
+                 return timer_gettime(tid, &it); }
 EOF
 
 if compile_prog "" "" ; then