This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
collect -EL/-EB patch
- To: egcs-patches at cygnus dot com
- Subject: collect -EL/-EB patch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 13 Oct 1998 11:26:40 -0600
- Reply-To: law at cygnus dot com
I've installed this patch. Basically, if we fail to pass -EL/-EB through
collect2, then any collected ctor/dtor/eh lists can be compiled with the
wrong endianness.
* collect2.c (main): Pass -EL/-EB through to the compiler.
Index: collect2.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/collect2.c,v
retrieving revision 1.107
diff -c -3 -p -r1.107 collect2.c
*** collect2.c 1998/10/09 23:02:28 1.107
--- collect2.c 1998/10/13 17:24:25
*************** main (argc, argv)
*** 1189,1194 ****
--- 1189,1196 ----
char *q = extract_string (&p);
if (*q == '-' && (q[1] == 'm' || q[1] == 'f'))
*c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q));
+ if (strcmp (q, "-EL") == 0 || strcmp (q, "-EB") == 0)
+ *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q));
if (strncmp (q, "-shared", sizeof ("-shared") - 1) == 0)
shared_obj = 1;
}
Jeff Law (law@cygnus.com)
Cygnus Solutions EGCS GNU Compiler System
http://www.cygnus.com http://www.cygnus.com/egcs