From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] perf: append endianness argument to ld when building for MIPS
Date: Sat, 20 Feb 2016 23:46:34 +0100 [thread overview]
Message-ID: <56C8ECCA.6010705@mind.be> (raw)
In-Reply-To: <1455816222-43031-1-git-send-email-Vincent.Riera@imgtec.com>
On 02/18/16 18:23, Vicente Olivert Riera wrote:
> We need to pass an argument to ld for setting the endianness when
> building it for MIPS architecture, otherwise the default one will always
> be used (which is big endian) and the compilation for little endian will
> always fail showing an error like this one:
>
> LD foo.o
> mips-linux-gnu-ld: foo.o: compiled for a little endian system and target
> is big endian
>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> linux/linux-tool-perf.mk | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/linux/linux-tool-perf.mk b/linux/linux-tool-perf.mk
> index 07c3514..7ad6629 100644
> --- a/linux/linux-tool-perf.mk
> +++ b/linux/linux-tool-perf.mk
> @@ -27,6 +27,21 @@ PERF_MAKE_FLAGS = \
> WERROR=0 \
> ASCIIDOC=
>
> +# We need to pass an argument to ld for setting the endianness when
> +# building it for MIPS architecture, otherwise the default one will
> +# always be used (which is big endian) and the compilation for little
> +# endian will always fail showing an error like this one:
> +# LD foo.o
> +# mips-linux-gnu-ld: foo.o: compiled for a little endian system and
> +# target is big endian
> +ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
> +ifeq ($(BR2_ENDIAN),"BIG")
Er, isn't this a bit silly? Can you have big-endian mipsel, or little-endian mips?
Regards,
Arnout
> +PERF_MAKE_FLAGS += LD="$(TARGET_LD) -EB"
> +else
> +PERF_MAKE_FLAGS += LD="$(TARGET_LD) -EL"
> +endif
> +endif
> +
> # The call to backtrace() function fails for ARC, because for some
> # reason the unwinder from libgcc returns early. Thus the usage of
> # backtrace() should be disabled in perf explicitly: at build time
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
prev parent reply other threads:[~2016-02-20 22:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 17:23 [Buildroot] [PATCH] perf: append endianness argument to ld when building for MIPS Vicente Olivert Riera
2016-02-20 22:46 ` Arnout Vandecappelle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C8ECCA.6010705@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.