This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
.EXE and .OBJ depend on target, not host
- To: gcc-patches at gcc dot gnu dot org
- Subject: .EXE and .OBJ depend on target, not host
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 30 Jun 2000 16:03:18 -0300
- Organization: GCC Team, Red Hat
Whether to use the .EXE extension for executables and .OBJ for object
files is a property of the target, not of the host. With the current
set-up, if I build a cross compiler with --target=i686-cygwin, the
cross compiler won't build .exe files as excepted to be able to run
them on MS-Windows. Similarly, if I build a cross tool hosted on
Cygwin, but for some embedded target, it doesn't make sense to append
.exe to executable names: they aren't executable for cygwin.
Thus, I propose this patch, that moves all definitions of
EXECUTABLE_SUFFIX and OBJECT_SUFFIX from host configuration files to
target configuration files. Ok to install?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* config/alpha/xm-vms.h (OBJECT_SUFFIX, EXECUTABLE_SUFFIX):
Moved...
* config/alpha/vms.h: ... here.
* config/i386/xm-cygwin.h (EXECUTABLE_SUFFIX): Moved...
* config/i386/cygwin.h: ... here.
* config/i386/xm-mingw32.h (EXECUTABLE_SUFFIX): Removed.
* config/i386/xm-uwin.h (EXECUTABLE_SUFFIX): Removed.
* config/i386/xm-djgpp.h (EXECUTABLE_SUFFIX): Moved...
* config/i386/djgpp.h: ... here.
* config/i386/xm-dos.h (EXECUTABLE_SUFFIX): `#ifdef'ed out.
* config/i386/xm-os2.h (EXECUTABLE_SUFFIX, OBJECT_SUFFIX):
Moved...
* config/i386/os2.h: ... here.
* config/i386/xm-winnt.h (OBJECT_SUFFIX, EXECUTABLE_SUFFIX):
Moved...
* config/i386/win-nt.h: ... here.
* config/rs6000/xm-cygwin.h (EXECUTABLE_SUFFIX): Removed.
* config/winnt/xm-winnt.h (OBJECT_SUFFIX, EXECUTABLE_SUFFIX):
Moved...
* config/winnt/win-nt.h: ... here.
* config/vax/xm-vms.h (OBJECT_SUFFIX, EXECUTABLE_SUFFIX):
Moved...
* config/vax/vms.h: ... here.
Index: gcc/config/alpha/vms.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/alpha/vms.h,v
retrieving revision 1.27
diff -u -r1.27 vms.h
--- gcc/config/alpha/vms.h 2000/05/28 02:18:27 1.27
+++ gcc/config/alpha/vms.h 2000/06/30 18:56:32
@@ -1,5 +1,5 @@
/* Output variables, constants and external declarations, for GNU compiler.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -470,3 +470,6 @@
#define DIR_SEPARATOR ']'
#define PREFIX "GNU_ROOT:"
+
+#define OBJECT_SUFFIX ".obj"
+#define EXECUTABLE_SUFFIX ".exe"
Index: gcc/config/alpha/xm-vms.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/alpha/xm-vms.h,v
retrieving revision 1.6
diff -u -r1.6 xm-vms.h
--- gcc/config/alpha/xm-vms.h 1999/09/22 14:23:22 1.6
+++ gcc/config/alpha/xm-vms.h 2000/06/30 18:56:32
@@ -1,5 +1,5 @@
/* Configuration for GNU C-compiler for openVMS/Alpha.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
Contributed by Klaus Kaempf (kkaempf@progis.de).
This file is part of GNU CC.
@@ -88,6 +88,3 @@
#else
extern char *alloca (unsigned int);
#endif
-
-#define OBJECT_SUFFIX ".obj"
-#define EXECUTABLE_SUFFIX ".exe"
Index: gcc/config/i386/cygwin.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/cygwin.h,v
retrieving revision 1.22
diff -u -r1.22 cygwin.h
--- gcc/config/i386/cygwin.h 2000/06/27 02:26:19 1.22
+++ gcc/config/i386/cygwin.h 2000/06/30 18:56:33
@@ -22,6 +22,8 @@
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define EXECUTABLE_SUFFIX ".exe"
+
#define YES_UNDERSCORES
#define DBX_DEBUGGING_INFO
Index: gcc/config/i386/djgpp.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/djgpp.h,v
retrieving revision 1.15
diff -u -r1.15 djgpp.h
--- gcc/config/i386/djgpp.h 2000/06/27 02:26:20 1.15
+++ gcc/config/i386/djgpp.h 2000/06/30 18:56:33
@@ -18,6 +18,7 @@
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define EXECUTABLE_SUFFIX ".exe"
#include "dbxcoff.h"
Index: gcc/config/i386/os2.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/os2.h,v
retrieving revision 1.2
diff -u -r1.2 os2.h
--- gcc/config/i386/os2.h 1998/12/16 21:03:46 1.2
+++ gcc/config/i386/os2.h 2000/06/30 18:56:33
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler
for an Intel i386 or later processor running OS/2 2.x.
- Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 2000 Free Software Foundation, Inc.
Contributed by Samuel Figueroa (figueroa@cs.nyu.edu)
This file is part of GNU CC.
@@ -19,6 +19,13 @@
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+
+#define EXECUTABLE_SUFFIX ".exe"
+
+/* The EMX compiler uses regular .o files */
+#ifndef __EMX__
+#define OBJECT_SUFFIX ".obj"
+#endif
#ifndef DEFAULT_TARGET_MACHINE
#define DEFAULT_TARGET_MACHINE "i386-os2"
Index: gcc/config/i386/win-nt.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/win-nt.h,v
retrieving revision 1.6
diff -u -r1.6 win-nt.h
--- gcc/config/i386/win-nt.h 2000/01/31 07:28:05 1.6
+++ gcc/config/i386/win-nt.h 2000/06/30 18:56:33
@@ -1,6 +1,6 @@
/* Operating system specific defines to be used when targeting GCC for
Windows NT 3.x on an i386.
- Copyright (C) 1994, 1995, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Douglas B. Rupp (drupp@cs.washington.edu).
This file is part of GNU CC.
@@ -19,6 +19,9 @@
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+
+#define OBJECT_SUFFIX ".obj"
+#define EXECUTABLE_SUFFIX ".exe"
#define YES_UNDERSCORES
Index: gcc/config/i386/xm-cygwin.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/xm-cygwin.h,v
retrieving revision 1.8
diff -u -r1.8 xm-cygwin.h
--- gcc/config/i386/xm-cygwin.h 1999/12/28 16:36:09 1.8
+++ gcc/config/i386/xm-cygwin.h 2000/06/30 18:56:33
@@ -1,6 +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.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -18,8 +18,6 @@
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
-#define EXECUTABLE_SUFFIX ".exe"
/* Even though Cygwin tries to hide the DOS based filesystem, it
still shows though at times. */
Index: gcc/config/i386/xm-dos.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/xm-dos.h,v
retrieving revision 1.5
diff -u -r1.5 xm-dos.h
--- gcc/config/i386/xm-dos.h 1999/04/10 04:27:12 1.5
+++ gcc/config/i386/xm-dos.h 2000/06/30 18:56:33
@@ -30,8 +30,10 @@
/* Allow checks for drive names. */
#define HAVE_DOS_BASED_FILE_SYSTEM
+#if 0 /* This is a property of the target, not of the host. */
/* Suffix for executable file names. */
#define EXECUTABLE_SUFFIX ".exe"
+#endif
#define MKTEMP_EACH_FILE 1
Index: gcc/config/i386/xm-mingw32.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/xm-mingw32.h,v
retrieving revision 1.9
diff -u -r1.9 xm-mingw32.h
--- gcc/config/i386/xm-mingw32.h 1999/12/28 16:36:09 1.9
+++ gcc/config/i386/xm-mingw32.h 2000/06/30 18:56:33
@@ -1,6 +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.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -40,8 +40,6 @@
/* Mingw32 does not try to hide the underlying DOS-based file system
like Cygwin does. */
#define HAVE_DOS_BASED_FILE_SYSTEM
-
-#define EXECUTABLE_SUFFIX ".exe"
#undef PATH_SEPARATOR
#define PATH_SEPARATOR ';'
Index: gcc/config/i386/xm-os2.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/xm-os2.h,v
retrieving revision 1.4
diff -u -r1.4 xm-os2.h
--- gcc/config/i386/xm-os2.h 2000/04/18 22:34:10 1.4
+++ gcc/config/i386/xm-os2.h 2000/06/30 18:56:34
@@ -1,6 +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.
+ Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Samuel Figueroa (figueroa@apple.com)
This file is part of GNU CC.
@@ -59,13 +59,6 @@
/* 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
systems which severely restrict the length of file names. */
Index: gcc/config/i386/xm-uwin.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/xm-uwin.h,v
retrieving revision 1.2
diff -u -r1.2 xm-uwin.h
--- gcc/config/i386/xm-uwin.h 1999/08/25 04:43:17 1.2
+++ gcc/config/i386/xm-uwin.h 2000/06/30 18:56:34
@@ -1,6 +1,6 @@
/* Configuration for GNU C-compiler for hosting on Windows32.
using GNU tools and the Windows32 API Library.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Contributed by Mumit Khan <khan@xraylith.wisc.edu>.
This file is part of GNU CC.
@@ -31,8 +31,6 @@
/* U/WIN system calls only support '/' */
#undef DIR_SEPARATOR
#define DIR_SEPARATOR '/'
-#undef EXECUTABLE_SUFFIX
-#define EXECUTABLE_SUFFIX ".exe"
#undef PATH_SEPARATOR
#define PATH_SEPARATOR ':'
Index: gcc/config/rs6000/xm-cygwin.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/xm-cygwin.h,v
retrieving revision 1.2
diff -u -r1.2 xm-cygwin.h
--- gcc/config/rs6000/xm-cygwin.h 1998/12/16 21:12:47 1.2
+++ gcc/config/rs6000/xm-cygwin.h 2000/06/30 18:56:34
@@ -1 +0,0 @@
-#define EXECUTABLE_SUFFIX ".exe"
Index: gcc/config/vax/vms.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/vax/vms.h,v
retrieving revision 1.7
diff -u -r1.7 vms.h
--- gcc/config/vax/vms.h 1999/09/15 21:41:16 1.7
+++ gcc/config/vax/vms.h 2000/06/30 18:56:34
@@ -1,5 +1,5 @@
/* Output variables, constants and external declarations, for GNU compiler.
- Copyright (C) 1988, 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1994, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -17,6 +17,9 @@
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+
+#define OBJECT_SUFFIX ".obj"
+#define EXECUTABLE_SUFFIX ".exe"
#define VMS_TARGET
Index: gcc/config/vax/xm-vms.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/vax/xm-vms.h,v
retrieving revision 1.6
diff -u -r1.6 xm-vms.h
--- gcc/config/vax/xm-vms.h 2000/03/04 05:36:14 1.6
+++ gcc/config/vax/xm-vms.h 2000/06/30 18:56:34
@@ -1,5 +1,5 @@
/* Configuration for GNU C-compiler for Vax.
- Copyright (C) 1987, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -204,6 +204,3 @@
extern char *alloca();
#endif
#endif
-
-#define OBJECT_SUFFIX ".obj"
-#define EXECUTABLE_SUFFIX ".exe"
Index: gcc/config/winnt/win-nt.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/winnt/win-nt.h,v
retrieving revision 1.3
diff -u -r1.3 win-nt.h
--- gcc/config/winnt/win-nt.h 1998/12/16 21:14:52 1.3
+++ gcc/config/winnt/win-nt.h 2000/06/30 18:56:34
@@ -1,6 +1,6 @@
/* Operating system specific defines to be used when targeting GCC for
Windows NT 3.x.
- Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
Contributed by Douglas B. Rupp (drupp@cs.washington.edu).
This file is part of GNU CC.
@@ -19,6 +19,9 @@
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+
+#define OBJECT_SUFFIX ".obj"
+#define EXECUTABLE_SUFFIX ".exe"
#define TARGET_MEM_FUNCTIONS
Index: gcc/config/winnt/xm-winnt.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/winnt/xm-winnt.h,v
retrieving revision 1.4
diff -u -r1.4 xm-winnt.h
--- gcc/config/winnt/xm-winnt.h 1999/12/28 16:36:09 1.4
+++ gcc/config/winnt/xm-winnt.h 2000/06/30 18:56:34
@@ -1,5 +1,5 @@
/* Configuration for GNU compiler for processor running Windows NT 3.x.
- Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1997, 1999, 2000 Free Software Foundation, Inc.
Contributed by Douglas B. Rupp (drupp@cs.washington.edu)
This file is part of GNU CC.
@@ -43,8 +43,6 @@
#define kill(a,b) raise(b)
-#define OBJECT_SUFFIX ".obj"
-#define EXECUTABLE_SUFFIX ".exe"
#define PATH_SEPARATOR ';'
#define DIR_SEPARATOR '\\'
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me