This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Don't assume large file support in adaint.h on IRIX 5
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Arnaud Charlet <charlet at adacore dot com>
- Date: Mon, 23 Nov 2009 14:05:36 +0100
- Subject: PATCH: Don't assume large file support in adaint.h on IRIX 5
When I tried to bootstrap mainline on IRIX 5.3 after half a year, it
failed in stage 1 linking gnatbind:
ld: ERROR 33: Unresolved text symbol "fopen64" -- 1st referenced by ada/adaint.o.
ld: INFO 60: Output file removed because of error.
collect2: ld returned 1 exit status
I turns out that this happens since ada/adaint.h assumes every IRIX has
large file support, which is wrong for IRIX 5. For the moment, I've
fixed this by checking for both __sgi and _LFAPI. This allowed the
bootstrap to continue (final results will have to wait for about a week,
though).
Apart from that, I'm pretty sure the approach to large file support
taken there is completely wrong: this is properly handled by the
AC_SYS_LARGEFILE autoconf test, but I won't touch this right now.
Ok for mainline?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2009-11-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* adaint.h: Assume large file support on IRIX only if _LFAPI.
Index: gcc/ada/adaint.h
===================================================================
--- gcc/ada/adaint.h (revision 154216)
+++ gcc/ada/adaint.h (working copy)
@@ -47,7 +47,7 @@
determine at compile time what support the system offers for large files.
For now we just list the platforms we have manually tested. */
-#if defined (__GLIBC__) || defined (sun) || defined (__sgi)
+#if defined (__GLIBC__) || defined (sun) || (defined (__sgi) && defined(_LFAPI))
#define GNAT_FOPEN fopen64
#define GNAT_STAT stat64
#define GNAT_FSTAT fstat64