This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
What happens if EXECUTABLE_SUFFIX differs between host and target?
- To: "gcc" <gcc at gcc dot gnu dot org>
- Subject: What happens if EXECUTABLE_SUFFIX differs between host and target?
- From: "Dave Korn" <davek-ml at ntlworld dot com>
- Date: Sun, 7 Jan 2001 19:46:28 -0000
Hi all,
I'm making 2.95.3 powerpc-wrs-vxworks cross-compilers that run under
cygwin. cygwin executables take a .exe suffix, but vxworks ones don't.
Alas, my exe's get .exe on the end. This seems to be because gcc.c uses
EXECUTABLE_SUFFIX for two unrelated purposes: as a suffix for the various
compiler executables on the host system, and as the suffix for the final
output executable that is to run on the target system.
This is often not a problem since vxworks 'executables' are actually
relocatables linked with '-r', and people might tend to build them with a
'.o' or '.out' ending, but if you don't specify a file extension in the
argument passed to the '-o' flag, the default behaviour is to attach the
host's EXECUTABLE_SUFFIX.
Is there something I'm missing here? Shouldn't we have a
CROSS_TARGET_EXECUTABLE_SUFFIX as well, independently of the host's
EXECUTABLE_SUFFIX ?
DaveK