From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44218 invoked by alias); 22 Sep 2017 09:49:32 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 44201 invoked by uid 89); 22 Sep 2017 09:49:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=HX-Greylist:Fri X-Spam-User: qpsmtpd, 2 recipients 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 ESMTP; Fri, 22 Sep 2017 09:49:30 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 22DEE4E4CB; Fri, 22 Sep 2017 09:49:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 22DEE4E4CB Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 956B95C542; Fri, 22 Sep 2017 09:49:06 +0000 (UTC) Subject: [PATCH] bfd/version.h: Add rationale for BFD_VERSION_DATE (Re: meaning of "Automatic date update in version.in" commits) To: Alan Modra , Petr Ovtchenkov References: <8740f2a7-1300-3116-f34b-5487a8cd8b2b@redhat.com> <20170921161743.3ddc6bb9@void-ptr.info> <20170921184615.6b1e5d44@void-ptr.info> <426b9fdf-a854-6d5f-b296-df71ad0c1561@ubuntu.com> <20170921192619.412ff148@void-ptr.info> <20170921163358.twez7kbewucjalwi@adacore.com> <20170921195153.4ed9f319@void-ptr.info> <20170921170031.czr6to24sarve2or@adacore.com> <20170921203857.06810b63@void-ptr.info> <20170921235936.GB25070@bubble.grove.modra.org> Cc: Joel Brobecker , Matthias Klose , Simon Marchi , Matt Rice , Fiodar Stryzhniou , Andreas Schwab , Binutils , GDB From: Pedro Alves Message-ID: <0f7c205c-7ecb-bc49-bf15-c753e576cdc0@redhat.com> Date: Fri, 22 Sep 2017 09:49:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170921235936.GB25070@bubble.grove.modra.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-09/txt/msg00105.txt.bz2 Hi, On 09/22/2017 12:59 AM, Alan Modra wrote: > On Thu, Sep 21, 2017 at 08:38:57PM +0300, Petr Ovtchenkov wrote: >> 1. Explicit "Automatic date update in version.in" commits litter commits tree, >> but useless. All required info already present in git. >> [Thanks for Ian Lance Taylor for the background!] > > It isn't useless. People build binutils from a variety of sources, > git, tarballs, distro sources, then report bugs. We want something > that can easily identify the source they used. The bfd version plus > date is usually good enough for that purpose. > >> Let's remove this "Automatic date update in version.in" commits. > > No. That won't happen unless we have something equivalent. And it > must work *without* git. > >> 2. I see a lot of suggestions "Let's push date to SONAME, the date we >> will take from ....". >> >> I trying to prevent such "solutions". Because it's not a solution, but >> origin of another problems. > > The date is in the soname because people naturally expect shared > libraries with the same soname to have compatible ABIs. During > development, we could bump the bfd version on every ABI change, but > that's just another thing contributors and maintainers would need to > remember. It's much easier for all if the soname contains the date. > Again, it's not perfect but is good enough. > > None of this is going to change just because you don't like a date > stamp in the source. You do realize that a bisect uses a binary > search, don't you? So doubling the number of commits just needs one > extra build/test step on average. > > Yes, it would be nice if the automatic date stamp update didn't happen > when the most recent commit was a date update.. > I like this summary. How about we put something like that in bfd/version.h ? I assume that the bot is just replacing the line with BFD_VERSION_DATE instead of regenerating the whole file from scratch, but that's just guessing. (I don't have sourceware shell access; I have no idea how the auto updater is implemented.) ------------ >From 08c8f26323a978608256cd574321d9f39658cc51 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 22 Sep 2017 10:17:03 +0100 Subject: [PATCH] bfd/version.h: Add rationale for BFD_VERSION_DATE bfd/ChangeLog: yyyy-mm-dd Pedro Alves Alan Modra * version.h: Add comment. --- bfd/version.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bfd/version.h b/bfd/version.h index 955269f..7d9151a 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,3 +1,21 @@ +/* The date below is automatically updated every day by a bot. During + development, we include the date in the tools' version strings + (visible in 'ld -v' etc.) because people build binutils from a + variety of sources - git, tarballs, distro sources - and we want + something that can easily identify the source they used when they + report bugs. The bfd version plus date is usually good enough for + that purpose. + + During development, this date ends up in libbfd and libopcodes + sonames because people naturally expect shared libraries with the + same soname to have compatible ABIs. We could bump the bfd version + on every ABI change, but that's just another thing contributors and + maintainers would need to remember. Instead, it's much easier for + all if the soname contains the date. This is not perfect but is + good enough. + + In releases, the date is not included in either version strings or + sonames. */ #define BFD_VERSION_DATE 20170920 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ -- 2.5.5