2001-05-24 H.J. Lu <hjl@gnu.org>
[deliverable/binutils-gdb.git] / ld / emultempl / beos.em
index 3c9e3edc9b2ae6785b4d7a5e8eb06291fe03266e..4ad033bf4ec9cdd8babc8f5c9fa1cb1c350844aa 100644 (file)
@@ -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};
 }
 \f
 /* PE format extra command line options.  */
This page took 0.024967 seconds and 4 git commands to generate.