From patchwork Sun Mar 23 10:46:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Husemann X-Patchwork-Id: 332877 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 9C82E2C00BE for ; Sun, 23 Mar 2014 21:46:45 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=H+OWkgoyiR6+hVX01j9S6nqWAg9gjkZvHadRJq6ffU59awOs1KrDl GXQnIhYqrqpXBf+dJ+Ou6mZHAojmQm4KckG7RAGNakBAEjanXXbMU8Uyfqk/Jo72 atMFJbcd+OBJrk48PyB17q4xr2trrnKv9acP4/n3ZWswQ9mUfYUBew= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=88UDwSSxcd9vCQKv3HYt4PI+TuU=; b=RBKaS2xOzN+fHQaqDegP A1U9EZArwybhY64u5ODLKD/h7i6c3qzGNMSrl/FegsVV+xZtM6lDx7AZGyKK6kww 0XmykTh0mCJ7RAODc49iCKC0PFOWPHfNQFXOmvDHtfdhibEwJZYkcrKIRMrhAvLm K9xQ+Q+QAABXeH6mprTPFzE= Received: (qmail 9273 invoked by alias); 23 Mar 2014 10:46:36 -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 9254 invoked by uid 89); 23 Mar 2014 10:46:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail.duskware.de Received: from mail.duskware.de (HELO mail.duskware.de) (91.199.88.144) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 23 Mar 2014 10:46:33 +0000 Received: by mail.duskware.de (Postfix, from userid 205) id 78D90A801E; Sun, 23 Mar 2014 11:46:29 +0100 (CET) Date: Sun, 23 Mar 2014 11:46:29 +0100 From: Martin Husemann To: gcc-patches@gcc.gnu.org Subject: Non portable sed invocation in libgcc configury Message-ID: <20140323104629.GA18530@mail.duskware.de> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.4.2.3i libgcc/config/t-hardfp uses sed to convert libgcc function names (like __addsf3) into a tuple of -D defines. The regular expression used for that contains |, which is not a basic regular expression and not understood by posix sed. Gnu sed seems to enable it by default, I suppose - or this should have been noticed earlier. Many other sed implementations need -E or -r (for gnu sed compatibility), which the attached patch adds. It might be better to split the alternatives into several expressions and duplicate the right hand sides, or mix with some sh code, but this is already pretty messy. Martin --- t-hardfp.orig 2014-02-07 08:46:34.000000000 +0100 +++ t-hardfp 2014-03-23 11:36:12.000000000 +0100 @@ -64,7 +64,7 @@ # TYPE: the last floating-point mode (e.g. sf) hardfp_defines_for = \ $(shell echo $1 | \ - sed 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/') + sed -r 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/') hardfp-o = $(patsubst %,%$(objext),$(hardfp_func_list)) $(hardfp-o): %$(objext): $(srcdir)/config/hardfp.c