Patchwork [meta-fsl-ppc,master,3/4] qemu: configure properly check if -lrt is needed

login
register
mail settings
Submitter Zhenhua Luo
Date Feb. 28, 2013, 8:54 a.m.
Message ID <1362041655-19145-3-git-send-email-zhenhua.luo@freescale.com>
Download mbox | patch
Permalink /patch/45271/
State Rejected
Delegated to: Matthew McClintock
Headers show

Comments

Zhenhua Luo - Feb. 28, 2013, 8:54 a.m.
From: Ting Liu <b28495@freescale.com>

Back port from:
http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207d85d4bab06162aed18dc4

Fix the below build issue:
| ../qemu-timer.o: In function `dynticks_rearm_timer':
| .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined reference to `timer_gettime'
| .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined reference to `timer_settime'
| ../qemu-timer.o: In function `dynticks_stop_timer':
| .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined reference to `timer_delete'
| ../qemu-timer.o: In function `dynticks_start_timer':
| .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined reference to `timer_create'
| ivshmem.o: In function `pci_ivshmem_init':
| .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined reference to `shm_open'
| .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined reference to `shm_open'
| collect2: error: ld returned 1 exit status
| make[1]: *** [qemu-system-ppc] Error 1
| make: *** [subdir-ppc-softmmu] Error 2
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile

Signed-off-by: Ting Liu <b28495@freescale.com>
---
 ...configure-properly-check-if-lrt-is-needed.patch |   25 ++++++++++++++++++++
 recipes-devtools/qemu/qemu_1.0.bb                  |    6 +++--
 2 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch
Otavio Salvador - Feb. 28, 2013, 12:27 p.m.
On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo <zhenhua.luo@freescale.com> wrote:
> From: Ting Liu <b28495@freescale.com>
>
> Back port from:
> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207d85d4bab06162aed18dc4
>
> Fix the below build issue:
> | ../qemu-timer.o: In function `dynticks_rearm_timer':
> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined reference to `timer_gettime'
> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined reference to `timer_settime'
> | ../qemu-timer.o: In function `dynticks_stop_timer':
> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined reference to `timer_delete'
> | ../qemu-timer.o: In function `dynticks_start_timer':
> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined reference to `timer_create'
> | ivshmem.o: In function `pci_ivshmem_init':
> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined reference to `shm_open'
> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined reference to `shm_open'
> | collect2: error: ld returned 1 exit status
> | make[1]: *** [qemu-system-ppc] Error 1
> | make: *** [subdir-ppc-softmmu] Error 2
> | ERROR: oe_runmake failed
> | ERROR: Function failed: do_compile
>
> Signed-off-by: Ting Liu <b28495@freescale.com>

Good.

> ---
>  ...configure-properly-check-if-lrt-is-needed.patch |   25 ++++++++++++++++++++

Please check http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations

Please add the description, signed-off-by and upstream status in the
patch file. This makes easy to find out where it come from, why and if
it is a backport of a fix which still needs to be send to upstream.

>  recipes-devtools/qemu/qemu_1.0.bb                  |    6 +++--
>  2 files changed, 29 insertions(+), 2 deletions(-)
>  create mode 100644 recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch
>
> diff --git a/recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch b/recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch
> new file mode 100644
> index 0000000..8c5eec5
> --- /dev/null
> +++ b/recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch
> @@ -0,0 +1,25 @@
> +diff --git a/configure b/configure
> +index 999375a..29b3e30 100755
> +--- a/configure
> ++++ b/configure
> +@@ -2444,13 +2444,18 @@ 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_create(CLOCK_REALTIME, NULL, NULL);
> ++  return clock_gettime(CLOCK_REALTIME, NULL);
> ++}
> + EOF
> +
> + if compile_prog "" "" ; then
> +   :
> +-elif compile_prog "" "-lrt" ; then
> ++# we need pthread for static linking. use previous pthread test result
> ++elif compile_prog "" "-lrt $pthread_lib" ; then
> +   LIBS="-lrt $LIBS"
> ++  libs_qga="-lrt $libs_qga"
> + fi
> +
> + if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
> diff --git a/recipes-devtools/qemu/qemu_1.0.bb b/recipes-devtools/qemu/qemu_1.0.bb
> index ff4afde..86268aa 100644
> --- a/recipes-devtools/qemu/qemu_1.0.bb
> +++ b/recipes-devtools/qemu/qemu_1.0.bb
> @@ -5,11 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
>
>  # This means v1.0 with FSL specific patches applied
>  PV = "1.0+fsl"
> -PR = "r2"
> +PR = "r3"
>
>  DEPENDS += "dtc"
>
> -SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git"
> +SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \
> +            file://configure-properly-check-if-lrt-is-needed.patch \
> +"
>  SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f"
>
>  S = "${WORKDIR}/git"
> --
> 1.7.9.5
>
>
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale



--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
McClintock Matthew-B29882 - Feb. 28, 2013, 3:21 p.m.
On Thu, Feb 28, 2013 at 6:27 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo <zhenhua.luo@freescale.com> wrote:
>> From: Ting Liu <b28495@freescale.com>
>>
>> Back port from:
>> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207d85d4bab06162aed18dc4
>>
>> Fix the below build issue:
>> | ../qemu-timer.o: In function `dynticks_rearm_timer':
>> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined reference to `timer_gettime'
>> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined reference to `timer_settime'
>> | ../qemu-timer.o: In function `dynticks_stop_timer':
>> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined reference to `timer_delete'
>> | ../qemu-timer.o: In function `dynticks_start_timer':
>> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined reference to `timer_create'
>> | ivshmem.o: In function `pci_ivshmem_init':
>> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined reference to `shm_open'
>> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined reference to `shm_open'
>> | collect2: error: ld returned 1 exit status
>> | make[1]: *** [qemu-system-ppc] Error 1
>> | make: *** [subdir-ppc-softmmu] Error 2
>> | ERROR: oe_runmake failed
>> | ERROR: Function failed: do_compile
>>
>> Signed-off-by: Ting Liu <b28495@freescale.com>
>
> Good.

Did we check with Staurt to see if we can get him to add this patch to
his tree at git.freescale.com?

-M

>
>> ---
>>  ...configure-properly-check-if-lrt-is-needed.patch |   25 ++++++++++++++++++++
>
> Please check http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations
>
> Please add the description, signed-off-by and upstream status in the
> patch file. This makes easy to find out where it come from, why and if
> it is a backport of a fix which still needs to be send to upstream.
>
>>  recipes-devtools/qemu/qemu_1.0.bb                  |    6 +++--
>>  2 files changed, 29 insertions(+), 2 deletions(-)
>>  create mode 100644 recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch
>>
>> diff --git a/recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch b/recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch
>> new file mode 100644
>> index 0000000..8c5eec5
>> --- /dev/null
>> +++ b/recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch
>> @@ -0,0 +1,25 @@
>> +diff --git a/configure b/configure
>> +index 999375a..29b3e30 100755
>> +--- a/configure
>> ++++ b/configure
>> +@@ -2444,13 +2444,18 @@ 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_create(CLOCK_REALTIME, NULL, NULL);
>> ++  return clock_gettime(CLOCK_REALTIME, NULL);
>> ++}
>> + EOF
>> +
>> + if compile_prog "" "" ; then
>> +   :
>> +-elif compile_prog "" "-lrt" ; then
>> ++# we need pthread for static linking. use previous pthread test result
>> ++elif compile_prog "" "-lrt $pthread_lib" ; then
>> +   LIBS="-lrt $LIBS"
>> ++  libs_qga="-lrt $libs_qga"
>> + fi
>> +
>> + if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
>> diff --git a/recipes-devtools/qemu/qemu_1.0.bb b/recipes-devtools/qemu/qemu_1.0.bb
>> index ff4afde..86268aa 100644
>> --- a/recipes-devtools/qemu/qemu_1.0.bb
>> +++ b/recipes-devtools/qemu/qemu_1.0.bb
>> @@ -5,11 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
>>
>>  # This means v1.0 with FSL specific patches applied
>>  PV = "1.0+fsl"
>> -PR = "r2"
>> +PR = "r3"
>>
>>  DEPENDS += "dtc"
>>
>> -SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git"
>> +SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \
>> +            file://configure-properly-check-if-lrt-is-needed.patch \
>> +"
>>  SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f"
>>
>>  S = "${WORKDIR}/git"
>> --
>> 1.7.9.5
>>
>>
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale
>
>
>
> --
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
Yoder Stuart-B08248 - Feb. 28, 2013, 8:11 p.m.
> -----Original Message-----
> From: McClintock Matthew-B29882
> Sent: Thursday, February 28, 2013 9:22 AM
> To: Otavio Salvador; Yoder Stuart-B08248
> Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
> Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu: configure properly check if -lrt is needed
> 
> On Thu, Feb 28, 2013 at 6:27 AM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
> > On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo <zhenhua.luo@freescale.com> wrote:
> >> From: Ting Liu <b28495@freescale.com>
> >>
> >> Back port from:
> >> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207d85d4bab06162aed18dc4
> >>
> >> Fix the below build issue:
> >> | ../qemu-timer.o: In function `dynticks_rearm_timer':
> >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined reference to `timer_gettime'
> >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined reference to `timer_settime'
> >> | ../qemu-timer.o: In function `dynticks_stop_timer':
> >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined reference to `timer_delete'
> >> | ../qemu-timer.o: In function `dynticks_start_timer':
> >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined reference to `timer_create'
> >> | ivshmem.o: In function `pci_ivshmem_init':
> >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined reference to `shm_open'
> >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined reference to `shm_open'
> >> | collect2: error: ld returned 1 exit status
> >> | make[1]: *** [qemu-system-ppc] Error 1
> >> | make: *** [subdir-ppc-softmmu] Error 2
> >> | ERROR: oe_runmake failed
> >> | ERROR: Function failed: do_compile
> >>
> >> Signed-off-by: Ting Liu <b28495@freescale.com>
> >
> > Good.
> 
> Did we check with Staurt to see if we can get him to add this patch to
> his tree at git.freescale.com?

I don't understand the changes and why they are needed.

Also, we are getting ready to up-rev to QEMU 1.4 and so things may change.
If this is a blocking issue and you want to hack this code to make
progress on rebasing Yocto, fine.   But realize that we are going to
uprev QEMU and things are going to change.

Stuart
Zhenhua Luo - March 1, 2013, 3:41 a.m.
Add Ting for comment. 


Best Regards,

Zhenhua


