From: Shinya Kuribayashi <skuribay@pobox.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] [mips] add $(ENDIANNESS) option when link hello_world example
Date: Tue, 27 Jul 2010 07:00:34 +0900 [thread overview]
Message-ID: <4C4E0582.4020101@pobox.com> (raw)
In-Reply-To: <4C4DA45A.7060400@openmobilefree.net>
On 7/27/10 12:06 AM, Xiangfu Liu wrote:
> what about split this patch to two:
> one is all *.lds files,
> the other one is for the argument,
Sounds good.
> I have one question here. if we decete the board cpu by
> CONFIG_CPU_LITTLE_ENDIAN.
> why we need check the toolchina again.
The answer is described right above:
+# We explicitly add the endianness specifier if needed, this allows
+# to compile kernels with a toolchain for the other endianness. We
+# carefully avoid to add it redundantly because gcc 3.3/3.4 complains
+# when fed the toolchain default!
+#
+# Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
+# 2006-10-10 don't properly change the predefined symbols if -EB / -EL
+# are used, so we kludge that here. A bug has been filed at
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
This part is copied from Linux/MIPS kernel, and has been working
with the wide range of GCC versions for years.
> the original U-Boot is detect -EL/-EB by toolchain name. maybe the
> CONFIG_CPU_LITTLE_ENDIAN option is better.
True. CONFIG_CPU_LITTLE_ENDIAN (and CONFIG_CPU_BIG_ENDIAN) configs
are also derived from Linux/MIPS kernel, and IMO they're right steps
toward cross-endian build support. U-Boot, however, tends to think
it less important, so don't hold your breath about this approach to
be accepted. Cross-endian build is common practice for MIPS people,
but might be uncommon for other architectures.
Note that CONFIG_CPU_LITTLE_ENDIAN works not only for cross-endian
builds, but also toolchain default endian builds with non-ELDK tools.
If CONFIG_CPU_LITTLE_ENDIAN is not accepted, we have to think an
alternative way.
prev parent reply other threads:[~2010-07-26 22:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-21 10:27 [U-Boot] [PATCH] [mips] add $(ENDIANNESS) option when link hello_world example Xiangfu Liu
2010-07-21 14:08 ` Shinya Kuribayashi
2010-07-26 15:06 ` Xiangfu Liu
2010-07-26 22:00 ` Shinya Kuribayashi [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=4C4E0582.4020101@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 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.