binutils-gdb/ld/emulparams/arc-endianness.sh

12 lines
290 B
Bash
Raw Normal View History

# Select an appropriate endinaness based on the value of target. When
# building for all targets we select little endian, which is what the
# '*' pattern is for.
ld/arc: Fix linker for big-endian arc targets This aims to bring the linker for big-endian arc targets into line with the linker for (the default) little endian arc targets. The bulk of the changes are to extend the target pattern in the test files from 'arc-*...' to 'arc*-*...' and so match both big and little endian arc targets. In the ld/emulparams/ directory the existing scripts checked for a variable ARC_ENDIAN to switch between big and little endian targets, however, this variable is never set up. So, a new script snippet is introduced which sets up ARC_ENDIAN based on the value of target, this snippet is then included from all of the existing arc scripts. The existing big-endian variants of all the scripts, which existed, but were never used, are deleted in this commit. ld/ChangeLog: * emulparams/arc-endianness.sh: New file. * emulparams/arcebelf.sh: Deleted. * emulparams/arcebelf_prof.sh: Deleted. * emulparams/arceblinux.sh: Deleted. * emulparams/arceblinux_prof.sh: Deleted. * emulparams/arcelf.sh: Include arc-endinness.sh. * emulparams/arcelf_prof.sh: Include arc-endinness.sh. * emulparams/arclinux.sh: Include arc-endinness.sh. * emulparams/arclinux_prof.sh: Include arc-endinness.sh. * emulparams/arcv2elf.sh: Include arc-endinness.sh. * emulparams/arcv2elfx.sh: Include arc-endinness.sh. * testsuite/ld-elf/compressed1d.d: Update pattern for big and little endian arc targets. * testsuite/ld-elf/eh-frame-hdr.d: Likewise. * testsuite/ld-elf/group1.d: Likewise. * testsuite/ld-elf/group3b.d: Likewise. * testsuite/ld-elf/group8a.d: Likewise. * testsuite/ld-elf/group8b.d: Likewise. * testsuite/ld-elf/group9a.d: Likewise. * testsuite/ld-elf/group9b.d: Likewise. * testsuite/ld-elf/linkonce2.d: Likewise. * testsuite/ld-elf/pr12851.d: Likewise. * testsuite/ld-elf/pr12975.d: Likewise. * testsuite/ld-elf/pr13177.d: Likewise. * testsuite/ld-elf/pr13195.d: Likewise. * testsuite/ld-elf/pr17615.d: Likewise. * testsuite/ld-elf/pr19162.d: Likewise. * testsuite/ld-elf/sec64k.exp: Likewise. * testsuite/lib/ld-lib.exp: Likewise.
2016-03-29 16:57:40 +02:00
case ${target} in
arceb-*)
ARC_ENDIAN="big"
;;
arc-* | * )
ld/arc: Fix linker for big-endian arc targets This aims to bring the linker for big-endian arc targets into line with the linker for (the default) little endian arc targets. The bulk of the changes are to extend the target pattern in the test files from 'arc-*...' to 'arc*-*...' and so match both big and little endian arc targets. In the ld/emulparams/ directory the existing scripts checked for a variable ARC_ENDIAN to switch between big and little endian targets, however, this variable is never set up. So, a new script snippet is introduced which sets up ARC_ENDIAN based on the value of target, this snippet is then included from all of the existing arc scripts. The existing big-endian variants of all the scripts, which existed, but were never used, are deleted in this commit. ld/ChangeLog: * emulparams/arc-endianness.sh: New file. * emulparams/arcebelf.sh: Deleted. * emulparams/arcebelf_prof.sh: Deleted. * emulparams/arceblinux.sh: Deleted. * emulparams/arceblinux_prof.sh: Deleted. * emulparams/arcelf.sh: Include arc-endinness.sh. * emulparams/arcelf_prof.sh: Include arc-endinness.sh. * emulparams/arclinux.sh: Include arc-endinness.sh. * emulparams/arclinux_prof.sh: Include arc-endinness.sh. * emulparams/arcv2elf.sh: Include arc-endinness.sh. * emulparams/arcv2elfx.sh: Include arc-endinness.sh. * testsuite/ld-elf/compressed1d.d: Update pattern for big and little endian arc targets. * testsuite/ld-elf/eh-frame-hdr.d: Likewise. * testsuite/ld-elf/group1.d: Likewise. * testsuite/ld-elf/group3b.d: Likewise. * testsuite/ld-elf/group8a.d: Likewise. * testsuite/ld-elf/group8b.d: Likewise. * testsuite/ld-elf/group9a.d: Likewise. * testsuite/ld-elf/group9b.d: Likewise. * testsuite/ld-elf/linkonce2.d: Likewise. * testsuite/ld-elf/pr12851.d: Likewise. * testsuite/ld-elf/pr12975.d: Likewise. * testsuite/ld-elf/pr13177.d: Likewise. * testsuite/ld-elf/pr13195.d: Likewise. * testsuite/ld-elf/pr17615.d: Likewise. * testsuite/ld-elf/pr19162.d: Likewise. * testsuite/ld-elf/sec64k.exp: Likewise. * testsuite/lib/ld-lib.exp: Likewise.
2016-03-29 16:57:40 +02:00
ARC_ENDIAN="little"
;;
esac