[patch, configures] Unify AC_SYS_LARGEFILE exception across dirs

Jan Kratochvil jan.kratochvil@redhat.com
Wed Nov 4 23:22:00 GMT 2009


Hi,

there was an accepted patch of mine:
	[patch] Include AC_SYS_LARGEFILE for libiberty
	http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01100.html
	[patch] Include AC_SYS_LARGEFILE everywhere
	http://www.sourceware.org/ml/binutils/2008-08/msg00003.html

But it was found it required to have exceptions in bfd/ by Joel Brobecker:
	Re: [RFA] do not try large-files support by default on 32bit sparc-solaris
	http://www.sourceware.org/ml/binutils/2008-11/msg00140.html
	disable largefile support on x86-solaris by default
	http://www.sourceware.org/ml/binutils/2008-11/msg00248.html

It also required to unify the exception also in binutils/ by Nick Clifton:
	http://sourceware.org/bugzilla/show_bug.cgi?id=9992

As the same exception is now required in gdb/:
	[patch] AC_SYS_LARGEFILE
	http://sourceware.org/ml/gdb-patches/2009-11/msg00047.html

It was suggested by Tom Tromey a config/ macro would be appropriate:
	Re: [patch] AC_SYS_LARGEFILE
	http://sourceware.org/ml/gdb-patches/2009-11/msg00058.html

Therefore supplying it here.  I do not have the technical GCC SVN check-in
rights.  Please mirror the changes to config/ and libiberty/ of sourceware CVS.
Ran regression tests on x86_64-fedora11-linux-gnu (x86_64 is a bit pointless).
Did not re-run it on i386 due to some local host problems FAILing the build.

It would be also OK to just check-in the single new file in config/ .

Included for libiberty/ although it probably does not need it as its API does
not expose AC_SYS_LARGEFILE-dependent data structures.  Still a future API
extension could hit such AC_SYS_LARGEFILE-application incompatibility.

Included for lto-plugin/ although it probably does not need it as it just uses
libiberty/ .  It is there more as a unification.

Included for libgfortran/ as it uses libiberty/ to make it compatible.
Currently there is probably no AC_SYS_LARGEFILE-dependent type in its API,
though.


Thanks,
Jan


libgfortran/
2009-11-04  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* configure.ac: Call now ACX_LARGEFILE.
	* configure: Regenerate.
	* aclocal.m4: Include ../config/largefile.m4.

libiberty/
2009-11-04  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* configure.ac: Call now ACX_LARGEFILE.
	* configure: Regenerate.
	* aclocal.m4: Include ../config/largefile.m4.

lto-plugin/
2009-11-04  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* configure.ac: Call now ACX_LARGEFILE.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

config/
2009-11-04  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* largefile.m4: New file.

--- libgfortran/configure.ac	(revision 153883)
+++ libgfortran/configure.ac	(working copy)
@@ -203,7 +203,7 @@ AC_SUBST(extra_ldflags_libgfortran)
 # error message and bail out.
 LIBGFOR_WORKING_GFORTRAN
 
-AC_SYS_LARGEFILE
+ACX_LARGEFILE
 AC_TYPE_OFF_T
 
 # check header files
--- libiberty/configure.ac	(revision 153883)
+++ libiberty/configure.ac	(working copy)
@@ -130,7 +130,7 @@ fi
 
 GCC_NO_EXECUTABLES
 AC_PROG_CC
-AC_SYS_LARGEFILE
+ACX_LARGEFILE
 AC_PROG_CPP_WERROR
 
 ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wc++-compat \
--- lto-plugin/configure.ac	(revision 153883)
+++ lto-plugin/configure.ac	(working copy)
@@ -4,7 +4,7 @@ GCC_TOPLEV_SUBDIRS
 AM_INIT_AUTOMAKE([foreign])
 AM_MAINTAINER_MODE
 AC_PROG_CC
-AC_SYS_LARGEFILE
+ACX_LARGEFILE
 AC_ARG_VAR(LIBELFLIBS,[How to link libelf])
 AC_ARG_VAR(LIBELFINC,[How to find libelf include files])
 AM_PROG_LIBTOOL
--- config/largefile.m4	(revision 0)
+++ config/largefile.m4	(revision 0)
@@ -0,0 +1,27 @@
+# This macro wraps AC_SYS_LARGEFILE with one exception keeping the decision
+# compatible across the sourceware subdirectories.
+
+AC_DEFUN([ACX_LARGEFILE],[dnl
+case "${target}" in
+changequote(,)dnl
+  sparc-*-solaris*|i[3-7]86-*-solaris*)
+changequote([,])dnl
+    # On native 32bit sparc and ia32 solaris, large-file and procfs support
+    # are mutually exclusive; and without procfs support, the elf module
+    # cannot provide certain routines such as elfcore_write_prpsinfo
+    # or elfcore_write_prstatus.  So unless the user explicitly requested
+    # large-file support through the --enable-largefile switch, disable
+    # large-file support in favor of procfs support.
+    # PR 9992/binutils: We have to duplicate the behaviour of bfd's
+    # configure script so that all the directories agree on the size of
+    # structures used to describe files.
+    if test "${target}" = "${host}" -a "$enable_largefile" != 'yes'; then
+      if test "$plugins" = "no"; then
+        enable_largefile="no"
+      fi
+    fi
+    ;;
+esac
+
+AC_SYS_LARGEFILE
+])



More information about the Gcc-patches mailing list