From patchwork Tue Oct 14 07:06:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Masker X-Patchwork-Id: 399382 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 E8DC4140140 for ; Tue, 14 Oct 2014 18:07:02 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; q=dns; s=default; b=mVR+qIsmXUfznrXl+KihKQ+I6Cw3i 1vhGwSk6yA21U2wkuIwcKgXJr1t8sgRosaijrrMcy7fVlDQm+SRMTEyaMOzANDNI +XEAfJ7eDMljPPSPcTWKjktSTPFjG5OP3x4S2bfZVUSGVCkDpaL02BitIEOiN7dQ lHwi/j0f1LmNLM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; s=default; bh=0NFwXGNlEbLj5XKnGwWh9fv3Ly0=; b=pfP 4hRAasijuYTp9Nejqq7OPlDkwwjUkLF6vzw7s+hPTlpALep1TQhVJZmrpHQswVCP bKBJNjEz2INPT4z4wo5HaDBOf5hf06Cd5zi6WlrDQ6bSqNuImxXizGuRjsRWbPyV 4YILIZfBHlxbcPUfXPS9kxiMfzZ9/MR9+IlbGpWU= Received: (qmail 5607 invoked by alias); 14 Oct 2014 07:06:56 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Received: (qmail 5596 invoked by uid 89); 14 Oct 2014 07:06:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f45.google.com Received: from mail-oi0-f45.google.com (HELO mail-oi0-f45.google.com) (209.85.218.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 14 Oct 2014 07:06:54 +0000 Received: by mail-oi0-f45.google.com with SMTP id i138so15610525oig.18 for ; Tue, 14 Oct 2014 00:06:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=ju8mc1+RmGfMLl6aLlA0Wa/B18efrc6dP5WWqScLsqM=; b=Mp5bk+tS3/17Ga+3/dyUF3/CFx5Y5wsZDFyy9WCHPAy+INUaRKE9NT7OoeEIQC/TCX XXpF1A9FSFBsMpOInDTVdsh/nIDcRSup8gMLB4Tfsg1Nr6jl2CFFr3G4D0pHOUZOVDkv 8btwxPQoERYSiHkmB4mpkBqmm+V3biYfsSAypvfHVfu5eq8YQMZWpWS317UjvHhYW8is uAqExIrb62kgRyLEPf0bA3pNtXp5eXu3EnTu55sjZJwOgYtdMzAPraq6xmoWsKqjaxVB U6XcLw5YfC4tPSzPe63eOvOGSEgRmz4uwfOhfpq42SxAJ3ky44kK781Adtpa9iUPDFg6 +MEg== X-Gm-Message-State: ALoCoQmHw0kPagJ1+yhU7DQ6xXgrWi2ocZPqiTQ+FtjpwlfkDE8gBXKCjo9PQeK/R3jXCiv8QiwF X-Received: by 10.60.82.36 with SMTP id f4mr3184812oey.28.1413270412375; Tue, 14 Oct 2014 00:06:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.62.12 with HTTP; Tue, 14 Oct 2014 00:06:32 -0700 (PDT) From: "Jason T. Masker" Date: Tue, 14 Oct 2014 03:06:32 -0400 Message-ID: Subject: scripts/crosstool-NG.sh.in: patch regex to work with BSD grep To: crossgcc@sourceware.org BSD grep does not interpret a null alteration. It complains about an empty sub-expression, e.g.: $ grep --version && grep -E '^(# |)CT_' .config grep (BSD grep) 2.5.1-FreeBSD grep: empty (sub)expression This patch replaces the null alteration with a zero or once quantifier which works with both BSD & GNU grep. $ grep --version && grep -E '^(# )?CT_' .config grep (BSD grep) 2.5.1-FreeBSD CT_CONFIGURE_has_xz=y CT_CONFIGURE_has_svn=y ... $ ggrep --version && ggrep -E '^(# )?CT_' .config ggrep (GNU grep) 2.20 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and others, see . CT_CONFIGURE_has_xz=y CT_CONFIGURE_has_svn=y ... --- For unsubscribe information see http://sourceware.org/lists.html#faq diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index cd65d5b..53ac552 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -125,7 +125,7 @@ CT_DoLog INFO "Build started ${CT_STAR_DATE_HUMAN}" # We really need to extract from ,config and not .config.2, as we # do want the kconfig's values, not our mangled config with arrays. CT_DoStep DEBUG "Dumping user-supplied crosstool-NG configuration" -CT_DoExecLog DEBUG ${grep} -E '^(# |)CT_' .config +CT_DoExecLog DEBUG ${grep} -E '^(# )?CT_' .config CT_EndStep CT_DoLog DEBUG "Unsetting and unexporting MAKEFLAGS"