This is the mail archive of the
mailing list for the GCC project.
[java] fix some alpha/ia64 compile failures
- From: Richard Henderson <rth at redhat dot com>
- To: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Dec 2001 11:41:02 -0800
- Subject: [java] fix some alpha/ia64 compile failures
Any symbol that is not defined in the current object file must be
marked DECL_EXTERNAL. This fixes around 60 failures of the form
ld: gp-relative relocation against dynamic symbol _Jv_intClass
Committed as obvious; these symbols are defined in C++ in libjava.
There is one more similar failure (PR375) where the target of the
relocation is instead java::lang::Boolean::TRUE, but I have no
idea how to fix it. The DECL is created in add_field, and the
correct solution would appear to be to test
is_compiled_class (class) != 2
except that read_class always sets current_class to the class
being loaded, so is_compiled_class always equals 2 at this point.
* class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.121
diff -c -p -d -r1.121 class.c
*** class.c 2001/12/16 16:23:49 1.121
--- class.c 2001/12/21 19:22:16
*************** build_class_ref (type)
*** 1089,1094 ****
--- 1092,1098 ----
decl = build_decl (VAR_DECL, decl_name, class_type_node);
TREE_STATIC (decl) = 1;
TREE_PUBLIC (decl) = 1;
+ DECL_EXTERNAL (decl) = 1;
make_decl_rtl (decl, NULL);
if (is_compiled == 1)