diff options
Diffstat (limited to 'ld/emultempl/beos.em')
-rw-r--r-- | ld/emultempl/beos.em | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index 3c9e3ed..4ad033b 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -1,5 +1,10 @@ # This shell script emits a C file. -*- C -*- # It does some substitutions. +if [ -z "$MACHINE" ]; then + OUTPUT_ARCH=${ARCH} +else + OUTPUT_ARCH=${ARCH}:${MACHINE} +fi cat >e${EMULATION_NAME}.c <<EOF /* This file is part of GLD, the Gnu Linker. Copyright 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. @@ -72,7 +77,15 @@ static void gld_${EMULATION_NAME}_before_parse() { output_filename = "a.exe"; - ldfile_output_architecture = bfd_arch_${ARCH}; + const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}"); + if (arch) + { + ldfile_output_architecture = arch->arch; + ldfile_output_machine = arch->mach; + ldfile_output_machine_name = arch->printable_name; + } + else + ldfile_output_architecture = bfd_arch_${ARCH}; } /* PE format extra command line options. */ |