aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-02-18 20:36:51 +0000
committerRichard Stallman <rms@gnu.org>1992-02-18 20:36:51 +0000
commitef91d7e2b6f3823084998b1d984e0c4c10ff2c93 (patch)
tree1ffa1d3f3adaee5a4e4f23cbf1398cfc4645859e /gcc
parentf045b2c9946eb3e461401ea62c52be03961ec9b7 (diff)
downloadgcc-ef91d7e2b6f3823084998b1d984e0c4c10ff2c93.zip
gcc-ef91d7e2b6f3823084998b1d984e0c4c10ff2c93.tar.gz
gcc-ef91d7e2b6f3823084998b1d984e0c4c10ff2c93.tar.bz2
*** empty log message ***
From-SVN: r342
Diffstat (limited to 'gcc')
-rw-r--r--gcc/protoize.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/protoize.c b/gcc/protoize.c
index ed72c58..30e0eff 100644
--- a/gcc/protoize.c
+++ b/gcc/protoize.c
@@ -478,6 +478,13 @@ static int errors = 0;
/* ??? These comments should say what the flag mean as well as the options
that set them. */
+/* allow the user to pass the pathname of the gcc2 compiler as a
+ command line option, instead of relying on the fact that 'gcc' in
+ the path should be gcc2 */
+
+static char *compiler_pathname = "gcc";
+
+
static int version_flag = 0; /* Print our version number. */
static int quiet_flag = 0; /* Don't print messages normally. */
static int nochange_flag = 0; /* Don't convert, just say what files
@@ -1894,7 +1901,7 @@ munge_compile_params (params_list)
int param_count = 0;
const char *param;
- temp_params[param_count++] = "gcc";
+ temp_params[param_count++] = compiler_pathname;
for (;;)
{
while (isspace (*params_list))
@@ -4327,6 +4334,7 @@ do_processing ()
static struct option longopts[] =
{
{"version", 0, 0, 'V'},
+ {"pathname", 0, 0, 'p'},
{"quiet", 0, 0, 'q'},
{"silent", 0, 0, 'q'},
{"force", 0, 0, 'f'},
@@ -4378,9 +4386,9 @@ main (argc, argv)
while ((c = getopt_long (argc, argv,
#ifdef UNPROTOIZE
- "c:d:i:knNqVx:",
+ "c:d:i:knNp:qVx:",
#else
- "B:c:Cd:gklnNqVx:",
+ "B:c:Cd:gklnNp:qVx:",
#endif
longopts, &longind)) != EOF)
{
@@ -4388,6 +4396,9 @@ main (argc, argv)
c = longopts[longind].val;
switch (c)
{
+ case 'p':
+ compiler_pathname = optarg;
+ break;
case 'd':
directory_list
= string_list_cons (abspath (NULL, optarg), directory_list);