From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15182 invoked by alias); 25 Nov 2004 21:05:40 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 14776 invoked from network); 25 Nov 2004 21:05:30 -0000 Received: from unknown (HELO mail2.codesourcery.com) (66.160.135.55) by sourceware.org with SMTP; 25 Nov 2004 21:05:30 -0000 Received: (qmail 25350 invoked from network); 25 Nov 2004 21:05:28 -0000 Received: from admin.voldemort.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.9) by mail2.codesourcery.com with SMTP; 25 Nov 2004 21:05:29 -0000 Received: (qmail 9603 invoked from network); 25 Nov 2004 21:05:28 -0000 Received: from localhost (HELO taltos.codesourcery.com) (zack@127.0.0.1) by mail.codesourcery.com with SMTP; 25 Nov 2004 21:05:28 -0000 Received: by taltos.codesourcery.com (sSMTP sendmail emulation); Thu, 25 Nov 2004 13:05:28 -0800 To: Richard Sandiford Cc: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305) References: <87is7tejx4.fsf@redhat.com> From: Zack Weinberg Date: Thu, 25 Nov 2004 21:05:00 -0000 In-Reply-To: <87is7tejx4.fsf@redhat.com> (Richard Sandiford's message of "Thu, 25 Nov 2004 20:46:31 +0000") Message-ID: <87hdndmyg8.fsf@codesourcery.com> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-11/txt/msg00345.txt.bz2 I think this is a fine idea (though I cannot approve it) and I would like to encourage you also to break the version number proper and the date stamp out of gcc/version.c. If we could have two syntax-free files somewhere (suggest config/gcc-version, config/gcc-datestamp) that were parsed by everything that cares, then we could eliminate all the remaining copies of those numbers, and people maintaining modified versions of GCC wouldn't have merge conflicts in version.c every time they updated from the official sources. Oh, and it would be one fewer reason for gcc/Makefile to rebuild everything after a cvs update. By syntax-free I mean that these files should contain the literal text 3.4.2 and 20041124 (respectively, for example) and nothing else, so that using them is as simple as gcc version.c -c ... other flags ... \ -DVERSION=`cat /path/to/source/config/gcc-version` \ -DDATESTAMP=`cat /path/to/source/config/gcc-datestamp` quotation being handled by macros inside version.c. zw