This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
web-patch: quasi-patch for 2.95 g77/dyn linker bug.
- To: egcs-patches at egcs dot cygnus dot com
- Subject: web-patch: quasi-patch for 2.95 g77/dyn linker bug.
- From: Robert Lipe <robertlipe at usa dot net>
- Date: Sat, 10 Jul 1999 22:58:12 -0500
- References: <19990703231627.X2898@rjlhome.sco.com> <14639.931331930@upchuck.cygnus.com>
This patch introduces a slightly different spin to htdocs/install/. It
contains a patch for a very specific OS bug that is believed to affect a
small enough population as to make disturbing 2.95 unwise.
If there are no objections by late Monday, I'll commit it and we can
iterate on it from there. I'd really like to at least have this
documented for the 2.95 release.
robertl> it's undebatably a dynamic linker bug. The good news (for EGCS
robertl> [ munch ]
robertl> With this patch applied, a make check-g77
robertl> RUNTESTFLAGS='--target_board unix{-fPIC} execute.exp' will pass
robertl> 470 out of 470 tests.
jeff> Let's go with Craig's request -- ie, document the OpenServer problem
jeff> on the web pages and include this patch as a workaround.
When Craig, Jeff, and I agree so closely on something, it has to be right. :-)
Here are the patches.
Index: sco_osr5_g77.patch
===================================================================
RCS file: sco_osr5_g77.patch
diff -N sco_osr5_g77.patch
--- /dev/null Sat Dec 5 20:30:03 1998
+++ sco_osr5_g77.patch Sat Jul 10 20:53:11 1999
@@ -0,0 +1,27 @@
+Index: libf2c/libI77/lread.c
+===================================================================
+RCS file: /cvs/egcs/egcs/libf2c/libI77/lread.c,v
+retrieving revision 1.4
+diff -u -p -r1.4 lread.c
+--- lread.c 1999/03/17 08:21:19 1.4
++++ lread.c 1999/07/11 03:42:33
+@@ -70,7 +70,18 @@ un_getc(int x, FILE *f__cf)
+ #endif
+ { return ungetc(x,f__cf); }
+ #else
+-#define un_getc ungetc
++ /* The OpenServer 5.0.5 dynamic linker aborts on g77 programs
++ * that link against this object. Simply changing the shape of
++ * this relocation is enough to circumvent the bug in the dynamic
++ * linker.
++ */
++#if 0
++ #define un_getc ungetc
++#else
++ typedef int (blah) (int c, FILE *stream);
++ blah *un_getc = ungetc;
++#endif
++
+ #ifdef KR_headers
+ extern int ungetc();
+ #else
Index: specific.html
===================================================================
RCS file: /cvs/egcs/wwwdocs/htdocs/install/specific.html,v
retrieving revision 1.34
diff -c -5 -p -u -r1.34 specific.html
--- specific.html 1999/07/09 11:49:43 1.34
+++ specific.html 1999/07/11 03:53:12
@@ -64,11 +64,23 @@ available. You must install both
</a>
and
<a href="ftp://ftp.sco.com/SLS/">
OSS499A
</a>.
-
+
+<p> The dynamic linker in OpenServer 5.0.5 (earlier versions may show
+the same problem) aborts on certain G77 program. It's particluarly
+likely to be triggered by building Fortran code with the -fPIC flag.
+Although it's concievable that the error could be triggered by other
+code, only G77-compiled code has been observed to cause this abort.
+If you are getting core dumps immediately upon execution of your
+g77 program - and especially if it's compiled -fPIC - try applying
+`sco_osr5_g77.patch' from this directory to your libf2c and rebuilding
+GCC. Affected faults, when analyzed in a debugger, will show a stack
+backtrace with a faul toccurring in rtld() and the program running as
+/usr/lib/ld.so.1. This problem has been reported to SCO engineering
+and will hopefully be addressed in later releases.
<p><b>i?86-*-udk</b><br>
This target emulates the SCO Universal Development Kit and requires that
package be installed. (If it is installed, you will have a <code>/udk/usr/ccs/bin/cc </code>file present.) It's very much like the i?86-*-unixware7* target