From patchwork Tue Nov 2 22:13:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 69927 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]) by ozlabs.org (Postfix) with SMTP id CC836B70E9 for ; Wed, 3 Nov 2010 09:13:14 +1100 (EST) Received: (qmail 16780 invoked by alias); 2 Nov 2010 22:13:13 -0000 Received: (qmail 16769 invoked by uid 22791); 2 Nov 2010 22:13:13 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Nov 2010 22:13:08 +0000 Received: from wpaz29.hot.corp.google.com (wpaz29.hot.corp.google.com [172.24.198.93]) by smtp-out.google.com with ESMTP id oA2MD5cT020763 for ; Tue, 2 Nov 2010 15:13:05 -0700 Received: from iwn10 (iwn10.prod.google.com [10.241.68.74]) by wpaz29.hot.corp.google.com with ESMTP id oA2MC6Ci002230 for ; Tue, 2 Nov 2010 15:13:03 -0700 Received: by iwn10 with SMTP id 10so9586446iwn.5 for ; Tue, 02 Nov 2010 15:13:03 -0700 (PDT) Received: by 10.231.157.211 with SMTP id c19mr1943784ibx.155.1288735983589; Tue, 02 Nov 2010 15:13:03 -0700 (PDT) Received: from coign.google.com (dhcp-172-22-123-203.mtv.corp.google.com [172.22.123.203]) by mx.google.com with ESMTPS id gy41sm10406874ibb.23.2010.11.02.15.13.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Nov 2010 15:13:02 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org Subject: PATCH RFA: Build system: Use AC_SYS_LARGEFILE Date: Tue, 02 Nov 2010 15:13:00 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-System-Of-Record: true X-IsSubscribed: yes 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 The include/simple-object.h file I added earlier today uses off_t in function declarations. That breaks some 32-bit hosts because the libiberty configure script uses AC_SYS_LARGEFILE and the gcc configure script does not. The size of off_t changes depending on the value of the preprocessor macro _FILE_OFFSET_BITS, and that is changed by the configure script when AC_SYS_LARGEFILE is used. There are various possibilities here, but the simplest would seem to be to use AC_SYS_LARGEFILE in the configure script for gcc. We should use it in libcpp also, as libcpp does file I/O and should be able to handle large files. This patch does that. It has passed stage 2 in my bootstrap on x86_64-unknown-linux-gnu, so I don't think it is horribly broken. I of course do not expect any changes on that target, but I don't have a 32-bit hosted build readily available. As far as I can see this patch is completely safe. We've been using AC_SYS_LARGEFILE in the libiberty configure script for quite a while. Is this patch OK to commit if it completes bootstrap and testing? Thanks. Ian gcc/: 2010-11-02 Ian Lance Taylor * configure.ac: Use AC_SYS_LARGEFILE. * configure: Rebuild. * config.in: Rebuild. libcpp/: 2010-11-02 Ian Lance Taylor * configure.ac: Use AC_SYS_LARGEFILE. * configure: Rebuild. * config.in: Rebuild. Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 166189) +++ gcc/configure.ac (working copy) @@ -304,6 +304,8 @@ AC_USE_SYSTEM_EXTENSIONS AC_PROG_CPP AC_C_INLINE +AC_SYS_LARGEFILE + # sizeof(char) is 1 by definition. AC_CHECK_SIZEOF(void *) AC_CHECK_SIZEOF(short) Index: libcpp/configure.ac =================================================================== --- libcpp/configure.ac (revision 166218) +++ libcpp/configure.ac (working copy) @@ -14,6 +14,8 @@ AC_PROG_CC AC_PROG_CXX AC_PROG_RANLIB +AC_SYS_LARGEFILE + # See if we are building gcc with C++. # Do this early so setting lang to C++ affects following tests AC_ARG_ENABLE(build-with-cxx,