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]

[Digital UNIX V4.0B] Java PATCH: gcj fails to link


Linking a trivial hello.java with gcj 2.95 and the current CVS libgcj on
Digital UNIX V4.0B fails with many mips-tfile errors:

% gcj -v --main=hello -rpath /vol/gnu/lib -o hello hello.java

Reading specs from /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/specs
Reading specs from /vol/gnu/lib/libgcj.spec
rename spec lib to liborig
gcc version 2.95 19990728 (release)
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/jc1 hello.java -quiet -g1 -version -o /tmp/ccW3poja.s
GNU Java version 2.95 19990728 (release) (alpha-dec-osf4.0b) compiled by GNU C version 2.95 19990728 (release).
 as -g -nocpp -O0 -o /tmp/ccUKQjhi.o /tmp/ccW3poja.s
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/mips-tfile -v -o /tmp/ccUKQjhi.o /tmp/ccW3poja.s
mips-tfile version 2.95 19990728 (release)
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/jvgenmain hello /tmp/ccM4SDZP.i
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/cc1 /tmp/ccM4SDZP.i -quiet -dumpbase hello.c -g1 -version -o /tmp/ccW1yITq.s
GNU C version 2.95 19990728 (release) (alpha-dec-osf4.0b) compiled by GNU C version 2.95 19990728 (release).
 as -g -nocpp -O0 -o /tmp/ccQH282K.o /tmp/ccW1yITq.s
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/mips-tfile -v -o /tmp/ccQH282K.o /tmp/ccW3poja.s
mips-tfile version 2.95 19990728 (release)
mips-tfile, /tmp/ccW3poja.s:34 Did not find a PDR block for __5hello
line:		.ent __5hello

mips-tfile, /tmp/ccW3poja.s:65 Cannot find .end block for __5hello
line:		.end __5hello

mips-tfile, /tmp/ccW3poja.s:66 Invalid .stabs/.stabn directive, value not found
line:	 #.stabs "__5hello:F10",36,0,65537,__5hello

mips-tfile, /tmp/ccW3poja.s:69 Did not find a PDR block for main__5helloPt6JArray1ZPQ34java4lang6String
line:		.ent main__5helloPt6JArray1ZPQ34java4lang6String

mips-tfile, /tmp/ccW3poja.s:77 Invalid .stabs/.stabn directive, value not found
line:		 #.stabn 68,0,2,$LM1

mips-tfile, /tmp/ccW3poja.s:94 Invalid .stabs/.stabn directive, value not found
line:		 #.stabn 68,0,3,$LM2

mips-tfile, /tmp/ccW3poja.s:110 Invalid .stabs/.stabn directive, value not found
line:		 #.stabn 68,0,4,$LM3

mips-tfile, /tmp/ccW3poja.s:119 Cannot find .end block for main__5helloPt6JArray1ZPQ34java4lang6String
line:		.end main__5helloPt6JArray1ZPQ34java4lang6String

mips-tfile, /tmp/ccW3poja.s:120 Invalid .stabs/.stabn directive, value not found
line:	 #.stabs "main__5helloPt6JArray1ZPQ34java4lang6String:F10",36,0,262146,main__5helloPt6JArray1ZPQ34java4lang6String

mips-tfile, /tmp/ccW3poja.s:179 Invalid .stabs/.stabn directive, value not found
line:	 #.stabs "_CD_hello:S23",38,0,3,_CD_hello

mips-tfile, /tmp/ccW3poja.s:184 Invalid .stabs/.stabn directive, value not found
line:	 #.stabs "_CT_hello:S36=ar1;0;1;6",38,0,2,_CT_hello

mips-tfile, /tmp/ccW3poja.s:229 Did not find a PDR block for _GLOBAL_$I$__5hello
line:		.ent _GLOBAL_$I$__5hello

mips-tfile, /tmp/ccW3poja.s:255 Cannot find .end block for _GLOBAL_$I$__5hello
line:		.end _GLOBAL_$I$__5hello

mips-tfile, /tmp/ccW3poja.s:256 Invalid .stabs/.stabn directive, value not found
line:	 #.stabs "_GLOBAL_$I$__5hello:F10",36,0,2,_GLOBAL_$I$__5hello

mips-tfile, /tmp/ccW3poja.s:389 Segmentation fault
line:		.long	0x0

This happens since the wrong assembler source is passed to the second
invokation of mips-tfile, namely the .s file generated from hello.java, not
the one generated by jvgenmain:

jc1 hello.java -quiet -g1 -version -o /tmp/ccW3poja.s
as -g -nocpp -O0 -o /tmp/ccUKQjhi.o /tmp/ccW3poja.s
                         ==              ==
mips-tfile -v -o /tmp/ccUKQjhi.o /tmp/ccW3poja.s

jvgenmain hello /tmp/ccM4SDZP.i
cc1 /tmp/ccM4SDZP.i -quiet -dumpbase hello.c -g1 -version -o /tmp/ccW1yITq.s
as -g -nocpp -O0 -o /tmp/ccQH282K.o /tmp/ccW1yITq.s
                         ==              !=
mips-tfile -v -o /tmp/ccQH282K.o /tmp/ccW3poja.s

The following patch fixes this: it brings jvgenmain_spec in line with
gcc.c's specs in default_compilers[].  I'm not sure if this fix is
completely right, since now the same .s file name is used for both
invokations of as/mips-tfile:

Reading specs from /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/specs
Reading specs from /vol/gnu/lib/libgcj.spec
rename spec lib to liborig
gcc version 2.95 19990728 (release)
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/jc1 hello.java -quiet -g1 -version -o /tmp/cc3TqOkb.s
GNU Java version 2.95 19990728 (release) (alpha-dec-osf4.0b) compiled by GNU C version 2.95 19990728 (release).
 as -g -nocpp -O0 -o /tmp/cca6FO1d.o /tmp/cc3TqOkb.s
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/mips-tfile -v -o /tmp/cca6FO1d.o /tmp/cc3TqOkb.s
mips-tfile version 2.95 19990728 (release)
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/jvgenmain hello /tmp/ccSy12vB.i
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/cc1 /tmp/ccSy12vB.i -quiet -dumpbase hello.c -g1 -version -o /tmp/cc3TqOkb.s
GNU C version 2.95 19990728 (release) (alpha-dec-osf4.0b) compiled by GNU C version 2.95 19990728 (release).
 as -g -nocpp -O0 -o /tmp/ccAwGdoO.o /tmp/cc3TqOkb.s
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/mips-tfile -v -o /tmp/ccAwGdoO.o /tmp/cc3TqOkb.s
mips-tfile version 2.95 19990728 (release)
 /vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95/collect2 -G 8 -O1 -call_shared -rpath /vol/gnu/lib -o hello /usr/lib/cmplrs/cc/crt0.o -L/vol/gnu/lib/gcc-lib/alpha-dec-osf4.0b/2.95 -L/usr/lib/cmplrs/cc -L/vol/gnu/lib /tmp/cca6FO1d.o /tmp/ccAwGdoO.o -lgcc -lgcj -lm -lgcjgc -lzgcj -lc -lgcc

jc1 hello.java -quiet -g1 -version -o /tmp/cc3TqOkb.s
as -g -nocpp -O0 -o /tmp/cca6FO1d.o /tmp/cc3TqOkb.s
mips-tfile -v -o /tmp/cca6FO1d.o /tmp/cc3TqOkb.s

jvgenmain hello /tmp/ccSy12vB.i
cc1 /tmp/ccSy12vB.i -quiet -dumpbase hello.c -g1 -version -o /tmp/cc3TqOkb.s
as -g -nocpp -O0 -o /tmp/ccAwGdoO.o /tmp/cc3TqOkb.s
mips-tfile -v -o /tmp/ccAwGdoO.o /tmp/cc3TqOkb.s

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

Email: ro@TechFak.Uni-Bielefeld.DE


Tue Aug 10 19:00:03 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* jvspec.c (jvgenmain_spec): Use %g.s for assembler files.

Index: jvspec.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/jvspec.c,v
retrieving revision 1.17.4.2
diff -u -p -r1.17.4.2 jvspec.c
--- jvspec.c	1999/06/29 02:09:48	1.17.4.2
+++ jvspec.c	1999/08/10 17:00:53
@@ -61,8 +61,8 @@ char jvgenmain_spec[] =
 		   %{v:-version} %{pg:-p} %{p} %{f*}\
 		   %{aux-info*}\
 		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%U.s}} |\n\
-              %{!S:as %a %Y -o %d%w%u%O %{!pipe:%U.s} %A\n }";
+		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
+              %{!S:as %a %Y -o %d%w%u%O %{!pipe:%g.s} %A\n }";
 
 /* Return full path name of spec file if it is in DIR, or NULL if
    not.  */


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