Linux-Sparse Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] xtensa: fix configuration of endianness
@ 2020-07-25 20:56 Luc Van Oostenryck
  0 siblings, 0 replies; only message in thread
From: Luc Van Oostenryck @ 2020-07-25 20:56 UTC (permalink / raw)
  To: linux-sparse; +Cc: Luc Van Oostenryck, Peter Zijlstra

Since gcc 3.4.0 there is no option to specify the endianness for
the Xtensa architecture, so the kernel relies on autodetecting
the endianness and then defining the macros __XTENSA_E{B,L}__.

But this means that sparse's 'arch_big_endian' can't be used
for the predefine.

So, do not predefine these macros anymore, they will transparently
be set directly from the command line.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 target-xtensa.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/target-xtensa.c b/target-xtensa.c
index 26bda47f02f0..3620b4a311cc 100644
--- a/target-xtensa.c
+++ b/target-xtensa.c
@@ -17,11 +17,6 @@ static void predefine_xtensa(const struct target *self)
 {
 	predefine("__XTENSA__", 1, "1");
 	predefine("__xtensa__", 1, "1");
-
-	if (arch_big_endian)
-		predefine("__XTENSA_EB__", 1, "1");
-	else
-		predefine("__XTENSA_EL__", 1, "1");
 }
 
 const struct target target_xtensa = {
-- 
2.27.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 20:56 [PATCH] xtensa: fix configuration of endianness Luc Van Oostenryck

Linux-Sparse Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-sparse/0 linux-sparse/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sparse linux-sparse/ https://lore.kernel.org/linux-sparse \
		linux-sparse@vger.kernel.org
	public-inbox-index linux-sparse

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-sparse


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git