Skip to contentSkip to conversation

qemu/configure: correctly detect -lrt ldflag on uclibc

PATCH In review Natanael Copa 2 participants 4 messages Jan 16, 2009 – Jan 29, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu/configure: correctly detect -lrt ldflag on uclibc

Hi,

I managed to build kvm on/for my uclibc distro, Alpine linux. The qemu configure script failed to detect if it needed the -lrt ldflag. the attatched patch fixes the test.

Thanks!

-nc

PS. please CC me as i don't subscribe to the list.

qemu/configure +4 -1
@@ -1068,7 +1068,10 @@
 cat > $TMPC <<EOF
 #include <signal.h>
 #include <time.h>
-int main(void) { clockid_t id; return clock_gettime(id, NULL); }
+int main(void) { clockid_t id; timer_t tid;
+	return clock_gettime(id, NULL) + timer_delete(tid); 
+}
+
 EOF
 
 rt=no
#1 lore raw
Quoted 6 lines · Natanael Copa

Hi,

I managed to build kvm on/for my uclibc distro, Alpine linux. The qemu configure script failed to detect if it needed the -lrt ldflag. the attatched patch fixes the test.

Quoted 6 lines

Thanks!

-nc

PS. please CC me as i don't subscribe to the list.

Please submit this against QEMU SVN, not against a release of KVM.

Regards,

Anthony Liguori

#2 lore raw
Quoted 7 lines · Anthony Liguori
Quoted 6 lines · Natanael Copa

Hi,

I managed to build kvm on/for my uclibc distro, Alpine linux. The qemu configure script failed to detect if it needed the -lrt ldflag. the attatched patch fixes the test.

Quoted 7 lines
Quoted 6 lines

Thanks!

-nc

PS. please CC me as i don't subscribe to the list.

Please submit this against QEMU SVN, not against a release of KVM.

I created a new patch for your convenience agains current trunk. (even if the previous patch appled just fine with -p2)

Thanks!

-nc

configure +4 -1
Index: configure
===================================================================
@@ -1059,7 +1059,10 @@
 cat > $TMPC <<EOF
 #include <signal.h>
 #include <time.h>
-int main(void) { clockid_t id; return clock_gettime(id, NULL); }
+int main(void) { clockid_t id; timer_t tid;
+	return clock_gettime(id, NULL) + timer_delete(tid); 
+}
+
 EOF
 
 rt=no
#3 lore raw
Quoted 12 lines · Natanael Copa
Quoted 10 lines · Anthony Liguori
Quoted 8 lines · Natanael Copa

Hi,

I managed to build kvm on/for my uclibc distro, Alpine linux. The qemu configure script failed to detect if it needed the -lrt ldflag. the attatched patch fixes the test.

Thanks!

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

-nc

PS. please CC me as i don't subscribe to the list.

Please submit this against QEMU SVN, not against a release of KVM.

Needs a Signed-off-by.

Regards,

Anthony Liguori

Quoted 7 lines

I created a new patch for your convenience agains current trunk. (even if the previous patch appled just fine with -p2)

Thanks!

-nc