From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: S.Lo@orl.co.uk (Sai-Lai Lo) Cc: egcs@cygnus.com Subject: egcs 1.0 patch for RedHat 5.0 Date: Wed, 10 Dec 1997 10:58:00 -0000 Message-id: References: <199712091815.SAA07392@santaka.cam-orl.co.uk> X-SW-Source: 1997-12/msg00606.html > 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 " | ${CC-cc} -E -) >/dev/null 2>&1 || + { + echo "#include_next " > 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 }