[PATCH]: Ignore -fpic and -fPIC for HC11/HC12

Stephane Carrez Stephane.Carrez@worldnet.fr
Sun May 20 04:35:00 GMT 2001


Hi!

The -fpic and -fPIC is not supported for HC11/HC12.

I've committed the following patch (on the rs6000/AIX idea) to ignore
these options.

	Stephane

2001-05-20  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* config/m68hc11/m68hc11.c (m68hc11_override_options): Ignore
	the -fpic and -fPIC options, clear flag_pic.
Index: config/m68hc11/m68hc11.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68hc11/m68hc11.c,v
retrieving revision 1.2.2.9
diff -u -p -r1.2.2.9 m68hc11.c
--- m68hc11.c	2001/05/12 20:32:50	1.2.2.9
+++ m68hc11.c	2001/05/20 11:31:30
@@ -221,6 +221,14 @@ m68hc11_override_options ()
 	  sizeof (m68hc11_reg_valid_for_index));
   memset (m68hc11_reg_valid_for_base, 0, sizeof (m68hc11_reg_valid_for_base));
 
+  /* Compilation with -fpic generates a wrong code.  */
+  if (flag_pic)
+    {
+      warning ("-f%s ignored for 68HC11/68HC12 (not supported)",
+	       (flag_pic > 1) ? "PIC" : "pic");
+      flag_pic = 0;
+    }
+
   /* Configure for a 68hc11 processor.  */
   if (TARGET_M6811)
     {


More information about the Gcc-patches mailing list