collect -EL/-EB patch

Jeffrey A Law law@cygnus.com
Tue Oct 13 10:27:00 GMT 1998


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




More information about the Gcc-patches mailing list