This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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]

Re: using _FILE_OFFSET_BITS=64 with a non-gcc compiler


> From: Ulrich Drepper <drepper@redhat.com>
> Date: 13 Nov 2001 17:47:41 -0800

> There is no need to put something like this in the *manual*.

But something like this is already in the manual.  The manual already
warns that GCC 2.7 and 2.8 may not work.  And the manual already says
"You can use whatever compiler you like to compile programs that use
GNU libc".

This latter statement happens to be false now, as K&R compilers are no
longer supported.  But it's the sort of pragmatic information that
belongs in the manual, as it gives users a proper feeling for glibc's
scope.


> And saying gcc is the only compiler to use is wrong as well.  Any
> compiler which has the renaming capability can be used.  I don't
> know which compilers this are and don't really care.

I just checked, so I know which compilers they are: GCC version 2 and
later.  More precisely, it's the set of compilers that #define
__GNUC__ to an integer >= 2 and which implement __asm__ and
__USER_LABEL_PREFIX__ just like GCC2 does.  In theory, some other
compiler could do this, but that's not how things happen in practice,
and the phrase "GCC version 2 and later" captures the notion well
enough for user documentation.

Some users clearly do care about this stuff, and they'll find it
useful to have documentation.  So here's a reworded patch that
addresses the points discussed above.


--- install.texi	Sat May 26 23:53:41 2001
+++ install-fix.texi	Wed Nov 14 00:00:45 2001
@@ -32,6 +32,7 @@
 * Running make install::        How to install it once you've got it compiled.
 * Tools for Compilation::       You'll need these first.
 * Supported Configurations::    What it runs on, what it doesn't.
+* Supported Compilers::         What compilers to use with GNU libc.
 * Linux::                       Specific advice for Linux systems.
 * Reporting Bugs::              So they'll get fixed.
 @end menu
@@ -338,9 +339,8 @@
 As of the 2.2 release, GCC 2.95.2 or higher is required.  As of this
 writing, GCC 2.95.3 is the compiler we advise to use.
 
-You can use whatever compiler you like to compile programs that use GNU
-libc, but be aware that both GCC 2.7 and 2.8 have bugs in their
-floating-point support that may be triggered by the math library.
+@xref{Supported Compilers}, for how to compile programs that use the
+GNU C Library.
 
 For PPC you might need some patches even on top of the last GCC version.
 See the FAQ.
@@ -490,6 +490,39 @@
 and give GCC the appropriate @samp{-march=} and @samp{-mcpu=} compiler
 switches via @var{CFLAGS}.
 
+@node Supported Compilers
+@appendixsec Supported Compilers
+@cindex compilers supported
+
+You can use a wide variety of compilers to compile programs that use
+the GNU C Library.  However, there are some caveats:
+
+@itemize @bullet
+@item
+The GNU C Library requires support for Standard C; it supports neither
+K&R compilers nor modern compilers operating in traditional mode.
+
+@item
+More modern compilers tend to generate better code and diagnostics,
+and support more library features.  For example, GCC 3.1 (and later)
+and @w{ISO C99} compilers support the declaration of non-overlapping
+arrays, and the GNU C Library headers use this feature if it is
+available.
+
+@item
+The GNU C Library headers use compiler-dependent features to avoid
+infringing on the user name space (@pxref{Reserved Names}).  These
+should be easy to port to any compiler that has a way to implement the
+standard naming conventions, but currently only GCC 2 (and later) has
+been ported to.  With other compilers, the headers fall back on
+preprocessor tricks that don't have exactly the right semantics.
+
+@item
+GCC 2.7 and 2.8 have bugs in their floating-point support that may be
+triggered by the math library.
+
+@end itemize
+
 @node Linux
 @appendixsec Specific advice for Linux systems
 @cindex upgrading from libc5


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