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: 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


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