From: Al Viro <viro@ftp.linux.org.uk>
To: Hirokazu Takata <takata@linux-m32r.org>
Cc: torvalds@odsl.org, linux-kernel@vger.kernel.org, sam@ravnborg.org
Subject: Re: [PATCH] m32r: set CHECKFLAGS properly
Date: Tue, 27 Sep 2005 08:10:25 +0100 [thread overview]
Message-ID: <20050927071025.GS7992@ftp.linux.org.uk> (raw)
In-Reply-To: <20050927.151301.189720995.takata.hirokazu@renesas.com>
On Tue, Sep 27, 2005 at 03:13:01PM +0900, Hirokazu Takata wrote:
> Please don't specify __BIG_ENDIAN__. ;-)
> We have supported both big- and little-endian for the m32r kernel.
> I hope it will be kept unconditional.
>
> Now, the endianness is to be determined by a (cross)compiler:
> - For the big-endian, a compiler (m32r-linux-gcc or m32r-linux-gnu-gcc)
> provides a predefined macro __BIG_ENDIAN__.
> - For little-endian, a compiler (m32rle-linux-gcc or m32rle-linux-gnu-gcc)
> provides a predefined macro __LITTLE_ENDIAN__.
>
> Here is a modified patch.
>
> Thank you.
You do realize that this way sparse will get neither? It does not
pick predefined symbols from gcc; thus the -D<your_arch>, etc.
One solution would be to really run cross-gcc on something like
#define HAVE(x) -D##x=x
#ifdef __LITTLE_ENDIAN__
HAVE(__LITTLE_ENDIAN__)
#endif
#ifdef __BIG_ENDIAN__
HAVE(__BIG_ENDIAN__)
#endif
with grep -- -D on the output and have it added to CHECKFLAGS. The only
problem being, for a generic solution we want to make sure that this
sucker is run _after_ we have decided on gcc arguments.
Note that it's potentially more than just m32r - e.g. s390 wants
__s390x__ added only for case of 64bit target. Similar for powerpc
if these get merged, etc.
Sam, any help in that area? Ideally we want to have something equivalent
to
PREDEFINED_WE_MIGHT_WANT = __m32r__ __LITTLE_ENDIAN__ __BIG_ENDIAN__
and CHECKFLAGS done from that - basically, the subset of cross-gcc
predefined symbols reproduced for sparse. Ideally with -m64 added
if we have sizeof(long) == 8 on target, to take care of all that
crap in one go.
Suggestions?
next prev parent reply other threads:[~2005-09-27 7:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-26 5:18 [PATCH] m32r: set CHECKFLAGS properly Al Viro
2005-09-27 6:13 ` Hirokazu Takata
2005-09-27 7:10 ` Al Viro [this message]
2005-09-27 15:13 ` Kyle Moffett
2005-09-27 16:34 ` Al Viro
2005-09-27 17:31 ` Kyle Moffett
2005-09-27 17:55 ` Al Viro
2005-09-27 18:37 ` Kyle Moffett
2005-09-27 23:06 ` Al Viro
2005-09-27 20:02 ` Sam Ravnborg
2005-09-28 1:44 ` Al Viro
2005-09-27 6:23 ` Hirokazu Takata
2005-09-27 15:00 ` Linus Torvalds
2005-09-28 0:18 ` Al Viro
2005-09-28 10:04 ` Hirokazu Takata
2005-09-29 1:56 ` Al Viro
-- strict thread matches above, loose matches on Subject: below --
2005-09-26 5:19 Al Viro
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=20050927071025.GS7992@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=takata@linux-m32r.org \
--cc=torvalds@odsl.org \
/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