This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
A glibc 2.1 patch for egcs
- To: aj@arthur.rhein-neckar.de (Andreas Jaeger)
- Subject: A glibc 2.1 patch for egcs
- From: hjl@lucon.org (H.J. Lu)
- Date: Sat, 8 Aug 1998 07:49:41 -0700 (PDT)
- Cc: egcs@cygnus.com, libc-hacker@cygnus.com (GNU C Library)
>
>
> As some have already pointed out, there're some problems with glibc
> 2.0.95 and libio in egcs.
>
> If you recompile egcs (which is neccessary for c++ development when
> upgrading from glibc 2.0.x to glibc 2.1), you'll notice some problems.
> You've got to apply the following patch to the current egcs 1.1
> version (if you're using egcs 1.0.3a you need also to change the
> members of _IO_cookie_io_functions_t in libio/libio.h to use __PMT).
> You'll notice some other failures, like:
>
> ../../../egcs_1_1_branch/libio/iostream.cc: In method `class ostream & ostream::operator <<(char)':
> ../../../egcs_1_1_branch/libio/iostream.cc:385: `_pthread_cleanup_push_defer' undeclared (first use this function)
>
> Just add -D_GNU_SOURCE to the CFLAGS, or add a
> #define _GNU_SOURCE 1
> at the beginning of the files that fail to compile in libio.
>
> There're some new failures in the testsuite with errors like:
> /usr/include/string.h:38: declaration of `memcpy(void *, const void *, unsigned int)' throws different exceptions
> <internal>:38: previous declaration here
>
Here is a patch for egcs/config/mt-linux to add -D_GNU_SOURCE.
H.J.
----
Fri Aug 7 07:54:57 1998 H.J. Lu (hjl@gnu.org)
* mt-linux (CXXFLAGS_FOR_TARGET): Add -D_GNU_SOURCE.
Index: mt-linux
===================================================================
RCS file: /home/work/cvs/gnu/egcs/config/mt-linux,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 mt-linux
--- mt-linux 1998/04/22 16:28:45 1.1.1.2
+++ mt-linux 1998/08/07 14:00:00
@@ -1,2 +1,2 @@
# When using glibc 2 on Linux we must always use vtable thunks.
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -fvtable-thunks
+CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -fvtable-thunks -D_GNU_SOURCE