From 86af25fe1d986f332c3502d83fbc499eabfb515d Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 25 May 2001 05:39:22 +0000 Subject: 2001-05-24 H.J. Lu * emultempl/aix.em (OUTPUT_ARCH): Defined. (gld${EMULATION_NAME}_before_parse): Initialize ldfile_output_architecture, ldfile_output_machine and ldfile_output_machine_name from ${OUTPUT_ARCH} if possible. * emultempl/beos.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/mipsecoff.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/sunos.em: Likewise. --- ld/emultempl/elf32.em | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ld/emultempl/elf32.em') diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index c5ffe14..cce6b3e 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -3,6 +3,11 @@ # This file is now misnamed, because it supports both 32 bit and 64 bit # ELF emulations. test -z "${ELFSIZE}" && ELFSIZE=32 +if [ -z "$MACHINE" ]; then + OUTPUT_ARCH=${ARCH} +else + OUTPUT_ARCH=${ARCH}:${MACHINE} +fi cat >e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <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.dynamic_link = ${DYNAMIC_LINK-true}; config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; } -- cgit v1.1