xcoff default arch

Alan Modra amodra@bigpond.net.au
Tue Aug 6 04:36:00 GMT 2002


Shows up in ld testsuite.
binaix213/ld/ld-new:tmpdir/def: can not set architecture: Bad value

	* emultempl/aix.em (gld*_before_parse): Set default arch.  Reverts
	2002-05-10 change.

Index: ld/emultempl/aix.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/aix.em,v
retrieving revision 1.26
diff -u -p -r1.26 aix.em
--- ld/emultempl/aix.em	1 Jul 2002 08:07:31 -0000	1.26
+++ ld/emultempl/aix.em	6 Aug 2002 08:13:34 -0000
@@ -147,6 +147,15 @@ static char *command_line_blibpath = NUL
 static void
 gld${EMULATION_NAME}_before_parse ()
 {
+  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_`echo ${ARCH} | sed -e 's/:.*//'`;
 
   config.has_shared = true;
 

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list