Tested on i686-pc-cygwin32 with make bootstrap and make check with no regressions; also built as powerpc-wrs-vxworks cross. DTRT in both cases. * config/alpha/vms.h: Change OBJECT_SUFFIX and EXECUTABLE_SUFFIX to TARGET_OBJECT_SUFFIX and TARGET_EXECUTABLE_SUFFIX. * config/i386/cygwin.h: Likewise. * config/i386/mingw32.h: Likewise. * config/vax/vms.h: Likewise. * config/alpha/xm-vms.h: Change OBJECT_SUFFIX and EXECUTABLE_SUFFIX to HOST_OBJECT_SUFFIX and HOST_EXECUTABLE_SUFFIX. * config/i386/xm-cygwin.h: Likewise. * config/i386/xm-djgpp.h: Likewise. * config/i386/xm-dos.h: Likewise. * config/i386/xm-mingw32.h: Likewise. * config/i386/xm-os2.h: Likewise. * config/rs6000/xm-cygwin.h: Likewise. * config/vax/xm-vms.h: Likewise. * config/winnt/xm-winnt.h: Likewise. * cccp.c (main): Use TARGET_OBJECT_SUFFIX instead of OBJECT_SUFFIX. * cppinit.c (initialize_dependency_output): Likewise. * collect2.c (find_a_file): Look for files matching the extension HOST_EXECUTABLE_SUFFIX instead of EXECUTABLE_SUFFIX. * gcc.c (DEFAULT_SWITCH_CURTAILS_COMPILATION): Depend on TARGET_EXECUTABLE_SUFFIX. (find_a_file): Use HOST_EXECUTABLE_SUFFIX. (convert_filename): Use TARGET_ suffixes throughout. (process_command): Likewise. (do_spec_1): Likewise. * java/lang.c (init_parse): Likewise. * gcc.texi : Document four new options matching the pattern (HOST|TARGET)_(OBJECT|EXECUTABLE)_SUFFIX. Remove documentation for deleted defines OBJECT_SUFFIX and EXECUTABLE_SUFFIX. diff -c3pr gcc-2.95.3.orig/gcc/cccp.c gcc-2.95.3.new/gcc/cccp.c *** gcc-2.95.3.orig/gcc/cccp.c Thu Jan 25 14:03:00 2001 --- gcc-2.95.3.new/gcc/cccp.c Thu Mar 29 22:34:03 2001 *************** *** 1,6 **** /* C Compatible Compiler Preprocessor (CCCP) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000 Free Software Foundation, Inc. Written by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 --- 1,6 ---- /* C Compatible Compiler Preprocessor (CCCP) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001 Free Software Foundation, Inc. Written by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 *************** typedef unsigned char U_CHAR; *** 58,67 **** #endif /* By default, the suffix for object files is ".o". */ ! #ifdef OBJECT_SUFFIX ! # define HAVE_OBJECT_SUFFIX #else ! # define OBJECT_SUFFIX ".o" #endif /* VMS-specific definitions */ --- 58,67 ---- #endif /* By default, the suffix for object files is ".o". */ ! #ifdef TARGET_OBJECT_SUFFIX ! # define HAVE_TARGET_OBJECT_SUFFIX #else ! # define TARGET_OBJECT_SUFFIX ".o" #endif /* VMS-specific definitions */ *************** main (argc, argv) *** 2028,2034 **** q = p + (len - 4); /* Supply our own suffix. */ ! strcpy (q, OBJECT_SUFFIX); deps_output (p, ':'); deps_output (in_fname, ' '); --- 2028,2034 ---- q = p + (len - 4); /* Supply our own suffix. */ ! strcpy (q, TARGET_OBJECT_SUFFIX); deps_output (p, ':'); deps_output (in_fname, ' '); diff -c3pr gcc-2.95.3.orig/gcc/collect2.c gcc-2.95.3.new/gcc/collect2.c *** gcc-2.95.3.orig/gcc/collect2.c Thu Jan 25 14:03:01 2001 --- gcc-2.95.3.new/gcc/collect2.c Thu Mar 29 22:34:02 2001 *************** *** 1,7 **** /* Collect static initialization info into data structures that can be traversed by C++ initialization and finalization routines. ! Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 ! Free Software Foundation, Inc. Contributed by Chris Smith (csmith@convex.com). Heavily modified by Michael Meissner (meissner@cygnus.com), Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com). --- 1,7 ---- /* Collect static initialization info into data structures that can be traversed by C++ initialization and finalization routines. ! Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ! 2001 Free Software Foundation, Inc. Contributed by Chris Smith (csmith@convex.com). Heavily modified by Michael Meissner (meissner@cygnus.com), Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com). *************** find_a_file (pprefix, name) *** 815,822 **** if (debug) fprintf (stderr, "Looking for '%s'\n", name); ! #ifdef EXECUTABLE_SUFFIX ! len += strlen (EXECUTABLE_SUFFIX); #endif temp = xmalloc (len); --- 815,822 ---- if (debug) fprintf (stderr, "Looking for '%s'\n", name); ! #ifdef HOST_EXECUTABLE_SUFFIX ! len += strlen (HOST_EXECUTABLE_SUFFIX); #endif temp = xmalloc (len); *************** find_a_file (pprefix, name) *** 839,849 **** return temp; } ! #ifdef EXECUTABLE_SUFFIX /* Some systems have a suffix for executable files. So try appending that. */ strcpy (temp, name); ! strcat (temp, EXECUTABLE_SUFFIX); if (access (temp, X_OK) == 0) return temp; --- 839,849 ---- return temp; } ! #ifdef HOST_EXECUTABLE_SUFFIX /* Some systems have a suffix for executable files. So try appending that. */ strcpy (temp, name); ! strcat (temp, HOST_EXECUTABLE_SUFFIX); if (access (temp, X_OK) == 0) return temp; *************** find_a_file (pprefix, name) *** 861,870 **** if (access (temp, X_OK) == 0) return temp; ! #ifdef EXECUTABLE_SUFFIX /* Some systems have a suffix for executable files. So try appending that. */ ! strcat (temp, EXECUTABLE_SUFFIX); if (access (temp, X_OK) == 0) return temp; --- 861,870 ---- if (access (temp, X_OK) == 0) return temp; ! #ifdef HOST_EXECUTABLE_SUFFIX /* Some systems have a suffix for executable files. So try appending that. */ ! strcat (temp, HOST_EXECUTABLE_SUFFIX); if (access (temp, X_OK) == 0) return temp; diff -c3pr gcc-2.95.3.orig/gcc/config/alpha/vms.h gcc-2.95.3.new/gcc/config/alpha/vms.h *** gcc-2.95.3.orig/gcc/config/alpha/vms.h Mon Jun 21 21:15:14 1999 --- gcc-2.95.3.new/gcc/config/alpha/vms.h Thu Mar 29 01:24:19 2001 *************** *** 1,5 **** /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc. This file is part of GNU CC. *************** the Free Software Foundation, 59 Temple *** 19,24 **** --- 19,27 ---- Boston, MA 02111-1307, USA. */ #define OPEN_VMS 1 + + #define TARGET_OBJECT_SUFFIX ".obj" + #define TARGET_EXECUTABLE_SUFFIX ".exe" /* This enables certain macros in alpha.h, which will make an indirect reference to an external symbol an invalid address. This needs to be diff -c3pr gcc-2.95.3.orig/gcc/config/alpha/xm-vms.h gcc-2.95.3.new/gcc/config/alpha/xm-vms.h *** gcc-2.95.3.orig/gcc/config/alpha/xm-vms.h Wed Dec 16 21:01:15 1998 --- gcc-2.95.3.new/gcc/config/alpha/xm-vms.h Thu Mar 29 01:24:19 2001 *************** *** 1,5 **** /* Configuration for GNU C-compiler for openVMS/Alpha. ! Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Klaus Kaempf (kkaempf@progis.de). This file is part of GNU CC. --- 1,5 ---- /* Configuration for GNU C-compiler for openVMS/Alpha. ! Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. Contributed by Klaus Kaempf (kkaempf@progis.de). This file is part of GNU CC. *************** extern void *alloca (size_t); *** 89,93 **** extern char *alloca (unsigned int); #endif ! #define OBJECT_SUFFIX ".obj" ! #define EXECUTABLE_SUFFIX ".exe" --- 89,93 ---- extern char *alloca (unsigned int); #endif ! #define HOST_OBJECT_SUFFIX ".obj" ! #define HOST_EXECUTABLE_SUFFIX ".exe" diff -c3pr gcc-2.95.3.orig/gcc/config/i386/cygwin.h gcc-2.95.3.new/gcc/config/i386/cygwin.h *** gcc-2.95.3.orig/gcc/config/i386/cygwin.h Mon Jun 21 05:54:43 1999 --- gcc-2.95.3.new/gcc/config/i386/cygwin.h Thu Mar 29 22:34:02 2001 *************** *** 2,8 **** hosting on Windows NT 3.x, using a Unix style C library and tools, as distinct from winnt.h, which is used to build GCC for use with a windows style library and tool set and uses the Microsoft tools. ! Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 2,9 ---- hosting on Windows NT 3.x, using a Unix style C library and tools, as distinct from winnt.h, which is used to build GCC for use with a windows style library and tool set and uses the Microsoft tools. ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001 Free Software ! Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 26,31 **** --- 27,34 ---- #define DBX_DEBUGGING_INFO #define SDB_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + + #define TARGET_EXECUTABLE_SUFFIX ".exe" #include "i386/gas.h" #include "dbxcoff.h" diff -c3pr gcc-2.95.3.orig/gcc/config/i386/mingw32.h gcc-2.95.3.new/gcc/config/i386/mingw32.h *** gcc-2.95.3.orig/gcc/config/i386/mingw32.h Mon Apr 12 19:18:06 1999 --- gcc-2.95.3.new/gcc/config/i386/mingw32.h Thu Mar 29 01:24:32 2001 *************** *** 2,8 **** hosting on Windows32, using GNU tools and the Windows32 API Library, as distinct from winnt.h, which is used to build GCC for use with a windows style library and tool set and uses the Microsoft tools. ! Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 2,8 ---- hosting on Windows32, using GNU tools and the Windows32 API Library, as distinct from winnt.h, which is used to build GCC for use with a windows style library and tool set and uses the Microsoft tools. ! Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 25,30 **** --- 25,32 ---- specs. */ #include "i386/cygwin.h" + + #define TARGET_EXECUTABLE_SUFFIX ".exe" /* Please keep changes to CPP_PREDEFINES in sync with i386/crtdll. The only difference between the two should be __MSVCRT__ needed to diff -c3pr gcc-2.95.3.orig/gcc/config/i386/xm-cygwin.h gcc-2.95.3.new/gcc/config/i386/xm-cygwin.h *** gcc-2.95.3.orig/gcc/config/i386/xm-cygwin.h Thu Apr 22 15:40:55 1999 --- gcc-2.95.3.new/gcc/config/i386/xm-cygwin.h Thu Mar 29 22:34:02 2001 *************** *** 1,6 **** /* Configuration for GNU C-compiler for hosting on Windows NT. using a unix style C library. ! Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,7 ---- /* Configuration for GNU C-compiler for hosting on Windows NT. using a unix style C library. ! Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001 Free Software ! Foundation, Inc. This file is part of GNU CC. *************** along with GNU CC; see the file COPYING. *** 19,25 **** the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define EXECUTABLE_SUFFIX ".exe" #define NO_SYS_SIGLIST 1 /* We support both "/" and "\" since everybody tests both but we --- 20,26 ---- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ! #define HOST_EXECUTABLE_SUFFIX ".exe" #define NO_SYS_SIGLIST 1 /* We support both "/" and "\" since everybody tests both but we diff -c3pr gcc-2.95.3.orig/gcc/config/i386/xm-djgpp.h gcc-2.95.3.new/gcc/config/i386/xm-djgpp.h *** gcc-2.95.3.orig/gcc/config/i386/xm-djgpp.h Mon Jun 21 06:24:33 1999 --- gcc-2.95.3.new/gcc/config/i386/xm-djgpp.h Thu Mar 29 01:24:36 2001 *************** *** 1,5 **** /* Configuration for GNU C-compiler for Intel 80386 running DJGPP. ! Copyright (C) 1988, 1996, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Configuration for GNU C-compiler for Intel 80386 running DJGPP. ! Copyright (C) 1988, 1996, 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 25,31 **** /* Use semicolons to separate elements of a path. */ #define PATH_SEPARATOR ';' ! #define EXECUTABLE_SUFFIX ".exe" /* Even though we support "/", allow "\" since everybody tests both. */ #define DIR_SEPARATOR '/' --- 25,31 ---- /* Use semicolons to separate elements of a path. */ #define PATH_SEPARATOR ';' ! #define HOST_EXECUTABLE_SUFFIX ".exe" /* Even though we support "/", allow "\" since everybody tests both. */ #define DIR_SEPARATOR '/' diff -c3pr gcc-2.95.3.orig/gcc/config/i386/xm-dos.h gcc-2.95.3.new/gcc/config/i386/xm-dos.h *** gcc-2.95.3.orig/gcc/config/i386/xm-dos.h Sat Apr 10 05:27:12 1999 --- gcc-2.95.3.new/gcc/config/i386/xm-dos.h Thu Mar 29 01:24:36 2001 *************** *** 1,5 **** /* Configuration for GNU C-compiler for Intel 80386 running DOS. ! Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Configuration for GNU C-compiler for Intel 80386 running DOS. ! Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 31,37 **** #define HAVE_DOS_BASED_FILE_SYSTEM /* Suffix for executable file names. */ ! #define EXECUTABLE_SUFFIX ".exe" #define MKTEMP_EACH_FILE 1 --- 31,37 ---- #define HAVE_DOS_BASED_FILE_SYSTEM /* Suffix for executable file names. */ ! #define HOST_EXECUTABLE_SUFFIX ".exe" #define MKTEMP_EACH_FILE 1 diff -c3pr gcc-2.95.3.orig/gcc/config/i386/xm-mingw32.h gcc-2.95.3.new/gcc/config/i386/xm-mingw32.h *** gcc-2.95.3.orig/gcc/config/i386/xm-mingw32.h Sat Apr 10 05:27:13 1999 --- gcc-2.95.3.new/gcc/config/i386/xm-mingw32.h Thu Mar 29 01:24:37 2001 *************** *** 1,6 **** /* Configuration for GNU C-compiler for hosting on Windows32. using GNU tools and the Windows32 API Library. ! Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Configuration for GNU C-compiler for hosting on Windows32. using GNU tools and the Windows32 API Library. ! Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 42,48 **** like Cygwin does. */ #define HAVE_DOS_BASED_FILE_SYSTEM ! #define EXECUTABLE_SUFFIX ".exe" #undef PATH_SEPARATOR #define PATH_SEPARATOR ';' --- 42,48 ---- like Cygwin does. */ #define HAVE_DOS_BASED_FILE_SYSTEM ! #define HOST_EXECUTABLE_SUFFIX ".exe" #undef PATH_SEPARATOR #define PATH_SEPARATOR ';' diff -c3pr gcc-2.95.3.orig/gcc/config/i386/xm-os2.h gcc-2.95.3.new/gcc/config/i386/xm-os2.h *** gcc-2.95.3.orig/gcc/config/i386/xm-os2.h Sat Apr 10 05:27:14 1999 --- gcc-2.95.3.new/gcc/config/i386/xm-os2.h Thu Mar 29 22:34:02 2001 *************** *** 1,6 **** /* Configuration for GNU compiler for an Intel i386 or later processor running OS/2 2.x. ! Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999 Free Software Foundation, Inc. Contributed by Samuel Figueroa (figueroa@apple.com) This file is part of GNU CC. --- 1,7 ---- /* Configuration for GNU compiler for an Intel i386 or later processor running OS/2 2.x. ! Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2001 Free Software ! Foundation, Inc. Contributed by Samuel Figueroa (figueroa@apple.com) This file is part of GNU CC. *************** int spawnvp (int modeflag, char *path, c *** 61,71 **** /* Allow handling of drive names. */ #define HAVE_DOS_BASED_FILE_SYSTEM ! #define EXECUTABLE_SUFFIX ".exe" /* The EMX compiler uses regular .o files */ #ifndef __EMX__ ! #define OBJECT_SUFFIX ".obj" #endif /* This is required to make temporary file names unique on file --- 62,72 ---- /* Allow handling of drive names. */ #define HAVE_DOS_BASED_FILE_SYSTEM ! #define HOST_EXECUTABLE_SUFFIX ".exe" /* The EMX compiler uses regular .o files */ #ifndef __EMX__ ! #define HOST_OBJECT_SUFFIX ".obj" #endif /* This is required to make temporary file names unique on file diff -c3pr gcc-2.95.3.orig/gcc/config/rs6000/xm-cygwin.h gcc-2.95.3.new/gcc/config/rs6000/xm-cygwin.h *** gcc-2.95.3.orig/gcc/config/rs6000/xm-cygwin.h Wed Dec 16 21:12:47 1998 --- gcc-2.95.3.new/gcc/config/rs6000/xm-cygwin.h Thu Mar 29 01:25:02 2001 *************** *** 1 **** ! #define EXECUTABLE_SUFFIX ".exe" --- 1 ---- ! #define HOST_EXECUTABLE_SUFFIX ".exe" diff -c3pr gcc-2.95.3.orig/gcc/config/vax/vms.h gcc-2.95.3.new/gcc/config/vax/vms.h *** gcc-2.95.3.orig/gcc/config/vax/vms.h Wed Dec 16 21:14:29 1998 --- gcc-2.95.3.new/gcc/config/vax/vms.h Thu Mar 29 22:34:02 2001 *************** *** 1,5 **** /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1988, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Output variables, constants and external declarations, for GNU compiler. ! Copyright (C) 1988, 1994, 1995, 1996, 1997, 2001 Free Software ! Foundation, Inc. This file is part of GNU CC. *************** the Free Software Foundation, 59 Temple *** 19,24 **** --- 20,28 ---- Boston, MA 02111-1307, USA. */ #define VMS_TARGET + + #define TARGET_EXECUTABLE_SUFFIX ".exe" + #define TARGET_OBJECT_SUFFIX ".obj" /* This enables certain macros in vax.h, which will make an indirect reference to an external symbol an invalid address. This needs to be diff -c3pr gcc-2.95.3.orig/gcc/config/vax/xm-vms.h gcc-2.95.3.new/gcc/config/vax/xm-vms.h *** gcc-2.95.3.orig/gcc/config/vax/xm-vms.h Wed Dec 16 21:14:33 1998 --- gcc-2.95.3.new/gcc/config/vax/xm-vms.h Thu Mar 29 22:34:02 2001 *************** *** 1,5 **** /* Configuration for GNU C-compiler for Vax. ! Copyright (C) 1987, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Configuration for GNU C-compiler for Vax. ! Copyright (C) 1987, 1994, 1995, 1996, 1997, 2001 Free Software ! Foundation, Inc. This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 71,76 **** --- 72,80 ---- #define X_OK 1 #define F_OK 0 #endif + + #define HOST_EXECUTABLE_SUFFIX ".exe" + #define HOST_OBJECT_SUFFIX ".obj" #define GCC_INCLUDE_DIR "///not used with VMS///" /* nonsense string for now */ diff -c3pr gcc-2.95.3.orig/gcc/config/winnt/xm-winnt.h gcc-2.95.3.new/gcc/config/winnt/xm-winnt.h *** gcc-2.95.3.orig/gcc/config/winnt/xm-winnt.h Sat Apr 10 05:27:16 1999 --- gcc-2.95.3.new/gcc/config/winnt/xm-winnt.h Thu Mar 29 01:25:10 2001 *************** *** 1,5 **** /* Configuration for GNU compiler for processor running Windows NT 3.x. ! Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc. Contributed by Douglas B. Rupp (drupp@cs.washington.edu) This file is part of GNU CC. --- 1,5 ---- /* Configuration for GNU compiler for processor running Windows NT 3.x. ! Copyright (C) 1993, 1995, 1997, 1999, 2001 Free Software Foundation, Inc. Contributed by Douglas B. Rupp (drupp@cs.washington.edu) This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 44,51 **** #define NO_SYS_SIGLIST 1 #define kill(a,b) raise(b) ! #define OBJECT_SUFFIX ".obj" ! #define EXECUTABLE_SUFFIX ".exe" #define PATH_SEPARATOR ';' #define DIR_SEPARATOR '\\' --- 44,51 ---- #define NO_SYS_SIGLIST 1 #define kill(a,b) raise(b) ! #define HOST_OBJECT_SUFFIX ".obj" ! #define HOST_EXECUTABLE_SUFFIX ".exe" #define PATH_SEPARATOR ';' #define DIR_SEPARATOR '\\' diff -c3pr gcc-2.95.3.orig/gcc/cppinit.c gcc-2.95.3.new/gcc/cppinit.c *** gcc-2.95.3.orig/gcc/cppinit.c Thu Jan 25 14:03:03 2001 --- gcc-2.95.3.new/gcc/cppinit.c Thu Mar 29 22:34:02 2001 *************** *** 1,6 **** /* CPP Library. Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000 Free Software Foundation, Inc. Contributed by Per Bothner, 1994-95. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 --- 1,6 ---- /* CPP Library. Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ! 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Per Bothner, 1994-95. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 *************** static char *known_suffixes[] = *** 93,103 **** NULL }; ! #ifndef OBJECT_SUFFIX # ifdef VMS ! # define OBJECT_SUFFIX ".obj" # else ! # define OBJECT_SUFFIX ".o" # endif #endif --- 93,103 ---- NULL }; ! #ifndef TARGET_OBJECT_SUFFIX # ifdef VMS ! # define TARGET_OBJECT_SUFFIX ".obj" # else ! # define TARGET_OBJECT_SUFFIX ".o" # endif #endif *************** initialize_dependency_output (pfile) *** 752,758 **** } /* Supply our own suffix. */ ! strcpy (q, OBJECT_SUFFIX); deps_output (pfile, p, ':'); deps_output (pfile, opts->in_fname, ' '); --- 752,758 ---- } /* Supply our own suffix. */ ! strcpy (q, TARGET_OBJECT_SUFFIX); deps_output (pfile, p, ':'); deps_output (pfile, opts->in_fname, ' '); diff -c3pr gcc-2.95.3.orig/gcc/gcc.c gcc-2.95.3.new/gcc/gcc.c *** gcc-2.95.3.orig/gcc/gcc.c Thu Jan 25 14:03:16 2001 --- gcc-2.95.3.new/gcc/gcc.c Thu Mar 29 22:34:02 2001 *************** *** 1,6 **** /* Compiler driver program that can handle many languages. Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! 2000 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Compiler driver program that can handle many languages. Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. *************** compilation is specified by a string cal *** 44,61 **** #define exit __posix_exit #endif ! /* By default there is no special suffix for executables. */ ! #ifdef EXECUTABLE_SUFFIX ! #define HAVE_EXECUTABLE_SUFFIX #else ! #define EXECUTABLE_SUFFIX "" #endif ! /* By default, the suffix for object files is ".o". */ ! #ifdef OBJECT_SUFFIX ! #define HAVE_OBJECT_SUFFIX #else ! #define OBJECT_SUFFIX ".o" #endif /* By default, colon separates directories in a path. */ --- 44,69 ---- #define exit __posix_exit #endif ! /* By default there is no special suffix for target executables. */ ! /* FIXME: when autoconf is fixed, remove the host check - dj */ ! #if defined(TARGET_EXECUTABLE_SUFFIX) && defined(HOST_EXECUTABLE_SUFFIX) ! #define HAVE_TARGET_EXECUTABLE_SUFFIX #else ! #define TARGET_EXECUTABLE_SUFFIX "" #endif ! /* By default there is no special suffix for host executables. */ ! #ifdef HOST_EXECUTABLE_SUFFIX ! #define HAVE_HOST_EXECUTABLE_SUFFIX #else ! #define HOST_EXECUTABLE_SUFFIX "" ! #endif ! ! /* By default, the suffix for target object files is ".o". */ ! #ifdef TARGET_OBJECT_SUFFIX ! #define HAVE_TARGET_OBJECT_SUFFIX ! #else ! #define TARGET_OBJECT_SUFFIX ".o" #endif /* By default, colon separates directories in a path. */ *************** static struct user_specs *user_specs_hea *** 538,544 **** #endif ! #ifdef HAVE_EXECUTABLE_SUFFIX /* This defines which switches stop a full compilation. */ #define DEFAULT_SWITCH_CURTAILS_COMPILATION(CHAR) \ ((CHAR) == 'c' || (CHAR) == 'S') --- 546,552 ---- #endif ! #ifdef HAVE_TARGET_EXECUTABLE_SUFFIX /* This defines which switches stop a full compilation. */ #define DEFAULT_SWITCH_CURTAILS_COMPILATION(CHAR) \ ((CHAR) == 'c' || (CHAR) == 'S') *************** find_a_file (pprefix, name, mode) *** 1966,1972 **** int mode; { char *temp; ! const char *file_suffix = ((mode & X_OK) != 0 ? EXECUTABLE_SUFFIX : ""); struct prefix_list *pl; int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1; --- 1974,1980 ---- int mode; { char *temp; ! const char *file_suffix = ((mode & X_OK) != 0 ? HOST_EXECUTABLE_SUFFIX : ""); struct prefix_list *pl; int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1; *************** static int warn_std; *** 2405,2411 **** static int *warn_std_ptr = 0; ! #if defined(HAVE_OBJECT_SUFFIX) || defined(HAVE_EXECUTABLE_SUFFIX) /* 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. */ --- 2413,2419 ---- static int *warn_std_ptr = 0; ! #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 is true if we should look for an executable suffix as well. */ *************** convert_filename (name, do_exe) *** 2423,2444 **** len = strlen (name); ! #ifdef HAVE_OBJECT_SUFFIX ! /* Convert x.o to x.obj if OBJECT_SUFFIX is ".obj". */ if (len > 2 && name[len - 2] == '.' && name[len - 1] == 'o') { obstack_grow (&obstack, name, len - 2); ! obstack_grow0 (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX)); name = obstack_finish (&obstack); } #endif ! #ifdef HAVE_EXECUTABLE_SUFFIX /* If there is no filetype, make it the executable suffix (which includes the "."). But don't get confused if we have just "-o". */ ! if (! do_exe || EXECUTABLE_SUFFIX[0] == 0 || (len == 2 && name[0] == '-')) return name; for (i = len - 1; i >= 0; i--) --- 2431,2452 ---- len = strlen (name); ! #ifdef HAVE_TARGET_OBJECT_SUFFIX ! /* Convert x.o to x.obj if HAVE_TARGET_OBJECT_SUFFIX is ".obj". */ if (len > 2 && name[len - 2] == '.' && name[len - 1] == 'o') { obstack_grow (&obstack, name, len - 2); ! obstack_grow0 (&obstack, TARGET_OBJECT_SUFFIX, strlen (TARGET_OBJECT_SUFFIX)); name = obstack_finish (&obstack); } #endif ! #ifdef HAVE_TARGET_EXECUTABLE_SUFFIX /* If there is no filetype, make it the executable suffix (which includes the "."). But don't get confused if we have just "-o". */ ! if (! do_exe || TARGET_EXECUTABLE_SUFFIX[0] == 0 || (len == 2 && name[0] == '-')) return name; for (i = len - 1; i >= 0; i--) *************** convert_filename (name, do_exe) *** 2450,2456 **** return name; obstack_grow (&obstack, name, len); ! obstack_grow0 (&obstack, EXECUTABLE_SUFFIX, strlen (EXECUTABLE_SUFFIX)); name = obstack_finish (&obstack); #endif --- 2458,2464 ---- return name; obstack_grow (&obstack, name, len); ! obstack_grow0 (&obstack, TARGET_EXECUTABLE_SUFFIX, strlen (TARGET_EXECUTABLE_SUFFIX)); name = obstack_finish (&obstack); #endif *************** process_command (argc, argv) *** 2994,3000 **** case 'o': have_o = 1; ! #if defined(HAVE_EXECUTABLE_SUFFIX) if (! have_c) { int skip; --- 3002,3008 ---- case 'o': have_o = 1; ! #if defined(HAVE_TARGET_EXECUTABLE_SUFFIX) if (! have_c) { int skip; *************** process_command (argc, argv) *** 3023,3029 **** } } #endif ! #if defined(HAVE_EXECUTABLE_SUFFIX) || defined(HAVE_OBJECT_SUFFIX) if (p[1] == 0) argv[i+1] = convert_filename (argv[i+1], ! have_c); else --- 3031,3037 ---- } } #endif ! #if defined(HAVE_TARGET_EXECUTABLE_SUFFIX) || defined(HAVE_TARGET_OBJECT_SUFFIX) if (p[1] == 0) argv[i+1] = convert_filename (argv[i+1], ! have_c); else *************** process_command (argc, argv) *** 3287,3293 **** } else { ! #ifdef HAVE_OBJECT_SUFFIX argv[i] = convert_filename (argv[i], 0); #endif --- 3295,3301 ---- } else { ! #ifdef HAVE_TARGET_OBJECT_SUFFIX argv[i] = convert_filename (argv[i], 0); #endif *************** do_spec_1 (spec, inswitch, soft_matched_ *** 3660,3667 **** /* We don't support extra suffix characters after %O. */ if (*p == '.' || ISALPHA ((unsigned char)*p)) abort (); ! suffix = OBJECT_SUFFIX; ! suffix_length = strlen (OBJECT_SUFFIX); } else { --- 3668,3675 ---- /* We don't support extra suffix characters after %O. */ if (*p == '.' || ISALPHA ((unsigned char)*p)) abort (); ! suffix = TARGET_OBJECT_SUFFIX; ! suffix_length = strlen (TARGET_OBJECT_SUFFIX); } else { *************** do_spec_1 (spec, inswitch, soft_matched_ *** 3756,3762 **** } case 'O': ! obstack_grow (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX)); arg_going = 1; break; --- 3764,3770 ---- } case 'O': ! obstack_grow (&obstack, TARGET_OBJECT_SUFFIX, strlen (TARGET_OBJECT_SUFFIX)); arg_going = 1; break; diff -c3pr gcc-2.95.3.orig/gcc/gcc.texi gcc-2.95.3.new/gcc/gcc.texi *** gcc-2.95.3.orig/gcc/gcc.texi Thu Jan 25 14:03:16 2001 --- gcc-2.95.3.new/gcc/gcc.texi Thu Mar 29 01:15:43 2001 *************** character constant specifying that chara *** 3847,3863 **** names, the character you specify will be used. GCC will test for both slash and the character you specify when parsing filenames. ! @findex OBJECT_SUFFIX ! @item OBJECT_SUFFIX Define this macro to be a C string representing the suffix for object ! files on your machine. If you do not define this macro, GCC will use ! @samp{.o} as the suffix for object files. ! @findex EXECUTABLE_SUFFIX ! @item EXECUTABLE_SUFFIX ! Define this macro to be a C string representing the suffix for executable ! files on your machine. If you do not define this macro, GCC will use ! the null string as the suffix for object files. @findex COLLECT_EXPORT_LIST @item COLLECT_EXPORT_LIST --- 3847,3877 ---- names, the character you specify will be used. GCC will test for both slash and the character you specify when parsing filenames. ! @findex TARGET_OBJECT_SUFFIX ! @item TARGET_OBJECT_SUFFIX Define this macro to be a C string representing the suffix for object ! files on your target machine. If you do not define this macro, GCC will ! use @samp{.o} as the suffix for object files. ! @findex TARGET_EXECUTABLE_SUFFIX ! @item TARGET_EXECUTABLE_SUFFIX ! Define this macro to be a C string representing the suffix to be ! automatically added to executable files on your target machine. If you ! do not define this macro, GCC will use the null string as the suffix for ! executable files. ! ! @findex HOST_OBJECT_SUFFIX ! @item HOST_OBJECT_SUFFIX ! Define this macro to be a C string representing the suffix for object ! files on your host machine (@samp{xm-*.h}). If you do not define this ! macro, GCC will use @samp{.o} as the suffix for object files. ! ! @findex HOST_EXECUTABLE_SUFFIX ! @item HOST_EXECUTABLE_SUFFIX ! Define this macro to be a C string representing the suffix for ! executable files on your host machine (@samp{xm-*.h}). If you do not ! define this macro, GCC will use the null string as the suffix for ! executable files. @findex COLLECT_EXPORT_LIST @item COLLECT_EXPORT_LIST diff -c3pr gcc-2.95.3.orig/gcc/java/lang.c gcc-2.95.3.new/gcc/java/lang.c *** gcc-2.95.3.orig/gcc/java/lang.c Fri May 14 14:44:09 1999 --- gcc-2.95.3.new/gcc/java/lang.c Thu Mar 29 22:34:02 2001 *************** *** 1,5 **** /* Java(TM) language-specific utility routines. ! Copyright (C) 1996, 97-98, 1999 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Java(TM) language-specific utility routines. ! Copyright (C) 1996, 97-98, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU CC. *************** The Free Software Foundation is independ *** 34,41 **** #include "flags.h" #include "xref.h" ! #ifndef OBJECT_SUFFIX ! # define OBJECT_SUFFIX ".o" #endif /* Table indexed by tree code giving a string containing a character --- 34,41 ---- #include "flags.h" #include "xref.h" ! #ifndef TARGET_OBJECT_SUFFIX ! # define TARGET_OBJECT_SUFFIX ".o" #endif /* Table indexed by tree code giving a string containing a character *************** init_parse (filename) *** 278,284 **** else { char *buf = (char *) xmalloc (dot - filename + ! 3 + sizeof (OBJECT_SUFFIX)); strncpy (buf, filename, dot - filename); /* If emitting class files, we might have multiple --- 278,284 ---- else { char *buf = (char *) xmalloc (dot - filename + ! 3 + sizeof (TARGET_OBJECT_SUFFIX)); strncpy (buf, filename, dot - filename); /* If emitting class files, we might have multiple *************** init_parse (filename) *** 289,295 **** jcf_dependency_set_target (NULL); else { ! strcpy (buf + (dot - filename), OBJECT_SUFFIX); jcf_dependency_set_target (buf); } --- 289,295 ---- jcf_dependency_set_target (NULL); else { ! strcpy (buf + (dot - filename), TARGET_OBJECT_SUFFIX); jcf_dependency_set_target (buf); }