This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs 1.0 patch for RedHat 5.0
- To: S dot Lo at orl dot co dot uk (Sai-Lai Lo)
- Subject: egcs 1.0 patch for RedHat 5.0
- From: hjl at lucon dot org (H.J. Lu)
- Date: Wed, 10 Dec 1997 10:10:26 -0800 (PST)
- Cc: egcs at cygnus dot com
- Reply-To: egcs at cygnus dot com
> I'm interested in the patch one needs to use egcs 1.0 on RH 5. Where can I
> get it?
This is a patch for egcs 1.0 to compile under RedHat 5.0. BTW,
your still need binutils 2.8.1.0.15 or above. See INSTALL for
details.
H.J.
-----
Tue Dec 9 21:51:32 1997 H.J. Lu (hjl@gnu.org)
* configure.in (target frags): Add *-linux-gnu.
Fri Dec 5 16:22:15 1997 H.J. Lu (hjl@gnu.org)
* streambuf.cc (streambuf::~streambuf): Don't delete _lock
for _IO_stdin/_IO_stdout/_IO_stderr.
diff -ur egcs-1.0/libio/configure.in egcs/libio/configure.in
--- egcs-1.0/libio/configure.in Tue Dec 9 10:43:38 1997
+++ egcs/libio/configure.in Tue Dec 9 21:41:44 1997
@@ -64,6 +64,17 @@
cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
;;
+ *-linux-gnu)
+ # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0.
+ # Create a wrapper if necessary.
+ (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
+ {
+ echo "#include_next <libc-lock.h>" > libc-lock.h
+ echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h
+ echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h
+
+ }
+ ;;
esac
for frag in ${frags}; do
diff -ur egcs-1.0/libio/streambuf.cc egcs/libio/streambuf.cc
--- egcs-1.0/libio/streambuf.cc Tue Dec 9 10:38:10 1997
+++ egcs/libio/streambuf.cc Tue Dec 9 21:14:06 1997
@@ -220,7 +220,8 @@
{
_IO_default_finish(this,0);
#ifdef _IO_MTSAFE_IO
- delete _lock;
+ if (this != _IO_stdin && this != _IO_stdout && this != _IO_stderr)
+ delete _lock;
#endif
}