> -----Original Message-----
> From: Yoder Stuart-B08248
> Sent: Friday, March 01, 2013 4:11 AM
> To: McClintock Matthew-B29882; Otavio Salvador
> Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
> Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu: configure
> properly check if -lrt is needed
> 
> 
> 
> > -----Original Message-----
> > From: McClintock Matthew-B29882
> > Sent: Thursday, February 28, 2013 9:22 AM
> > To: Otavio Salvador; Yoder Stuart-B08248
> > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
> > Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> > configure properly check if -lrt is needed
> >
> > On Thu, Feb 28, 2013 at 6:27 AM, Otavio Salvador
> > <otavio@ossystems.com.br> wrote:
> > > On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo
> <zhenhua.luo@freescale.com> wrote:
> > >> From: Ting Liu <b28495@freescale.com>
> > >>
> > >> Back port from:
> > >> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207d85d4
> > >> bab06162aed18dc4
> > >>
> > >> Fix the below build issue:
> > >> | ../qemu-timer.o: In function `dynticks_rearm_timer':
> > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined reference to
> `timer_gettime'
> > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined reference to
> `timer_settime'
> > >> | ../qemu-timer.o: In function `dynticks_stop_timer':
> > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined reference to
> `timer_delete'
> > >> | ../qemu-timer.o: In function `dynticks_start_timer':
> > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined reference to
> `timer_create'
> > >> | ivshmem.o: In function `pci_ivshmem_init':
> > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined reference to
> `shm_open'
> > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined reference to
> `shm_open'
> > >> | collect2: error: ld returned 1 exit status
> > >> | make[1]: *** [qemu-system-ppc] Error 1
> > >> | make: *** [subdir-ppc-softmmu] Error 2
> > >> | ERROR: oe_runmake failed
> > >> | ERROR: Function failed: do_compile
> > >>
> > >> Signed-off-by: Ting Liu <b28495@freescale.com>
> > >
> > > Good.
> >
> > Did we check with Staurt to see if we can get him to add this patch to
> > his tree at git.freescale.com?
> 
> I don't understand the changes and why they are needed.
> 
> Also, we are getting ready to up-rev to QEMU 1.4 and so things may change.
> If this is a blocking issue and you want to hack this code to make
> progress on rebasing Yocto, fine.   But realize that we are going to
> uprev QEMU and things are going to change.
> 
> Stuart
>
Ting Liu - March 1, 2013, 5:05 a.m.
> -----Original Message-----
> From: Luo Zhenhua-B19537
> Sent: Friday, March 01, 2013 11:41 AM
> To: Yoder Stuart-B08248; McClintock Matthew-B29882; Otavio Salvador; Liu
> Ting-B28495
> Cc: meta-freescale@yoctoproject.org
> Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu: configure
> properly check if -lrt is needed
> 
> Add Ting for comment.
> 
> 
> Best Regards,
> 
> Zhenhua
> 
> 
> > -----Original Message-----
> > From: Yoder Stuart-B08248
> > Sent: Friday, March 01, 2013 4:11 AM
> > To: McClintock Matthew-B29882; Otavio Salvador
> > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
> > Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> > configure properly check if -lrt is needed
> >
> >
> >
> > > -----Original Message-----
> > > From: McClintock Matthew-B29882
> > > Sent: Thursday, February 28, 2013 9:22 AM
> > > To: Otavio Salvador; Yoder Stuart-B08248
> > > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
> > > Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> > > configure properly check if -lrt is needed
> > >
> > > On Thu, Feb 28, 2013 at 6:27 AM, Otavio Salvador
> > > <otavio@ossystems.com.br> wrote:
> > > > On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo
> > <zhenhua.luo@freescale.com> wrote:
> > > >> From: Ting Liu <b28495@freescale.com>
> > > >>
> > > >> Back port from:
> > > >> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207d85
> > > >> d4
> > > >> bab06162aed18dc4
> > > >>
> > > >> Fix the below build issue:
> > > >> | ../qemu-timer.o: In function `dynticks_rearm_timer':
> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined reference
> > > >> | to
> > `timer_gettime'
> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined reference
> > > >> | to
> > `timer_settime'
> > > >> | ../qemu-timer.o: In function `dynticks_stop_timer':
> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined reference
> > > >> | to
> > `timer_delete'
> > > >> | ../qemu-timer.o: In function `dynticks_start_timer':
> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined reference
> > > >> | to
> > `timer_create'
> > > >> | ivshmem.o: In function `pci_ivshmem_init':
> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined reference
> > > >> | to
> > `shm_open'
> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined reference
> > > >> | to
> > `shm_open'
> > > >> | collect2: error: ld returned 1 exit status
> > > >> | make[1]: *** [qemu-system-ppc] Error 1
> > > >> | make: *** [subdir-ppc-softmmu] Error 2
> > > >> | ERROR: oe_runmake failed
> > > >> | ERROR: Function failed: do_compile
> > > >>
> > > >> Signed-off-by: Ting Liu <b28495@freescale.com>
> > > >
> > > > Good.
> > >
> > > Did we check with Staurt to see if we can get him to add this patch
> > > to his tree at git.freescale.com?
> >
> > I don't understand the changes and why they are needed.
> >
> > Also, we are getting ready to up-rev to QEMU 1.4 and so things may
> change.
> > If this is a blocking issue and you want to hack this code to make
> > progress on rebasing Yocto, fine.   But realize that we are going to
> > uprev QEMU and things are going to change.
> >

This issue only appeared when we rebased poky onto 1.4_M4 recently, with our own qemu tree released for SDK 1.3. if we are going to use qemu 1.4, I think this issue will go away. But before that, we need this patch to not block yocto build tests.

-Ting

> > Stuart
> >
McClintock Matthew-B29882 - March 1, 2013, 5:11 a.m.
On Thu, Feb 28, 2013 at 11:05 PM, Liu Ting-B28495 <B28495@freescale.com> wrote:
>> -----Original Message-----
>> From: Luo Zhenhua-B19537
>> Sent: Friday, March 01, 2013 11:41 AM
>> To: Yoder Stuart-B08248; McClintock Matthew-B29882; Otavio Salvador; Liu
>> Ting-B28495
>> Cc: meta-freescale@yoctoproject.org
>> Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu: configure
>> properly check if -lrt is needed
>>
>> Add Ting for comment.
>>
>>
>> Best Regards,
>>
>> Zhenhua
>>
>>
>> > -----Original Message-----
>> > From: Yoder Stuart-B08248
>> > Sent: Friday, March 01, 2013 4:11 AM
>> > To: McClintock Matthew-B29882; Otavio Salvador
>> > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
>> > Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
>> > configure properly check if -lrt is needed
>> >
>> >
>> >
>> > > -----Original Message-----
>> > > From: McClintock Matthew-B29882
>> > > Sent: Thursday, February 28, 2013 9:22 AM
>> > > To: Otavio Salvador; Yoder Stuart-B08248
>> > > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
>> > > Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
>> > > configure properly check if -lrt is needed
>> > >
>> > > On Thu, Feb 28, 2013 at 6:27 AM, Otavio Salvador
>> > > <otavio@ossystems.com.br> wrote:
>> > > > On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo
>> > <zhenhua.luo@freescale.com> wrote:
>> > > >> From: Ting Liu <b28495@freescale.com>
>> > > >>
>> > > >> Back port from:
>> > > >> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207d85
>> > > >> d4
>> > > >> bab06162aed18dc4
>> > > >>
>> > > >> Fix the below build issue:
>> > > >> | ../qemu-timer.o: In function `dynticks_rearm_timer':
>> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined reference
>> > > >> | to
>> > `timer_gettime'
>> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined reference
>> > > >> | to
>> > `timer_settime'
>> > > >> | ../qemu-timer.o: In function `dynticks_stop_timer':
>> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined reference
>> > > >> | to
>> > `timer_delete'
>> > > >> | ../qemu-timer.o: In function `dynticks_start_timer':
>> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined reference
>> > > >> | to
>> > `timer_create'
>> > > >> | ivshmem.o: In function `pci_ivshmem_init':
>> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined reference
>> > > >> | to
>> > `shm_open'
>> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined reference
>> > > >> | to
>> > `shm_open'
>> > > >> | collect2: error: ld returned 1 exit status
>> > > >> | make[1]: *** [qemu-system-ppc] Error 1
>> > > >> | make: *** [subdir-ppc-softmmu] Error 2
>> > > >> | ERROR: oe_runmake failed
>> > > >> | ERROR: Function failed: do_compile
>> > > >>
>> > > >> Signed-off-by: Ting Liu <b28495@freescale.com>
>> > > >
>> > > > Good.
>> > >
>> > > Did we check with Staurt to see if we can get him to add this patch
>> > > to his tree at git.freescale.com?
>> >
>> > I don't understand the changes and why they are needed.
>> >
>> > Also, we are getting ready to up-rev to QEMU 1.4 and so things may
>> change.
>> > If this is a blocking issue and you want to hack this code to make
>> > progress on rebasing Yocto, fine.   But realize that we are going to
>> > uprev QEMU and things are going to change.
>> >
>
> This issue only appeared when we rebased poky onto 1.4_M4 recently, with our own qemu tree released for SDK 1.3. if we are going to use qemu 1.4, I think this issue will go away. But before that, we need this patch to not block yocto build tests.

Seems like some library or toolchain changed in poky that is causing
this issue. I tend to thing we should apply this patch and carry on
and and move to qemu 1.4 as soon as it's available. Although it would
be nice if the commit had a bit more information about what's actually
going on.

-M
Ting Liu - March 1, 2013, 6:01 a.m.
> -----Original Message-----
> From: McClintock Matthew-B29882
> Sent: Friday, March 01, 2013 1:11 PM
> To: Liu Ting-B28495
> Cc: Luo Zhenhua-B19537; Yoder Stuart-B08248; McClintock Matthew-B29882;
> Otavio Salvador; meta-freescale@yoctoproject.org
> Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu: configure
> properly check if -lrt is needed
> 
> On Thu, Feb 28, 2013 at 11:05 PM, Liu Ting-B28495 <B28495@freescale.com>
> wrote:
> >> -----Original Message-----
> >> From: Luo Zhenhua-B19537
> >> Sent: Friday, March 01, 2013 11:41 AM
> >> To: Yoder Stuart-B08248; McClintock Matthew-B29882; Otavio Salvador;
> >> Liu
> >> Ting-B28495
> >> Cc: meta-freescale@yoctoproject.org
> >> Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> >> configure properly check if -lrt is needed
> >>
> >> Add Ting for comment.
> >>
> >>
> >> Best Regards,
> >>
> >> Zhenhua
> >>
> >>
> >> > -----Original Message-----
> >> > From: Yoder Stuart-B08248
> >> > Sent: Friday, March 01, 2013 4:11 AM
> >> > To: McClintock Matthew-B29882; Otavio Salvador
> >> > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
> >> > Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> >> > configure properly check if -lrt is needed
> >> >
> >> >
> >> >
> >> > > -----Original Message-----
> >> > > From: McClintock Matthew-B29882
> >> > > Sent: Thursday, February 28, 2013 9:22 AM
> >> > > To: Otavio Salvador; Yoder Stuart-B08248
> >> > > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
> >> > > Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> >> > > configure properly check if -lrt is needed
> >> > >
> >> > > On Thu, Feb 28, 2013 at 6:27 AM, Otavio Salvador
> >> > > <otavio@ossystems.com.br> wrote:
> >> > > > On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo
> >> > <zhenhua.luo@freescale.com> wrote:
> >> > > >> From: Ting Liu <b28495@freescale.com>
> >> > > >>
> >> > > >> Back port from:
> >> > > >> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207
> >> > > >> d85
> >> > > >> d4
> >> > > >> bab06162aed18dc4
> >> > > >>
> >> > > >> Fix the below build issue:
> >> > > >> | ../qemu-timer.o: In function `dynticks_rearm_timer':
> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined
> >> > > >> | reference to
> >> > `timer_gettime'
> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined
> >> > > >> | reference to
> >> > `timer_settime'
> >> > > >> | ../qemu-timer.o: In function `dynticks_stop_timer':
> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined
> >> > > >> | reference to
> >> > `timer_delete'
> >> > > >> | ../qemu-timer.o: In function `dynticks_start_timer':
> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined
> >> > > >> | reference to
> >> > `timer_create'
> >> > > >> | ivshmem.o: In function `pci_ivshmem_init':
> >> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined
> >> > > >> | reference to
> >> > `shm_open'
> >> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined
> >> > > >> | reference to
> >> > `shm_open'
> >> > > >> | collect2: error: ld returned 1 exit status
> >> > > >> | make[1]: *** [qemu-system-ppc] Error 1
> >> > > >> | make: *** [subdir-ppc-softmmu] Error 2
> >> > > >> | ERROR: oe_runmake failed
> >> > > >> | ERROR: Function failed: do_compile
> >> > > >>
> >> > > >> Signed-off-by: Ting Liu <b28495@freescale.com>
> >> > > >
> >> > > > Good.
> >> > >
> >> > > Did we check with Staurt to see if we can get him to add this
> >> > > patch to his tree at git.freescale.com?
> >> >
> >> > I don't understand the changes and why they are needed.
> >> >
> >> > Also, we are getting ready to up-rev to QEMU 1.4 and so things may
> >> change.
> >> > If this is a blocking issue and you want to hack this code to make
> >> > progress on rebasing Yocto, fine.   But realize that we are going to
> >> > uprev QEMU and things are going to change.
> >> >
> >
> > This issue only appeared when we rebased poky onto 1.4_M4 recently,
> with our own qemu tree released for SDK 1.3. if we are going to use qemu
> 1.4, I think this issue will go away. But before that, we need this patch
> to not block yocto build tests.
> 
> Seems like some library or toolchain changed in poky that is causing this
> issue. I tend to thing we should apply this patch and carry on and and
> move to qemu 1.4 as soon as it's available. Although it would be nice if
> the commit had a bit more information about what's actually going on.
> 

Maybe add one line:
-lrt is needed to avoid the error "undefined reference to `timer_settime'". add the check in configure.

Yocto 1.4_M4 uses qemu 1.3.1 which includes this fix. So this issue only appeared to us.

-Ting

> -M
McClintock Matthew-B29882 - March 1, 2013, 6:03 a.m.
On Fri, Mar 1, 2013 at 12:01 AM, Liu Ting-B28495 <B28495@freescale.com> wrote:
>> -----Original Message-----
>> From: McClintock Matthew-B29882
>> Sent: Friday, March 01, 2013 1:11 PM
>> To: Liu Ting-B28495
>> Cc: Luo Zhenhua-B19537; Yoder Stuart-B08248; McClintock Matthew-B29882;
>> Otavio Salvador; meta-freescale@yoctoproject.org
>> Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu: configure
>> properly check if -lrt is needed
>>
>> On Thu, Feb 28, 2013 at 11:05 PM, Liu Ting-B28495 <B28495@freescale.com>
>> wrote:
>> >> -----Original Message-----
>> >> From: Luo Zhenhua-B19537
>> >> Sent: Friday, March 01, 2013 11:41 AM
>> >> To: Yoder Stuart-B08248; McClintock Matthew-B29882; Otavio Salvador;
>> >> Liu
>> >> Ting-B28495
>> >> Cc: meta-freescale@yoctoproject.org
>> >> Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
>> >> configure properly check if -lrt is needed
>> >>
>> >> Add Ting for comment.
>> >>
>> >>
>> >> Best Regards,
>> >>
>> >> Zhenhua
>> >>
>> >>
>> >> > -----Original Message-----
>> >> > From: Yoder Stuart-B08248
>> >> > Sent: Friday, March 01, 2013 4:11 AM
>> >> > To: McClintock Matthew-B29882; Otavio Salvador
>> >> > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
>> >> > Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
>> >> > configure properly check if -lrt is needed
>> >> >
>> >> >
>> >> >
>> >> > > -----Original Message-----
>> >> > > From: McClintock Matthew-B29882
>> >> > > Sent: Thursday, February 28, 2013 9:22 AM
>> >> > > To: Otavio Salvador; Yoder Stuart-B08248
>> >> > > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
>> >> > > Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
>> >> > > configure properly check if -lrt is needed
>> >> > >
>> >> > > On Thu, Feb 28, 2013 at 6:27 AM, Otavio Salvador
>> >> > > <otavio@ossystems.com.br> wrote:
>> >> > > > On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo
>> >> > <zhenhua.luo@freescale.com> wrote:
>> >> > > >> From: Ting Liu <b28495@freescale.com>
>> >> > > >>
>> >> > > >> Back port from:
>> >> > > >> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207
>> >> > > >> d85
>> >> > > >> d4
>> >> > > >> bab06162aed18dc4
>> >> > > >>
>> >> > > >> Fix the below build issue:
>> >> > > >> | ../qemu-timer.o: In function `dynticks_rearm_timer':
>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined
>> >> > > >> | reference to
>> >> > `timer_gettime'
>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined
>> >> > > >> | reference to
>> >> > `timer_settime'
>> >> > > >> | ../qemu-timer.o: In function `dynticks_stop_timer':
>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined
>> >> > > >> | reference to
>> >> > `timer_delete'
>> >> > > >> | ../qemu-timer.o: In function `dynticks_start_timer':
>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined
>> >> > > >> | reference to
>> >> > `timer_create'
>> >> > > >> | ivshmem.o: In function `pci_ivshmem_init':
>> >> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined
>> >> > > >> | reference to
>> >> > `shm_open'
>> >> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined
>> >> > > >> | reference to
>> >> > `shm_open'
>> >> > > >> | collect2: error: ld returned 1 exit status
>> >> > > >> | make[1]: *** [qemu-system-ppc] Error 1
>> >> > > >> | make: *** [subdir-ppc-softmmu] Error 2
>> >> > > >> | ERROR: oe_runmake failed
>> >> > > >> | ERROR: Function failed: do_compile
>> >> > > >>
>> >> > > >> Signed-off-by: Ting Liu <b28495@freescale.com>
>> >> > > >
>> >> > > > Good.
>> >> > >
>> >> > > Did we check with Staurt to see if we can get him to add this
>> >> > > patch to his tree at git.freescale.com?
>> >> >
>> >> > I don't understand the changes and why they are needed.
>> >> >
>> >> > Also, we are getting ready to up-rev to QEMU 1.4 and so things may
>> >> change.
>> >> > If this is a blocking issue and you want to hack this code to make
>> >> > progress on rebasing Yocto, fine.   But realize that we are going to
>> >> > uprev QEMU and things are going to change.
>> >> >
>> >
>> > This issue only appeared when we rebased poky onto 1.4_M4 recently,
>> with our own qemu tree released for SDK 1.3. if we are going to use qemu
>> 1.4, I think this issue will go away. But before that, we need this patch
>> to not block yocto build tests.
>>
>> Seems like some library or toolchain changed in poky that is causing this
>> issue. I tend to thing we should apply this patch and carry on and and
>> move to qemu 1.4 as soon as it's available. Although it would be nice if
>> the commit had a bit more information about what's actually going on.
>>
>
> Maybe add one line:
> -lrt is needed to avoid the error "undefined reference to `timer_settime'". add the check in configure.
>
> Yocto 1.4_M4 uses qemu 1.3.1 which includes this fix. So this issue only appeared to us.

