This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: [ecj] Patch: FYI: simplify building with ecj.jar


Tom Tromey writes:
 
 > Index: gcc/java/ChangeLog
 > from  Tom Tromey  <tromey@redhat.com>
 > 
 > 	* jvgenmain.c (main): Handle -findirect-dispatch.
 > 	* jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
 > 	jvgenmain.

 > @@ -130,13 +139,18 @@
 >    fprintf (stream, "int main (int argc, const char **argv)\n");
 >    fprintf (stream, "{\n");
 >    fprintf (stream, "   _Jv_Compiler_Properties = props;\n");
 > -  fprintf (stream, "   extern void *%s;\n", mangled_classname);
 > -  fprintf (stream, "   JvRunMain (%s, argc, argv);\n", mangled_classname);
 > +  if (indirect)
 > +    fprintf (stream, "   JvRunMainName (\"%s\", argc, argv);\n", classname);
 > +  else
 > +    {
 > +      fprintf (stream, "   extern void *%s;\n", mangled_classname);
 > +      fprintf (stream, "   JvRunMain (%s, argc, argv);\n", mangled_classname);
 > +    }

This breaks libgcj_bc.

Unfortunately, JvRunMainName is not defined in libgcj_bc.so, and
therefore executables compiled with indirect dispatch have a
dependency on libgcj.so.9:


  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libgcj_bc.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcj.so.9]

Andrew.


2007-03-07  Andrew Haley  <aph@redhat.com>

	* libgcj_bc.c (JvRunMainName): Declare.	

Index: libgcj_bc.c
===================================================================
--- libgcj_bc.c	(revision 122619)
+++ libgcj_bc.c	(working copy)
@@ -58,6 +58,7 @@
 /* Symbols used by jvgenmain (-fmain).  */
 
 void JvRunMain () {}
+void JvRunMainName () {}
 const char **_Jv_Compiler_Properties;
 
 /* Functions used by -fjni.  */


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