[PATCH 2/2] nios2: add non-trailing double underscore predefines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For Nios2, some predefines with the trailing double underscores
were added but the variant with only the leading ones are also
used. So add these too.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 target-nios2.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/target-nios2.c b/target-nios2.c
index 98813765b925..a478fff51e18 100644
--- a/target-nios2.c
+++ b/target-nios2.c
@@ -6,13 +6,18 @@
 
 static void predefine_nios2(const struct target *self)
 {
+	predefine("__NIOS2", 1, "1");
 	predefine("__NIOS2__", 1, "1");
+	predefine("__nios2", 1, "1");
 	predefine("__nios2__", 1, "1");
 
-	if (arch_big_endian)
+	if (arch_big_endian) {
+		predefine("__nios2_big_endian", 1, "1");
 		predefine("__nios2_big_endian__", 1, "1");
-	else
+	} else {
+		predefine("__nios2_little_endian", 1, "1");
 		predefine("__nios2_little_endian__", 1, "1");
+	}
 }
 
 static const struct builtin_fn builtins_nios2[] = {
-- 
2.27.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux