From patchwork Tue Dec 31 12:18:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 305872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id ABAAB2C00BD for ; Tue, 31 Dec 2013 23:18:36 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 877F68D59F; Tue, 31 Dec 2013 12:18:35 +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 E09fQDnAl-sO; Tue, 31 Dec 2013 12:18:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id E18718D7C6; Tue, 31 Dec 2013 12:18:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 73B591C2AD3 for ; Tue, 31 Dec 2013 12:18:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6C0708D7C6 for ; Tue, 31 Dec 2013 12:18:34 +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 gzg8MymxNtsa for ; Tue, 31 Dec 2013 12:18:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTP id EDF7F8D59F for ; Tue, 31 Dec 2013 12:18:31 +0000 (UTC) Received: from sapphire.tkos.co.il (unknown [10.0.4.3]) by mx.tkos.co.il (Postfix) with ESMTPA id 1A4E444001E; Tue, 31 Dec 2013 14:18:29 +0200 (IST) From: Baruch Siach To: buildroot@busybox.net Date: Tue, 31 Dec 2013 14:18:21 +0200 Message-Id: X-Mailer: git-send-email 1.8.5.2 Subject: [Buildroot] [PATCH] coreutils: fix build with uClibc X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net uClibc needs -lrt for posix_spawn(). As a side effect of the fix, the timer_settime() library test breaks. So force timer_settime() library as well. Fixes http://autobuild.buildroot.net/results/ab1/ab1250c3d402ec3fbaf22eeffd07de218ffafb22/. Signed-off-by: Baruch Siach --- Note: something along the same lines should also fix m4 build against uClibc. But since m4 for target is now deprecated I'm not sure it is worth the effort. --- package/coreutils/coreutils.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk index e0e9d80..fcf8905 100644 --- a/package/coreutils/coreutils.mk +++ b/package/coreutils/coreutils.mk @@ -20,6 +20,8 @@ COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false hostnam ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \ uname join +COREUTILS_LDFLAGS = $(TARGET_LDFLAGS) + COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ ac_cv_func_chown_works=yes \ ac_cv_func_euidaccess=no \ @@ -54,7 +56,14 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ gl_cv_func_working_utimes=yes \ gl_getline_needs_run_time_check=no \ utils_cv_localtime_cache=no \ - PERL=missing + PERL=missing \ + LDFLAGS="$(COREUTILS_LDFLAGS)" + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +COREUTILS_LDFLAGS += -lrt +COREUTILS_CONF_ENV += ac_cv_func_posix_spawn=yes \ + ac_cv_search_timer_settime=-lrt +endif COREUTILS_CONF_OPT = --disable-rpath \ --disable-dependency-tracking \