From patchwork Wed Oct 23 14:44:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 285683 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E226B2C025E for ; Thu, 24 Oct 2013 01:45:00 +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:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=cq0AF+nv28Geb72x +m7bWvlge9Fbg565i56rlfIv9KdsQo17SvzxhZ86g0FfHkaH9RjT20eoOHWIP0Gb URDl5rlwlAH6bWqepkYBsJA8tik+vVkAj6HBrwlpfR6bJ2I7eUaN8kDYqX7He6Fn K062P/3GZfRHpCW3zQsC0f4eemQ= 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:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=h0ghJr0LOSj1cDpB6nU+JC btyjI=; b=RSVNGykQVPstDW8BjGplrP3T8zVYus9rpXESRltxZQpWAFiGj0VieM bid5QmA70Gs8abvAYCj1/f+wKRka6G9wzVs+7aCP4PbTxlaEdyZcnGv7eYhHcmA/ 7lgh3enQBHQqm+q+r6XFn2IB6+KhySqf7YDDHDx+BMffY5I3i18HA= Received: (qmail 18119 invoked by alias); 23 Oct 2013 14:44:53 -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 18110 invoked by uid 89); 23 Oct 2013 14:44:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_20, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp-relay.CeBiTec.Uni-Bielefeld.DE Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Oct 2013 14:44:51 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id CB48DB44; Wed, 23 Oct 2013 16:44:48 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ik05Er71JENG; Wed, 23 Oct 2013 16:44:29 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 9AA94B40; Wed, 23 Oct 2013 16:44:29 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id r9NEiTQF008438; Wed, 23 Oct 2013 16:44:29 +0200 (MEST) From: Rainer Orth To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, Arnaud Charlet Subject: Re: [Ada] Convert Ada front-end to automatic dependencies References: <3027725.ycNyME1ghy@polaris> Date: Wed, 23 Oct 2013 16:44:29 +0200 In-Reply-To: <3027725.ycNyME1ghy@polaris> (Eric Botcazou's message of "Sun, 13 Oct 2013 22:24:36 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Eric Botcazou writes: > This finally converts the Ada front-end. > > Tested on x86_64-suse-linux, applied on the mainline. > > > 2013-10-13 Nicolas Roche > Eric Botcazou > > * gcc-interface/Make-lang.in (ada/%.o): Replace individual rules with > generic rule and add $(POSTCOMPILE). > (ADA_DEPS): New. > (.adb.o): Add @$(ADA_DEPS). > (.ads.o): Likewise. > (ada/a-except.o): Likewise. > (ada/s-excdeb.): Likewise. > (ada/s-assert.o): Likewise. > (ada/a-tags.o): Likewise. > (ada_generated_files): New variable. > Use them as dependency order for GNAT1_ADA_OBJS and GNATBIND_OBJS. > (ADA_DEPFILES): New variable. > Include them. > (ada_OBJS): Define. This patch broke Solaris Ada bootstrap with SHELL=/bin/ksh on Solaris 10 and 11: gcc -c -g -gnatpg -gnatwns -gnata -W -Wall -nostdinc -I- -I. -Iada -I/vol/gcc/src/hg/trunk/local/gcc/ada -I/vol/gcc/src/hg/trunk/local/gcc/ada/gcc-interface /vol/gcc/src/hg/trunk/local/gcc/ada/ada.ads -o ada/ada.o sed: -e expression #1, char 1: unterminated `s' command ada/ada.o: /bin/ksh: ^D: not found /bin/ksh: ada/1: not found /bin/ksh: : cannot execute /bin/ksh: gp | tr -d '\015' | tr '\n' ' ': not found make: *** [ada/ada.o] Error 127 If you have make print the commands in ADA_DEPS, you see case ada/ada.o in *sdefault.o);; *)a="`echo ada/ada.o | sed -e 's/.o$/.ali/'`"; echo "ada/ada.o: `cat $a | sed -ne "s;^D \([a-z0-9_\.-]*\).*;ada/\1;gp" | tr -d '\015' | tr '\n' ' '`" > ada//.deps/ada.Po;; esac; So this boils down to case ada/ada.o in *sdefault.o) ;; *) a="`echo ada/ada.o | sed -e 's/.o$/.ali/'`"; \ echo "ada/ada.o: `cat $a | sed -ne "s;^D \([a-z0-9_\.-]*\).*;ada/\1;gp" | tr -d '\015' | tr '\n' ' '`" > ada//.deps/ada.Po ;; esac; Obviously /bin/ksh (both the old ksh88 in Solaris 10 and ksh93 in Solaris 11) interpret the echo line as echo "ada/ada.o: `cat $a | sed -ne "s; ^D \([a-z0-9_\.-]*\).*; ada/\1; gp" | tr -d '\015' | tr '\n' ' '`" > ada//.deps/ada.Po The following trivial patch avoids this and allows the i386-pc-solaris2.1[01] and sparc-sun-solaris2.11 bootstraps to finish. Ok for mainline? Rainer 2013-10-23 Rainer Orth * gcc-interface/Make-lang.in (ADA_DEPS): Fix quoting. diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -110,7 +110,7 @@ ADA_DEPS=case $@ in \ *sdefault.o);; \ *)a="`echo $@ | sed -e 's/.o$$/.ali/'`"; \ echo "$@: `cat $$a | \ - sed -ne "s;^D \([a-z0-9_\.-]*\).*;ada/\1;gp" | \ + sed -ne 's;^D \([a-z0-9_\.-]*\).*;ada/\1;gp' | \ tr -d '\015' | tr '\n' ' '`" > $(dir $@)/$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $@));; \ esac;