From patchwork Mon May 4 10:05:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 467548 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 8AD24140285 for ; Mon, 4 May 2015 20:06:02 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Exx7OL05; 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:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=l870+7pn+fRqRJJmc bPPxkmReCW2n6q0QXmJFzRQj/80cKad+KZJ8rZUEPij4a7vTy5SDoJ2ilO3wWAZd s9QPWt8/ARTmQ3QdD7IrJ5V3VYhy4clbC2D/WSqVA1jj5IuI0nKjcD4drUAOA/WU AjuSd38cvjuNkBwb3eDrVKupFM= 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:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=puUjfzNFU37GTWTFDQyAv9Y uDpQ=; b=Exx7OL05HVnoUyxrpCEpkals06vZfXa3+uvO2jzpCREZOOZwnLWc+dQ tJH6Lx/CkPwUbRlM3nDsNz2mAum0S1KNBlFfTpWFzV7v1EPs/VvHdyTWQClcCxcF S2dVBoW8nU3HfKddhcAMUPRiXceNjdi+GysnHZ32K39np8aCE1G0= Received: (qmail 44369 invoked by alias); 4 May 2015 10:05:56 -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 44353 invoked by uid 89); 4 May 2015 10:05:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 04 May 2015 10:05:53 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id F23A18E770; Mon, 4 May 2015 10:05:51 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-89.ams2.redhat.com [10.36.116.89]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t44A5nOo008661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 4 May 2015 06:05:51 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t44A5lt7027662; Mon, 4 May 2015 12:05:48 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t44A5kg6027661; Mon, 4 May 2015 12:05:46 +0200 Date: Mon, 4 May 2015 12:05:46 +0200 From: Jakub Jelinek To: Richard Biener Cc: Rainer Orth , "H.J. Lu" , gcc-patches@gcc.gnu.org Subject: Re: [committed, gcc-5-branch] Set DEV-PHASE to prerelease Message-ID: <20150504100546.GC1751@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20150423233152.GA9034@intel.com> <20150424060006.GI1751@tucnak.redhat.com> <20150504092106.GB1751@tucnak.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes On Mon, May 04, 2015 at 11:31:11AM +0200, Richard Biener wrote: > On Mon, 4 May 2015, Jakub Jelinek wrote: > > > On Mon, May 04, 2015 at 11:13:51AM +0200, Rainer Orth wrote: > > > Jakub Jelinek writes: > > > > > > > On Thu, Apr 23, 2015 at 04:31:52PM -0700, H.J. Lu wrote: > > > >> Hi, > > > >> > > > >> I checked this patch into gcc-5-branch. > > > > > > > > That's wrong according to https://gcc.gnu.org/develop.html#num_scheme > > > > > > HJ has a point, though: with DEV-PHASE remaining empty, all post-5.1.0 > > > versions of gcc identify as 5.1.1, with no way of telling them apart, > > > like datestamp and revison. > > > > That suggests we should change > > DATESTAMP_s := "\"$(if $(DEVPHASE_c), $(DATESTAMP_c))\"" > > so that it would expand to DATESTAMP_c also if DEVPHASE_c is empty, > > but BASEVER_c does not end with .0 > > Yes. Here is a patch to do that, ok for trunk/5? 2015-05-04 Jakub Jelinek * Makefile.in (PATCHLEVEL_c): New variable. (DATESTAMP_s, REVISION_s): If PATCHLEVEL_c is not 0, expand the same way as if DEVPHASE_c was non-empty. Jakub --- gcc/Makefile.in.jj 2015-04-12 21:50:12.000000000 +0200 +++ gcc/Makefile.in 2015-05-04 12:03:03.394797230 +0200 @@ -828,14 +828,20 @@ endif version := $(BASEVER_c) +PATCHLEVEL_c := \ + $(shell echo $(BASEVER_c) | sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\)$$/\1/') + + # For use in version.c - double quoted strings, with appropriate # surrounding punctuation and spaces, and with the datestamp and # development phase collapsed to the empty string in release mode -# (i.e. if DEVPHASE_c is empty). The space immediately after the -# comma in the $(if ...) constructs is significant - do not remove it. +# (i.e. if DEVPHASE_c is empty and PATCHLEVEL_c is 0). The space +# immediately after the comma in the $(if ...) constructs is +# significant - do not remove it. BASEVER_s := "\"$(BASEVER_c)\"" DEVPHASE_s := "\"$(if $(DEVPHASE_c), ($(DEVPHASE_c)))\"" -DATESTAMP_s := "\"$(if $(DEVPHASE_c), $(DATESTAMP_c))\"" +DATESTAMP_s := \ + "\"$(if $(DEVPHASE_c)$(filter-out 0,$(PATCHLEVEL_c)), $(DATESTAMP_c))\"" PKGVERSION_s:= "\"@PKGVERSION@\"" BUGURL_s := "\"@REPORT_BUGS_TO@\"" @@ -843,7 +849,8 @@ PKGVERSION := @PKGVERSION@ BUGURL_TEXI := @REPORT_BUGS_TEXI@ ifdef REVISION_c -REVISION_s := "\"$(if $(DEVPHASE_c), $(REVISION_c))\"" +REVISION_s := \ + "\"$(if $(DEVPHASE_c)$(filter-out 0,$(PATCHLEVEL_c)), $(REVISION_c))\"" else REVISION_s := "\"\"" endif