From: Shinya Kuribayashi <skuribay@pobox.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/5] MIPS: Optimize the setup of endianess and CPU optimization flags
Date: Tue, 15 Mar 2011 08:54:12 +0900 [thread overview]
Message-ID: <4D7EAAA4.7070309@pobox.com> (raw)
In-Reply-To: <1300137298-23836-4-git-send-email-daniel.schwierzeck@googlemail.com>
On 3/15/11 6:14 AM, daniel.schwierzeck at googlemail.com wrote:
> Replace the current MIPSFLAGS code by cc-option macro and use
> -march=mips32r2 as default optimization level for all Mips32 CPUs.
> Replace the endianess determination code from toolchain prefix by
> a more generic one inspired by the Linux arch/mips/Makefile.
[...]
> -ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
> -ENDIANNESS = -EL
> -else
> -ENDIANNESS = -EB
> -endif
> +# Optimization flags for all Mips32 CPUs
> +MIPSFLAGS = $(call cc-option,-march=mips32r2,-mips32r2 -Wa,-mips32r2)
>
> -MIPSFLAGS += $(ENDIANNESS)
> +# Determine endianess from toolchain prefix
> +ENDIANESS = $(shell $(CC) -dumpmachine | \
> + grep -q 'mips.*el-.*'&& echo -EL || echo -EB)
> +
> +PLATFORM_CPPFLAGS += $(MIPSFLAGS) $(ENDIANESS)
>
> -PLATFORM_CPPFLAGS += $(MIPSFLAGS)
This trick can not work with the ELDK toolchain, which also I don't
want to think about and be involved in discussion any more. See:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/81572/focus=81735
Users who need to dig into this area should install the ELDK first,
build little-endian targets with it by yourself, then find a way
to handle endianness appropriately which works for both the ELDK and
non-ELDK toolchains.
Or I may miss something. If it's already verified with the ELDK,
please let me know, thanks.
next prev parent reply other threads:[~2011-03-14 23:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-14 21:14 [U-Boot] [PATCH v2 0/5] MIPS: Refactoring of CPU and SoC code daniel.schwierzeck at googlemail.com
2011-03-14 21:14 ` [U-Boot] [PATCH v2 1/5] MIPS: Purple: Remove Purple support daniel.schwierzeck at googlemail.com
2011-03-14 21:14 ` [U-Boot] [PATCH v2 2/5] MIPS: Move content of arch/mips/cpu to arch/mips/cpu/mips32 daniel.schwierzeck at googlemail.com
2011-03-14 21:14 ` [U-Boot] [PATCH v2 3/5] MIPS: Optimize the setup of endianess and CPU optimization flags daniel.schwierzeck at googlemail.com
2011-03-14 23:54 ` Shinya Kuribayashi [this message]
2011-03-15 13:20 ` Daniel Schwierzeck
2011-03-16 13:18 ` Shinya Kuribayashi
2011-03-16 14:41 ` Daniel Schwierzeck
2011-03-17 14:02 ` Shinya Kuribayashi
2011-03-17 15:20 ` Daniel Schwierzeck
2011-03-21 12:42 ` Daniel Schwierzeck
2011-03-23 14:51 ` Shinya Kuribayashi
2011-03-23 16:37 ` Daniel Schwierzeck
2011-03-28 14:56 ` Shinya Kuribayashi
2011-03-28 15:27 ` Daniel Schwierzeck
2011-03-28 15:58 ` Shinya Kuribayashi
2011-03-28 16:11 ` Daniel Schwierzeck
2011-03-14 21:14 ` [U-Boot] [PATCH v2 4/5] MIPS: IncaIP: Move all IncaIP specific code to separate subdirectory daniel.schwierzeck at googlemail.com
2011-03-14 21:14 ` [U-Boot] [PATCH v2 5/5] MIPS: Au1x00: Move all Au1x00 " daniel.schwierzeck at googlemail.com
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=4D7EAAA4.7070309@pobox.com \
--to=skuribay@pobox.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox