From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuF3C-0007F9-8d for qemu-devel@nongnu.org; Tue, 10 Jun 2014 01:56:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuF2z-0004YA-3H for qemu-devel@nongnu.org; Tue, 10 Jun 2014 01:56:50 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:50610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuF2y-0004Y5-SX for qemu-devel@nongnu.org; Tue, 10 Jun 2014 01:56:37 -0400 Received: by mail-wi0-f181.google.com with SMTP id n3so2741729wiv.8 for ; Mon, 09 Jun 2014 22:56:36 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 10 Jun 2014 07:56:20 +0200 Message-Id: <1402379781-844-8-git-send-email-pbonzini@redhat.com> In-Reply-To: <1402379781-844-1-git-send-email-pbonzini@redhat.com> References: <1402379781-844-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 7/8] configure: duplicate/incorrect order of -lrt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Rick Liu From: Rick Liu '-lrt' flag duplication/incorrect order would cause 'undefined reference to clock_gettime' error during compilation time. Before fix: ... -o qemu-bridge-helper qemu-bridge-helper.o -lrt -pthread -lgthread-2.0 -lrt -lglib-2.0 After fix: ... -o qemu-bridge-helper qemu-bridge-helper.o -pthread -lgthread-2.0 -lrt -lglib-2.0 Reference: http://hi.baidu.com/sanitywolf/item/7a8b69c1e76dd220a0b50ab1 Signed-off-by: Rick Liu Signed-off-by: Paolo Bonzini --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index a994f41..96f91ad 100755 --- a/configure +++ b/configure @@ -3452,9 +3452,9 @@ EOF if compile_prog "" "" ; 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" +elif compile_prog "" "$pthread_lib -lrt" ; then + LIBS="$LIBS -lrt" + libs_qga="$libs_qga -lrt" fi if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \ -- 1.8.3.1