aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2001-03-15 20:32:05 -0800
committerPer Bothner <bothner@gcc.gnu.org>2001-03-15 20:32:05 -0800
commit7d32abcdd215fd8d09764a4b96f407163cc8f309 (patch)
tree6759c9ca5b3f9354dd7cc01e84453603c3218085 /gcc/java
parent19f8e04bff25d9c494c95f994b3ec2b4cc7b7f77 (diff)
downloadgcc-7d32abcdd215fd8d09764a4b96f407163cc8f309.zip
gcc-7d32abcdd215fd8d09764a4b96f407163cc8f309.tar.gz
gcc-7d32abcdd215fd8d09764a4b96f407163cc8f309.tar.bz2
jvspec.c (lang_specific_driver): Fix -C handling.
* jvspec.c (lang_specific_driver): Fix -C handling. Check -save-temps to see if temp @FILE should be deleted. Follow-up to/fix for February 16 patch. From-SVN: r40530
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog4
-rw-r--r--gcc/java/jvspec.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 80e2102..ebc9592 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,9 @@
2001-03-13 Per Bothner <per@bothner.com>
+ * jvspec.c (lang_specific_driver): Fix -C handling.
+ Check -save-temps to see if temp @FILE should be deleted.
+ Follow-up to/fix for February 16 patch.
+
* verify.c (verify_jvm_instructions): Better error msgs for dup.
(type_stack_dup): Remove no-longer neded error check.
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c
index 684811a..f1d55c6 100644
--- a/gcc/java/jvspec.c
+++ b/gcc/java/jvspec.c
@@ -101,6 +101,8 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
/* If non-zero, the user gave us the `-v' flag. */
int saw_verbose_flag = 0;
+ int saw_save_temps = 0;
+
/* This will be 0 if we encounter a situation where we should not
link in libgcj. */
int library = 1;
@@ -302,6 +304,8 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
will_link = 0;
continue;
}
+ else if (strcmp (argv[i], "-save-temps") == 0)
+ saw_save_temps = 1;
else if (strcmp (argv[i], "-static-libgcc") == 0
|| strcmp (argv[i], "-static") == 0)
shared_libgcc = 0;
@@ -363,7 +367,8 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
if (saw_o)
fatal ("cannot specify both -C and -o");
}
- if (saw_o && java_files_count + (saw_C ? 0 : class_files_count) > 1)
+ if ((saw_o && java_files_count + class_files_count > 1)
+ || (saw_C && java_files_count > 1))
combine_inputs = 1;
if (class_files_count > 1)
combine_inputs = 1;
@@ -373,7 +378,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
filelist_filename = make_temp_file ("jx");
if (filelist_filename == NULL)
fatal ("cannot create temporary file");
- record_temp_file (filelist_filename, 1, 0);
+ record_temp_file (filelist_filename, ! saw_save_temps, 0);
filelist_file = fopen (filelist_filename, "w");
if (filelist_file == NULL)
pfatal_with_name (filelist_filename);