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]

3.0.1 PATCH: Allow jvgenmain to work with ASM_FINAL_SPEC


As explained in

	http://gcc.gnu.org/ml/java/2001-07/msg00203.html

the use of %umain etc. breaks on platforms (like alpha-dec-osf* and various
mips ones) that use ASM_FINAL_SPEC, since that spec cannot know about the
`main.s' or similar suffix.

The patch below fixes this, and (together with a companion patch that
avoids passing -fencoding etc. to cc1) allows the libjava testsuite
compilations to succeed on alpha-dec-osf5.1.  The osf.h change is necessary
since with jvgenmain there are (at least) two assembler files involved in
the compilation, and when mips-tfile is invoked from %A in the
jvgenmain_spec, %g refers to the wrong one.

With this patch, the companion referred to above (to be submitted
immediately) and

	http://gcc.gnu.org/ml/gcc-patches/2001-07/msg01381.html

a bootstrap on alpha-dec-osf5.1 with --enable-libgcj completes successfully
without regressions and fixes all previous libjava testsuite compilation
failures. 

This change breaks -save-temps in the presence of --main right now, but I
plan to submit another patch to properly fix this soon.  This will probably
consist of splitting jvspec.c (jvgenmain_spec) into two (one for the
invokation of jvgenmain, the other for the invokation of cc1 and as) and
temporarily redefining %i to %imain before running the second of those
specs.

Ok for branch and mainline?

	Rainer

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

Email: ro@TechFak.Uni-Bielefeld.DE


Thu Jul 19 22:05:27 2001  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
	ASM_FINAL_SPEC.
	* config/alpha/osf.h (ASM_FINAL_SPEC): Use %U.s to refer to input
	file.

===================================================================
RCS file: gcc/config/alpha/RCS/osf.h,v
retrieving revision 1.1
diff -up -r1.1 gcc/config/alpha/osf.h
--- gcc/config/alpha/osf.h	2001/06/11 16:15:19	1.1
+++ gcc/config/alpha/osf.h	2001/06/11 14:15:19
@@ -118,7 +118,7 @@ Boston, MA 02111-1307, USA.  */
 		%{K: -I %b.o~} \
 		%{!K: %{save-temps: -I %b.o~}} \
 		%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
-		%{.s:%i} %{!.s:%g.s}}}"
+		%{.s:%i} %{!.s:%U.s}}}"
 
 #else
 #define ASM_FINAL_SPEC "\
@@ -127,7 +127,7 @@ Boston, MA 02111-1307, USA.  */
 		%{K: -I %b.o~} \
 		%{!K: %{save-temps: -I %b.o~}} \
 		%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
-		%{.s:%i} %{!.s:%g.s}}}"
+		%{.s:%i} %{!.s:%U.s}}}"
 
 #endif
 
===================================================================
RCS file: gcc/java/RCS/jvspec.c,v
retrieving revision 1.1
diff -up -r1.1 gcc/java/jvspec.c
--- gcc/java/jvspec.c	2001/05/18 19:02:58	1.1
+++ gcc/java/jvspec.c	2001/05/18 17:02:58
@@ -52,8 +52,8 @@ int lang_specific_extra_outfiles = 0;
 int shared_libgcc = 1;
 
 const char jvgenmain_spec[] =
-  "jvgenmain %{D*} %i %{!pipe:%umain.i} |\n\
-   cc1 %{!pipe:%Umain.i} %1 \
+  "jvgenmain %{D*} %i %{!pipe:%u.i} |\n\
+   cc1 %{!pipe:%U.i} %1 \
 		   %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
 		   %{g*} %{O*} \
 		   %{v:-version} %{pg:-p} %{p}\
@@ -66,8 +66,8 @@ const char jvgenmain_spec[] =
 		   %{f*} -fdollars-in-identifiers\
 		   %{aux-info*}\
 		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%Umain.s}} |\n\
-              %{!S:as %a %Y -o %d%w%umain%O %{!pipe:%Umain.s} %A\n }";
+		   %{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 }";
 
 /* 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]