Add the two lines ;)

-M
Matthew McClintock - March 6, 2013, 7:12 a.m.
On Fri, Mar 1, 2013 at 12:01 AM, Matthew McClintock <msm@freescale.com> wrote:
> On Fri, Mar 1, 2013 at 12:01 AM, Liu Ting-B28495 <B28495@freescale.com> wrote:
>>> -----Original Message-----
>>> From: McClintock Matthew-B29882
>>> Sent: Friday, March 01, 2013 1:11 PM
>>> To: Liu Ting-B28495
>>> Cc: Luo Zhenhua-B19537; Yoder Stuart-B08248; McClintock Matthew-B29882;
>>> Otavio Salvador; meta-freescale@yoctoproject.org
>>> Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu: configure
>>> properly check if -lrt is needed
>>>
>>> On Thu, Feb 28, 2013 at 11:05 PM, Liu Ting-B28495 <B28495@freescale.com>
>>> wrote:
>>> >> -----Original Message-----
>>> >> From: Luo Zhenhua-B19537
>>> >> Sent: Friday, March 01, 2013 11:41 AM
>>> >> To: Yoder Stuart-B08248; McClintock Matthew-B29882; Otavio Salvador;
>>> >> Liu
>>> >> Ting-B28495
>>> >> Cc: meta-freescale@yoctoproject.org
>>> >> Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
>>> >> configure properly check if -lrt is needed
>>> >>
>>> >> Add Ting for comment.
>>> >>
>>> >>
>>> >> Best Regards,
>>> >>
>>> >> Zhenhua
>>> >>
>>> >>
>>> >> > -----Original Message-----
>>> >> > From: Yoder Stuart-B08248
>>> >> > Sent: Friday, March 01, 2013 4:11 AM
>>> >> > To: McClintock Matthew-B29882; Otavio Salvador
>>> >> > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
>>> >> > Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
>>> >> > configure properly check if -lrt is needed
>>> >> >
>>> >> >
>>> >> >
>>> >> > > -----Original Message-----
>>> >> > > From: McClintock Matthew-B29882
>>> >> > > Sent: Thursday, February 28, 2013 9:22 AM
>>> >> > > To: Otavio Salvador; Yoder Stuart-B08248
>>> >> > > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
>>> >> > > Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
>>> >> > > configure properly check if -lrt is needed
>>> >> > >
>>> >> > > On Thu, Feb 28, 2013 at 6:27 AM, Otavio Salvador
>>> >> > > <otavio@ossystems.com.br> wrote:
>>> >> > > > On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo
>>> >> > <zhenhua.luo@freescale.com> wrote:
>>> >> > > >> From: Ting Liu <b28495@freescale.com>
>>> >> > > >>
>>> >> > > >> Back port from:
>>> >> > > >> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a09699207
>>> >> > > >> d85
>>> >> > > >> d4
>>> >> > > >> bab06162aed18dc4
>>> >> > > >>
>>> >> > > >> Fix the below build issue:
>>> >> > > >> | ../qemu-timer.o: In function `dynticks_rearm_timer':
>>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined
>>> >> > > >> | reference to
>>> >> > `timer_gettime'
>>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined
>>> >> > > >> | reference to
>>> >> > `timer_settime'
>>> >> > > >> | ../qemu-timer.o: In function `dynticks_stop_timer':
>>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined
>>> >> > > >> | reference to
>>> >> > `timer_delete'
>>> >> > > >> | ../qemu-timer.o: In function `dynticks_start_timer':
>>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined
>>> >> > > >> | reference to
>>> >> > `timer_create'
>>> >> > > >> | ivshmem.o: In function `pci_ivshmem_init':
>>> >> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined
>>> >> > > >> | reference to
>>> >> > `shm_open'
>>> >> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined
>>> >> > > >> | reference to
>>> >> > `shm_open'
>>> >> > > >> | collect2: error: ld returned 1 exit status
>>> >> > > >> | make[1]: *** [qemu-system-ppc] Error 1
>>> >> > > >> | make: *** [subdir-ppc-softmmu] Error 2
>>> >> > > >> | ERROR: oe_runmake failed
>>> >> > > >> | ERROR: Function failed: do_compile
>>> >> > > >>
>>> >> > > >> Signed-off-by: Ting Liu <b28495@freescale.com>
>>> >> > > >
>>> >> > > > Good.
>>> >> > >
>>> >> > > Did we check with Staurt to see if we can get him to add this
>>> >> > > patch to his tree at git.freescale.com?
>>> >> >
>>> >> > I don't understand the changes and why they are needed.
>>> >> >
>>> >> > Also, we are getting ready to up-rev to QEMU 1.4 and so things may
>>> >> change.
>>> >> > If this is a blocking issue and you want to hack this code to make
>>> >> > progress on rebasing Yocto, fine.   But realize that we are going to
>>> >> > uprev QEMU and things are going to change.
>>> >> >
>>> >
>>> > This issue only appeared when we rebased poky onto 1.4_M4 recently,
>>> with our own qemu tree released for SDK 1.3. if we are going to use qemu
>>> 1.4, I think this issue will go away. But before that, we need this patch
>>> to not block yocto build tests.
>>>
>>> Seems like some library or toolchain changed in poky that is causing this
>>> issue. I tend to thing we should apply this patch and carry on and and
>>> move to qemu 1.4 as soon as it's available. Although it would be nice if
>>> the commit had a bit more information about what's actually going on.
>>>
>>
>> Maybe add one line:
>> -lrt is needed to avoid the error "undefined reference to `timer_settime'". add the check in configure.
>>
>> Yocto 1.4_M4 uses qemu 1.3.1 which includes this fix. So this issue only appeared to us.
>
> Add the two lines ;)

