From patchwork Wed Apr 6 07:39:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 606872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qfyKV2xSWz9t5p for ; Wed, 6 Apr 2016 17:39:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=jY/hbRoo; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=Qlm7PPjb2WMJI+yi dx2p1bjPO18rgzVX5mEGI6Q+dXKKJZYKimNNt2TqE8QK4fF5STpf+5W6T1MuwFQd q40JdF1+96ov++1zMeGkYZ42A/OboihnJHd0DrnCg+Akcvc4O1vQ+rvBrajjz0ND ACEDjPhhkmXWj1a3lumraD8HqsE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=pp/+BWD3YNInUtHr7IAeOh 8tTCw=; b=jY/hbRooB78/sTDnmXS7ryo44tVWF8BSqWwqXo9+ZLGAtatR1OBEBk oZ0AGYJePC5wM9/cNVm/WuBwnqITOhn45Er4vBwTc616ZFG+pxZWyKe0F4y4WvzL YADExqSrW9XsvhVSMyXnBg2xY1Bfk9R3fVTZyMG/5Hq2+mncielfU= Received: (qmail 105334 invoked by alias); 6 Apr 2016 07:39:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 105310 invoked by uid 89); 6 Apr 2016 07:39:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=p, 2016-04-06, sk:ebotcaz, D*adacore.com X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 06 Apr 2016 07:39:05 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 1E4C8812FC; Wed, 6 Apr 2016 09:39:02 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jbAD7KrGyx9S; Wed, 6 Apr 2016 09:39:02 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id EBDB2812FB; Wed, 6 Apr 2016 09:39:01 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org Subject: [patch] Remove superfluous /dev/null on grep line Date: Wed, 06 Apr 2016 09:39:01 +0200 Message-ID: <3554293.nIQqjdAT3l@polaris> User-Agent: KMail/4.14.9 (Linux/3.16.7-35-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 Hi, we recently ran into build failures on Windows systems using a somewhat old grep, coming from a syntax error in the libstdc++-symbols.ver version file: # Symbol versioning for shared libraries. if ENABLE_SYMVERS libstdc++-symbols.ver: ${glibcxx_srcdir}/$(SYMVER_FILE) \ $(port_specific_symbol_files) cp ${glibcxx_srcdir}/$(SYMVER_FILE) $@.tmp chmod +w $@.tmp if test "x$(port_specific_symbol_files)" != x; then \ if grep '^# Appended to version file.' \ $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \ cat $(port_specific_symbol_files) >> $@.tmp; \ else \ sed -n '1,/DO NOT DELETE/p' $@.tmp > tmp.top; \ sed -n '/DO NOT DELETE/,$$p' $@.tmp > tmp.bottom; \ cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@.tmp; \ rm tmp.top tmp.bottom; \ fi; \ fi Note the double /dev/null on the grep command line. The first one causes the grep to fail when the command is invoked on these systems. That's old code, but it is now invoked for config/abi/pre/float128.ver on the mainline and 5 branch and this breaks the build on these systems (4.9 builds fine). This first /dev/null doesn't serve any useful purpose and seems to be a typo, so the attached patch gets rid of it. Tested on x86/Windows and x86-64/Linux, OK for mainline and 5 branch? 2016-04-06 Eric Botcazou libstdc++-v3/ * src/Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null. * src/Makefile.in: Regenerate. Index: src/Makefile.am =================================================================== --- src/Makefile.am (revision 234695) +++ src/Makefile.am (working copy) @@ -228,7 +228,7 @@ libstdc++-symbols.ver: ${glibcxx_srcdir chmod +w $@.tmp if test "x$(port_specific_symbol_files)" != x; then \ if grep '^# Appended to version file.' \ - $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \ + $(port_specific_symbol_files) > /dev/null 2>&1; then \ cat $(port_specific_symbol_files) >> $@.tmp; \ else \ sed -n '1,/DO NOT DELETE/p' $@.tmp > tmp.top; \