This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
xcoff default arch
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Tue, 6 Aug 2002 21:06:14 +0930
- Subject: xcoff default arch
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