From patchwork Wed Feb 8 15:17:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 725656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vJPwX54qTz9s0m for ; Thu, 9 Feb 2017 02:18:04 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7547A89937; Wed, 8 Feb 2017 15:18:02 +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 qs2kcLULAkGp; Wed, 8 Feb 2017 15:18:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id DF7BA89872; Wed, 8 Feb 2017 15:18:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id EA8611BFB36 for ; Wed, 8 Feb 2017 15:17:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E5E868AA2D for ; Wed, 8 Feb 2017 15:17:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ep2kdt+7brbW for ; Wed, 8 Feb 2017 15:17:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by hemlock.osuosl.org (Postfix) with ESMTPS id 3E21989FC7 for ; Wed, 8 Feb 2017 15:17:57 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id 4CE4518822F5 for ; Wed, 8 Feb 2017 13:13:40 -0200 (BRST) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id 38488188227A for ; Wed, 8 Feb 2017 13:13:40 -0200 (BRST) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FK4U7AgdkWMt for ; Wed, 8 Feb 2017 13:13:40 -0200 (BRST) Received: from pedeld202344.datacom.net (pedeld202344.datacom.net [10.0.120.87]) by mail.datacom.ind.br (Postfix) with ESMTPSA id 12A061881F84 for ; Wed, 8 Feb 2017 13:13:40 -0200 (BRST) From: Carlos Santos To: buildroot@buildroot.org Date: Wed, 8 Feb 2017 13:17:43 -0200 Message-Id: <1486567063-21852-1-git-send-email-casantos@datacom.ind.br> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH] util-linux: link scriptreplay with libm (for isnan) 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" - Cherry-pick a patch from upstream to link scriptreplay to libm (for "isnam"). - Add a patch that improves the detection of isnan when using uClibc. This patch is for util-linux v2.29.1 and must be adapted to their master branch to be submitted upstream. Fixes: http://autobuild.buildroot.net/results/2c2/2c29a78ed81ca844a87dcd076ab3e14ea080296d http://autobuild.buildroot.net/results/404/404b10f359b2ae8a7216729fa1bab37fed2d3d4c Signed-off-by: Carlos Santos --- ...-sys-use-lm-for-scriptreplay-if-necessary.patch | 32 +++++++++++++++++++ ...mprove-detection-of-the-isnan-function-in.patch | 37 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 package/util-linux/0001-build-sys-use-lm-for-scriptreplay-if-necessary.patch create mode 100644 package/util-linux/0002-build-sys-improve-detection-of-the-isnan-function-in.patch diff --git a/package/util-linux/0001-build-sys-use-lm-for-scriptreplay-if-necessary.patch b/package/util-linux/0001-build-sys-use-lm-for-scriptreplay-if-necessary.patch new file mode 100644 index 0000000..8333ee1 --- /dev/null +++ b/package/util-linux/0001-build-sys-use-lm-for-scriptreplay-if-necessary.patch @@ -0,0 +1,32 @@ +From 02283be90292b2f57183aa930c4d69375f1d905d Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 18 Jan 2017 13:17:21 +0100 +Subject: [PATCH 1/2] build-sys: use -lm for scriptreplay if necessary + +Reported-by: Bert van Hall +Addresses: https://github.com/karelzak/util-linux/pull/397 +Signed-off-by: Karel Zak +(cherry picked from commit feda4342df1ced25df3d200ed23469e740196c86) + +Conflicts: + configure.ac +--- + term-utils/Makemodule.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am +index 1b7c5fc..ad1bb1f 100644 +--- a/term-utils/Makemodule.am ++++ b/term-utils/Makemodule.am +@@ -21,7 +21,7 @@ if BUILD_SCRIPTREPLAY + usrbin_exec_PROGRAMS += scriptreplay + dist_man_MANS += term-utils/scriptreplay.1 + scriptreplay_SOURCES = term-utils/scriptreplay.c +-scriptreplay_LDADD = $(LDADD) libcommon.la ++scriptreplay_LDADD = $(LDADD) libcommon.la $(MATH_LIBS) + endif # BUILD_SCRIPTREPLAY + + +-- +2.7.4 + diff --git a/package/util-linux/0002-build-sys-improve-detection-of-the-isnan-function-in.patch b/package/util-linux/0002-build-sys-improve-detection-of-the-isnan-function-in.patch new file mode 100644 index 0000000..4f1bb23 --- /dev/null +++ b/package/util-linux/0002-build-sys-improve-detection-of-the-isnan-function-in.patch @@ -0,0 +1,37 @@ +From 064a0445f33a67e5498d492dabe0dfc687859756 Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Wed, 8 Feb 2017 09:29:30 -0200 +Subject: [PATCH 2/2] build-sys: improve detection of the "isnan" function in + uClibc + +Since commit beceb14b450ded6560ed743634a5e80604a8edf3, MATH_LIBS is set +to "-lm" when the isnan function is detected. In uClibc, however, isnan +is a macro that calls __isnan, __isnanf, or __isnanl, depending on the +size of the argument (double, float or long double). + +Fixes: + http://autobuild.buildroot.net/results/2c2/2c29a78ed81ca844a87dcd076ab3e14ea080296d/ + http://autobuild.buildroot.net/results/404/404b10f359b2ae8a7216729fa1bab37fed2d3d4c/ + +Signed-off-by: Carlos Santos +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index cc0563b..d03469c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -428,7 +428,8 @@ AC_CHECK_FUNCS([reboot], [have_reboot=yes],[have_reboot=no]) + AM_CONDITIONAL([HAVE_OPENAT], [test "x$have_openat" = xyes]) + + AC_CHECK_FUNCS([isnan], [], +- [AC_CHECK_LIB([m], [isnan], [MATH_LIBS="-lm"])] ++ [AC_CHECK_LIB([m], [isnan], [MATH_LIBS="-lm"])] ++ [AC_CHECK_LIB([m], [__isnan], [MATH_LIBS="-lm"])] + ) + AC_SUBST([MATH_LIBS]) + +-- +2.7.4 +