diff options
author | Alexandre Oliva <oliva@dcc.unicamp.br> | 1998-09-28 15:52:01 +0000 |
---|---|---|
committer | Alexandre Oliva <oliva@gcc.gnu.org> | 1998-09-28 15:52:01 +0000 |
commit | ab339d62c08bbac39c8f06a6daa0bcfc9acdf0a7 (patch) | |
tree | 2bad8419651e95a4a3dc2aec3bd669571187570a /gcc/gcc.c | |
parent | 42820a49ddba6a9dc0d9acbde04adcf23a733619 (diff) | |
download | gcc-ab339d62c08bbac39c8f06a6daa0bcfc9acdf0a7.zip gcc-ab339d62c08bbac39c8f06a6daa0bcfc9acdf0a7.tar.gz gcc-ab339d62c08bbac39c8f06a6daa0bcfc9acdf0a7.tar.bz2 |
configure.in: new flags --with-ld and --with-as...
* configure.in: new flags --with-ld and --with-as, equivalent
to setting LD and AS environment variables. Test whether
specified arguments are GNU commands, and report them with
checking messages. Use the specified AS for configure
tests too.
* configure: ditto
* acconfig.h: add DEFAULT_ASSEMBLER and DEFAULT_LINKER
* config.in: ditto
* gcc.c (find_a_file): when looking for `as' and `ld', return
the DEFAULT program if it exists
* collect2.c (main): use DEFAULT_LINKER if it exists
* gcc.c (find_a_file): the test for existence of a full
pathname was reversed
From-SVN: r22629
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -1983,6 +1983,26 @@ find_a_file (pprefix, name, mode) struct prefix_list *pl; int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1; +#ifdef DEFAULT_ASSEMBLER + if (! strcmp(name, "as") && access (DEFAULT_ASSEMBLER, mode) == 0) { + name = DEFAULT_ASSEMBLER; + len = strlen(name)+1; + temp = xmalloc (len); + strcpy (temp, name); + return temp; + } +#endif + +#ifdef DEFAULT_LINKER + if (! strcmp(name, "ld") && access (DEFAULT_LINKER, mode) == 0) { + name = DEFAULT_LINKER; + len = strlen(name)+1; + temp = xmalloc (len); + strcpy (temp, name); + return temp; + } +#endif + if (machine_suffix) len += strlen (machine_suffix); @@ -1995,7 +2015,7 @@ find_a_file (pprefix, name, mode) || (DIR_SEPARATOR == '\\' && name[1] == ':' && (name[2] == DIR_SEPARATOR || name[2] == '/'))) { - if (access (name, mode)) + if (access (name, mode) == 0) { strcpy (temp, name); return temp; |