This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fix bootstrap on i?86-apple-darwin with libjava


Mike Stump wrote:
On Feb 24, 2007, at 1:44 PM, Andreas Tobler wrote:
the current repository is broken for libjava builds on i?86-apple-darwin*.

You patch would have broken non-darwin platforms due to the mis-nested #if { #endif, I think.

?



We already had a well worn patch to resolve this issue, attached below, so I checked it in.

Great, thanks for my expensive time.


I checked this into mainline and 4.2.


------------------------------------------------------------------------


2007-02-24 Mike Stump <mrs@apple.com>

	* config/i386/i386.c (output_pic_addr_const): Stubify optimized
	symbols.

Doing diffs in config:
--- config/i386/i386.c.~1~ 2007-02-21 20:23:25.000000000 -0800
+++ config/i386/i386.c 2007-02-24 14:16:03.000000000 -0800
@@ -7582,7 +7582,24 @@ output_pic_addr_const (FILE *file, rtx x
break;
case SYMBOL_REF:
- output_addr_const (file, x);
+ if (! TARGET_MACHO || TARGET_64BIT)
+ output_addr_const (file, x);
+ else
+ {
+ const char *name = XSTR (x, 0);
+
+ /* Mark the decl as referenced so that cgraph will output the function. */
+ if (SYMBOL_REF_DECL (x))
+ mark_decl_referenced (SYMBOL_REF_DECL (x));
+
+ if (MACHOPIC_INDIRECT
+#if TARGET_MACHO
+ && machopic_classify_symbol (x) == MACHOPIC_UNDEFINED_FUNCTION
+#endif

This seems wrong to me. The #endif should be below.


+	      )
+	    name = machopic_indirection_name (x, /*stub_p=*/true);

Here I mean. Cause the machopic_indirection_name is not known to a non darwin platform.


+	  assemble_name (file, name);
+	}
       if (!TARGET_MACHO && code == 'P' && ! SYMBOL_REF_LOCAL_P (x))
 	fputs ("@PLT", file);
       break;

Thanks for the comment. Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]