This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] ld/arc: Fix linker for big-endian arc targets
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: Claudiu dot Zissulescu at synopsys dot com, binutils at sourceware dot org
- Date: Thu, 7 Apr 2016 16:22:05 +0100
- Subject: Re: [PATCH] ld/arc: Fix linker for big-endian arc targets
- Authentication-results: sourceware.org; auth=none
- References: <1459442059-12298-1-git-send-email-andrew dot burgess at embecosm dot com> <5703C510 dot 3070109 at redhat dot com> <20160407140659 dot GL18129 at bubble dot grove dot modra dot org>
* Alan Modra <amodra@gmail.com> [2016-04-07 23:36:59 +0930]:
> On Tue, Apr 05, 2016 at 03:00:48PM +0100, Nick Clifton wrote:
> > > * 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.
>
> It's likely that the above is responsible for breaking
> --enable-targets=all builds. Please fix.
Sorry about that, the patch below should fix things. OK to apply?
Thanks,
Andrew
---
ld/arc: Make little endian default choice for linker scripts
When building with --enable-targets=all the target string is not set to
something that matches the pattern arc*-*, and so the script used to
decide if we should build big or little endian linker script currently
exits with an error.
This commit makes little endian linker script be the default, which will
be used when building for all targets, this matches the behaviour from
before I made the endianness switchable, when we only ever built little
endian linker scripts anyway.
ld/ChangeLog:
* emulparams/arc-endianness.sh: Make little endian default choice.
diff --git a/ld/emulparams/arc-endianness.sh b/ld/emulparams/arc-endianness.sh
index 4d6158b..7a66dee 100644
--- a/ld/emulparams/arc-endianness.sh
+++ b/ld/emulparams/arc-endianness.sh
@@ -1,10 +1,11 @@
+# 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.
case ${target} in
arceb-*)
ARC_ENDIAN="big"
;;
- arc-*)
+ arc-* | * )
ARC_ENDIAN="little"
;;
- *)
- exit 1
esac