This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH RFA: Build system: Use AC_SYS_LARGEFILE


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  <iant@google.com>

	* configure.ac: Use AC_SYS_LARGEFILE.
	* configure: Rebuild.
	* config.in: Rebuild.

libcpp/:

2010-11-02  Ian Lance Taylor  <iant@google.com>

	* 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,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]