Waiting on new patch with these two lines in the commit message.
Marking patch rejected.

-M
Ting Liu - March 7, 2013, 8:10 a.m.
> -----Original Message-----
> From: Matthew McClintock [mailto:msm-oss@mcclintock.net]
> Sent: Wednesday, March 06, 2013 3:13 PM
> To: McClintock Matthew-B29882
> Cc: Liu Ting-B28495; McClintock Matthew-B29882; meta-
> freescale@yoctoproject.org; Yoder Stuart-B08248; Otavio Salvador
> Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu: configure
> properly check if -lrt is needed
> 
> On Fri, Mar 1, 2013 at 12:01 AM, Matthew McClintock <msm@freescale.com>
> wrote:
> > On Fri, Mar 1, 2013 at 12:01 AM, Liu Ting-B28495 <B28495@freescale.com>
> wrote:
> >>> -----Original Message-----
> >>> From: McClintock Matthew-B29882
> >>> Sent: Friday, March 01, 2013 1:11 PM
> >>> To: Liu Ting-B28495
> >>> Cc: Luo Zhenhua-B19537; Yoder Stuart-B08248; McClintock
> >>> Matthew-B29882; Otavio Salvador; meta-freescale@yoctoproject.org
> >>> Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> >>> configure properly check if -lrt is needed
> >>>
> >>> On Thu, Feb 28, 2013 at 11:05 PM, Liu Ting-B28495
> >>> <B28495@freescale.com>
> >>> wrote:
> >>> >> -----Original Message-----
> >>> >> From: Luo Zhenhua-B19537
> >>> >> Sent: Friday, March 01, 2013 11:41 AM
> >>> >> To: Yoder Stuart-B08248; McClintock Matthew-B29882; Otavio
> >>> >> Salvador; Liu
> >>> >> Ting-B28495
> >>> >> Cc: meta-freescale@yoctoproject.org
> >>> >> Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> >>> >> configure properly check if -lrt is needed
> >>> >>
> >>> >> Add Ting for comment.
> >>> >>
> >>> >>
> >>> >> Best Regards,
> >>> >>
> >>> >> Zhenhua
> >>> >>
> >>> >>
> >>> >> > -----Original Message-----
> >>> >> > From: Yoder Stuart-B08248
> >>> >> > Sent: Friday, March 01, 2013 4:11 AM
> >>> >> > To: McClintock Matthew-B29882; Otavio Salvador
> >>> >> > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
> >>> >> > Subject: RE: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> >>> >> > configure properly check if -lrt is needed
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > > -----Original Message-----
> >>> >> > > From: McClintock Matthew-B29882
> >>> >> > > Sent: Thursday, February 28, 2013 9:22 AM
> >>> >> > > To: Otavio Salvador; Yoder Stuart-B08248
> >>> >> > > Cc: Luo Zhenhua-B19537; meta-freescale@yoctoproject.org
> >>> >> > > Subject: Re: [meta-freescale] [meta-fsl-ppc master 3/4] qemu:
> >>> >> > > configure properly check if -lrt is needed
> >>> >> > >
> >>> >> > > On Thu, Feb 28, 2013 at 6:27 AM, Otavio Salvador
> >>> >> > > <otavio@ossystems.com.br> wrote:
> >>> >> > > > On Thu, Feb 28, 2013 at 5:54 AM, Zhenhua Luo
> >>> >> > <zhenhua.luo@freescale.com> wrote:
> >>> >> > > >> From: Ting Liu <b28495@freescale.com>
> >>> >> > > >>
> >>> >> > > >> Back port from:
> >>> >> > > >> http://git.qemu.org/?p=qemu.git;a=commit;h=8bacde8d86a0969
> >>> >> > > >> 9207
> >>> >> > > >> d85
> >>> >> > > >> d4
> >>> >> > > >> bab06162aed18dc4
> >>> >> > > >>
> >>> >> > > >> Fix the below build issue:
> >>> >> > > >> | ../qemu-timer.o: In function `dynticks_rearm_timer':
> >>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:597: undefined
> >>> >> > > >> | reference to
> >>> >> > `timer_gettime'
> >>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:610: undefined
> >>> >> > > >> | reference to
> >>> >> > `timer_settime'
> >>> >> > > >> | ../qemu-timer.o: In function `dynticks_stop_timer':
> >>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:583: undefined
> >>> >> > > >> | reference to
> >>> >> > `timer_delete'
> >>> >> > > >> | ../qemu-timer.o: In function `dynticks_start_timer':
> >>> >> > > >> | .../qemu/1.0+fsl-r2/git/qemu-timer.c:565: undefined
> >>> >> > > >> | reference to
> >>> >> > `timer_create'
> >>> >> > > >> | ivshmem.o: In function `pci_ivshmem_init':
> >>> >> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:720: undefined
> >>> >> > > >> | reference to
> >>> >> > `shm_open'
> >>> >> > > >> | .../qemu/1.0+fsl-r2/git/hw/ivshmem.c:727: undefined
> >>> >> > > >> | reference to
> >>> >> > `shm_open'
> >>> >> > > >> | collect2: error: ld returned 1 exit status
> >>> >> > > >> | make[1]: *** [qemu-system-ppc] Error 1
> >>> >> > > >> | make: *** [subdir-ppc-softmmu] Error 2
> >>> >> > > >> | ERROR: oe_runmake failed
> >>> >> > > >> | ERROR: Function failed: do_compile
> >>> >> > > >>
> >>> >> > > >> Signed-off-by: Ting Liu <b28495@freescale.com>
> >>> >> > > >
> >>> >> > > > Good.
> >>> >> > >
> >>> >> > > Did we check with Staurt to see if we can get him to add this
> >>> >> > > patch to his tree at git.freescale.com?
> >>> >> >
> >>> >> > I don't understand the changes and why they are needed.
> >>> >> >
> >>> >> > Also, we are getting ready to up-rev to QEMU 1.4 and so things
> >>> >> > may
> >>> >> change.
> >>> >> > If this is a blocking issue and you want to hack this code to
> make
> >>> >> > progress on rebasing Yocto, fine.   But realize that we are
> going to
> >>> >> > uprev QEMU and things are going to change.
> >>> >> >
> >>> >
> >>> > This issue only appeared when we rebased poky onto 1.4_M4
> >>> > recently,
> >>> with our own qemu tree released for SDK 1.3. if we are going to use
> >>> qemu 1.4, I think this issue will go away. But before that, we need
> >>> this patch to not block yocto build tests.
> >>>
> >>> Seems like some library or toolchain changed in poky that is causing
> >>> this issue. I tend to thing we should apply this patch and carry on
> >>> and and move to qemu 1.4 as soon as it's available. Although it
> >>> would be nice if the commit had a bit more information about what's
> actually going on.
> >>>
> >>
> >> Maybe add one line:
> >> -lrt is needed to avoid the error "undefined reference to
> `timer_settime'". add the check in configure.
> >>
> >> Yocto 1.4_M4 uses qemu 1.3.1 which includes this fix. So this issue
> only appeared to us.
> >
> > Add the two lines ;)
> 
> Waiting on new patch with these two lines in the commit message.
> Marking patch rejected.
> 

Patch v2 been sent yesterday. Please review.

-Ting

> -M

Patch

diff --git a/recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch b/recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch
new file mode 100644
index 0000000..8c5eec5
--- /dev/null
+++ b/recipes-devtools/qemu/files/configure-properly-check-if-lrt-is-needed.patch
@@ -0,0 +1,25 @@ 
+diff --git a/configure b/configure
+index 999375a..29b3e30 100755
+--- a/configure
++++ b/configure
+@@ -2444,13 +2444,18 @@ 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_create(CLOCK_REALTIME, NULL, NULL);
++  return clock_gettime(CLOCK_REALTIME, NULL);
++}
+ EOF
+ 
+ if compile_prog "" "" ; then
+   :
+-elif compile_prog "" "-lrt" ; then
++# we need pthread for static linking. use previous pthread test result
++elif compile_prog "" "-lrt $pthread_lib" ; then
+   LIBS="-lrt $LIBS"
++  libs_qga="-lrt $libs_qga"
+ fi
+ 
+ if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
diff --git a/recipes-devtools/qemu/qemu_1.0.bb b/recipes-devtools/qemu/qemu_1.0.bb
index ff4afde..86268aa 100644
--- a/recipes-devtools/qemu/qemu_1.0.bb
+++ b/recipes-devtools/qemu/qemu_1.0.bb
@@ -5,11 +5,13 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
 
 # This means v1.0 with FSL specific patches applied
 PV = "1.0+fsl"
-PR = "r2"
+PR = "r3"
 
 DEPENDS += "dtc"
 
-SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git"
+SRC_URI = "git://git.freescale.com/ppc/sdk/qemu.git \
+            file://configure-properly-check-if-lrt-is-needed.patch \
+"
 SRCREV = "7feabd47a814214dc4bebfd97d0eaf30dc50a68f"
 
 S = "${WORKDIR}/git"