From patchwork Tue Dec 20 13:42:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Bedarkar X-Patchwork-Id: 707431 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tjf9T331Kz9t0m for ; Wed, 21 Dec 2016 00:42:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E904F2EDD4; Tue, 20 Dec 2016 13:42:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 76A1UD+Jg7Vn; Tue, 20 Dec 2016 13:42:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id C4C2B2E832; Tue, 20 Dec 2016 13:42:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1EABE1BFA57 for ; Tue, 20 Dec 2016 13:42:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1842E8552E for ; Tue, 20 Dec 2016 13:42:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WsFO9UZz+eBS for ; Tue, 20 Dec 2016 13:42:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by whitealder.osuosl.org (Postfix) with ESMTP id 29E028371D for ; Tue, 20 Dec 2016 13:42:25 +0000 (UTC) Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id 16279424D0B01; Tue, 20 Dec 2016 13:42:20 +0000 (GMT) Received: from PUMAIL01.pu.imgtec.org (192.168.91.250) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 20 Dec 2016 13:42:22 +0000 Received: from pudesk287-linux.pu.imgtec.org (192.168.91.23) by PUMAIL01.pu.imgtec.org (192.168.91.250) with Microsoft SMTP Server (TLS) id 14.3.266.1; Tue, 20 Dec 2016 19:12:20 +0530 From: Rahul Bedarkar To: Date: Tue, 20 Dec 2016 19:12:05 +0530 Message-ID: <1482241325-29293-1-git-send-email-rahul.bedarkar@imgtec.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 X-Originating-IP: [192.168.91.23] Cc: Rahul Bedarkar Subject: [Buildroot] [PATCH] can-utils: fix build with glibc versions before 2.17 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" glibc versions before 2.17 needs to link with librt for clock_nanosleep(). This commmit adds patch to detect if linking with librt is required. Fixes: http://autobuild.buildroot.net/results/0e5/0e5242376ff6aa82e89ed1172350e05009d48156 Signed-off-by: Rahul Bedarkar Cc: Yegor Yefremov --- ...-check-to-detect-clock_nanosleep-in-librt.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 package/can-utils/0001-Add-check-to-detect-clock_nanosleep-in-librt.patch diff --git a/package/can-utils/0001-Add-check-to-detect-clock_nanosleep-in-librt.patch b/package/can-utils/0001-Add-check-to-detect-clock_nanosleep-in-librt.patch new file mode 100644 index 0000000..78b4edf --- /dev/null +++ b/package/can-utils/0001-Add-check-to-detect-clock_nanosleep-in-librt.patch @@ -0,0 +1,41 @@ +From 9ebbf337b033f924a3be7406774758ba29c8bd5b Mon Sep 17 00:00:00 2001 +From: Rahul Bedarkar +Date: Tue, 20 Dec 2016 18:29:11 +0530 +Subject: [PATCH] Add check to detect clock_nanosleep() in librt + +With glibc versions before 2.17, we get following build error: + + canfdtest.o: In function `millisleep': + canfdtest.c:(.text+0x212): undefined reference to `clock_nanosleep' + collect2: error: ld returned 1 exit status + make[1]: *** [canfdtest] Error 1 + make[1]: *** Waiting for unfinished jobs.... + +glibc versions before 2.17 needs to link with -lrt for +clock_nanosleep(). This patch adds support to detect if linking with +librt is required. + +This build issue is detected by Buildroot autobuilder: +http://autobuild.buildroot.net/results/0e5/0e5242376ff6aa82e89ed1172350e05009d48156/build-end.log + +Signed-off-by: Rahul Bedarkar +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 8b50fb7..df9a193 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -73,6 +73,8 @@ AC_CHECK_FUNCS([ \ + strtoul \ + ]) + ++# glibc versions before 2.17 needs to link with -lrt for clock_nanosleep ++AC_SEARCH_LIBS([clock_nanosleep], [rt]) + + AC_CHECK_DECL(SO_RXQ_OVFL,, + [AC_DEFINE([SO_RXQ_OVFL], [40], [SO_RXQ_OVFL])] +-- +2.6.2 +