From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31644 invoked by alias); 6 Sep 2005 14:10:12 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 31393 invoked by uid 22791); 6 Sep 2005 14:09:59 -0000 Received: from rocky.hq.eso.org (HELO rocky.hq.eso.org) (134.171.42.43) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 06 Sep 2005 14:09:59 +0000 Received: from mercury.hq.eso.org (mercury.hq.eso.org [134.171.7.20]) by rocky.hq.eso.org (8.12.10+Sun/8.12.10) with ESMTP id j86E9thx018757 for ; Tue, 6 Sep 2005 16:09:55 +0200 (CEST) Received: from forth.hq.eso.org (forth.hq.eso.org [134.171.45.18]) by mercury.hq.eso.org (8.12.10+Sun/8.12.10) with ESMTP id j86E9fma014904 for ; Tue, 6 Sep 2005 16:09:41 +0200 (MEST) Received: from [134.171.40.9] (nb011986.hq.eso.org [134.171.40.9]) (authenticated bits=0) by forth.hq.eso.org (8.12.8/8.12.8) with ESMTP id j86E9fXQ027284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 6 Sep 2005 16:09:41 +0200 Message-ID: <431DA325.1070307@eso.org> Date: Tue, 06 Sep 2005 14:10:00 -0000 From: Neil Ferguson User-Agent: Mozilla Thunderbird 1.0.6-1.1.fc3 (X11/20050720) MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: Minimum GCC version to safely compile 64-bit binaries for AMD64? References: <4315EE33.3090900@eso.org> <20050904001929.GA30341@dementia.proulx.com> In-Reply-To: <20050904001929.GA30341@dementia.proulx.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-09/txt/msg00032.txt.bz2 Bob Proulx wrote: > Neil Ferguson wrote: > >>Can GCC 3.3 compile 64-bit binaries that work reliably on AMD64? > > You might find it comforting to know that the Debian GNU/Linux port to > amd64 compiled almost all of the thousands of packages in Debian using > the gcc 3.3.5 compiler. (It's unofficial because Debian has yet to > include the port in their mainstream yet. That part is happening now.) Thank you; that *is* good to know. >>What would the minimum recommended version of GCC be? (I'd be curious to >>know even if GCC 3.3 is OK, for my own historical interest.) > > Of course as bug fixes and enhancements are made the best version > increases version number. So while 3.3 is probably okay depending > upon what you are doing that does not mean that bugs don't exist. > Version 3.4 is better and version 4.0 is better and so on and so on. I understand. > Probably the best thing is to just push forward and see how it goes. > > If this is your first push into 64-bit space then the biggest problems > will be type safety in your code. It is our first push into 64-bit, and yes, you're right :) I continued my investigation after posting to the list, and came across a couple of small points that might be useful to anyone else faced with the issue. First, the lowest version number of GCC recommended in the AMD documentation was GCC 3.3.3. Link to "Compiler Usage Guidelines for 64-bit Operating Systems on AMD64 Platforms": http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32035.pdf see pages 17 (64-bit mode) and 28 (32-bit mode). These sections contain guidelines on useful compilation options and so forth. There are also a couple of papers in the Proceedings of the GCC Developers Summit 2003 which may be of interest - "Porting to 64-bit GNU/Linux Systems" by Andreas Jaeger (pages 107-120) and "Porting GCC to the AMD64 Architecture" by Jan Hubicka (pages 79-105). These used to be available here: http://www.linux.org.uk/~ajh/gcc/gccsummit-2003-proceedings.pdf but the link wasn't working when I tried it (I happen to have paper copies on my desk). Neil.