Commit a9657ce8 by Douglas B Rupp Committed by Richard Kenner

gcc.c (convert_filename): Add do_obj parameter.

	* gcc.c (convert_filename): Add do_obj parameter. Don't convert
	unless do_obj true.
	(process_command): Modify calls to convert_filename.

From-SVN: r47857
parent cb375790
Mon Dec 10 18:37:31 2001 Douglas B. Rupp <rupp@gnat.com>
* gcc.c (convert_filename): Add do_obj parameter. Don't convert
unless do_obj true.
(process_command): Modify calls to convert_filename.
2001-12-11 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 2001-12-11 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/sparc/sol2-sld-64.h: Include dbxelf.h again. * config/sparc/sol2-sld-64.h: Include dbxelf.h again.
......
...@@ -320,7 +320,7 @@ static void init_gcc_specs PARAMS ((struct obstack *, ...@@ -320,7 +320,7 @@ static void init_gcc_specs PARAMS ((struct obstack *,
const char *)); const char *));
#endif #endif
#if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX) #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
static const char *convert_filename PARAMS ((const char *, int)); static const char *convert_filename PARAMS ((const char *, int, int));
#endif #endif
/* The Specs Language /* The Specs Language
...@@ -2927,12 +2927,14 @@ static int *warn_std_ptr = 0; ...@@ -2927,12 +2927,14 @@ static int *warn_std_ptr = 0;
#if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX) #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
/* Convert NAME to a new name if it is the standard suffix. DO_EXE /* Convert NAME to a new name if it is the standard suffix. DO_EXE
is true if we should look for an executable suffix as well. */ is true if we should look for an executable suffix. DO_OBJ
is true if we should look for an object suffix. */
static const char * static const char *
convert_filename (name, do_exe) convert_filename (name, do_exe, do_obj)
const char *name; const char *name;
int do_exe ATTRIBUTE_UNUSED; int do_exe ATTRIBUTE_UNUSED;
int do_obj ATTRIBUTE_UNUSED;
{ {
#if defined(HAVE_TARGET_EXECUTABLE_SUFFIX) #if defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
int i; int i;
...@@ -2946,7 +2948,7 @@ convert_filename (name, do_exe) ...@@ -2946,7 +2948,7 @@ convert_filename (name, do_exe)
#ifdef HAVE_TARGET_OBJECT_SUFFIX #ifdef HAVE_TARGET_OBJECT_SUFFIX
/* Convert x.o to x.obj if TARGET_OBJECT_SUFFIX is ".obj". */ /* Convert x.o to x.obj if TARGET_OBJECT_SUFFIX is ".obj". */
if (len > 2 if (do_obj && len > 2
&& name[len - 2] == '.' && name[len - 2] == '.'
&& name[len - 1] == 'o') && name[len - 1] == 'o')
{ {
...@@ -3627,9 +3629,9 @@ process_command (argc, argv) ...@@ -3627,9 +3629,9 @@ process_command (argc, argv)
#endif #endif
#if defined(HAVE_TARGET_EXECUTABLE_SUFFIX) || defined(HAVE_TARGET_OBJECT_SUFFIX) #if defined(HAVE_TARGET_EXECUTABLE_SUFFIX) || defined(HAVE_TARGET_OBJECT_SUFFIX)
if (p[1] == 0) if (p[1] == 0)
argv[i + 1] = convert_filename (argv[i + 1], ! have_c); argv[i + 1] = convert_filename (argv[i + 1], ! have_c, 0);
else else
argv[i] = convert_filename (argv[i], ! have_c); argv[i] = convert_filename (argv[i], ! have_c, 0);
#endif #endif
goto normal_switch; goto normal_switch;
...@@ -3948,7 +3950,7 @@ process_command (argc, argv) ...@@ -3948,7 +3950,7 @@ process_command (argc, argv)
else else
{ {
#ifdef HAVE_TARGET_OBJECT_SUFFIX #ifdef HAVE_TARGET_OBJECT_SUFFIX
argv[i] = convert_filename (argv[i], 0); argv[i] = convert_filename (argv[i], 0, access (argv[i], F_OK));
#endif #endif
if (strcmp (argv[i], "-") != 0 && access (argv[i], F_OK) < 0) if (strcmp (argv[i], "-") != 0 && access (argv[i], F_OK) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment