From patchwork Tue Aug 20 11:03:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 268486 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 1E2B22C0118 for ; Tue, 20 Aug 2013 21:03:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8A56C8B9E5; Tue, 20 Aug 2013 11:03:45 +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 rGbfSmw+q9XB; Tue, 20 Aug 2013 11:03:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id C92068B301; Tue, 20 Aug 2013 11:03:44 +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 710411C2D9C for ; Tue, 20 Aug 2013 11:04:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 399DE8B2C5 for ; Tue, 20 Aug 2013 11:03:43 +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 SgF4oXJPzPKr for ; Tue, 20 Aug 2013 11:03:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by whitealder.osuosl.org (Postfix) with ESMTP id ACBD98B301 for ; Tue, 20 Aug 2013 11:03:42 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 223DF6DC1; Tue, 20 Aug 2013 13:04:09 +0200 (CEST) Received: from localhost (unknown [37.160.161.29]) by mail.free-electrons.com (Postfix) with ESMTPSA id 14B096CD8 for ; Tue, 20 Aug 2013 13:04:06 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Tue, 20 Aug 2013 13:03:03 +0200 Message-Id: <1376996584-4462-5-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1376996584-4462-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1376996584-4462-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCH 4/5] Makefile: do not try to strip inexisting file when stripping libpthread 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 libpthread.so has a special stripping condition to preserve parts of it that are needed for debugging. However, due to the usage of 'xargs' instead of 'xargs -r', the strip command is executed regardless of whether a libpthread.so file is found or not. This leads to a big error message being displayed in static-only builds, because strip is executed without a file argument. Thanks to the '|| true', the build continues, but still shows a big error message in the middle, which is not nice. By using 'xargs -r', we avoid the strip command from being executed when 'find' doesn't find any match. We also remove the '|| true' to catch other real errors. Signed-off-by: Thomas Petazzoni Acked-by: Arnout Vandecappelle (Essensium/Mind) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d40126..9201f27 100644 --- a/Makefile +++ b/Makefile @@ -485,7 +485,7 @@ endif # I set a breakpoint" ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \ - xargs $(STRIPCMD) $(STRIP_STRIP_DEBUG) || true + xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) endif mkdir -p $(TARGET_DIR)/etc