[PATCH 06/10] arch: use an arch-specific default for -msize-long

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

 



This is for completeness and only useful for S390 which is not
exactly the most common arch. But since it's now easy to do
this kind of thing ...

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 target-s390.c | 1 +
 target.c      | 2 +-
 target.h      | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/target-s390.c b/target-s390.c
index 157779ce506b..277e0909024f 100644
--- a/target-s390.c
+++ b/target-s390.c
@@ -8,6 +8,7 @@ const struct target target_s390 = {
 	.bitness = ARCH_LP32,
 	.big_endian = 1,
 	.unsigned_char = 1,
+	.size_t_long = 1,
 
 	.bits_in_longdouble = 64,
 	.max_fp_alignment = 8,
diff --git a/target.c b/target.c
index 006292cc00ba..1c7a40836175 100644
--- a/target.c
+++ b/target.c
@@ -196,7 +196,7 @@ void target_init(void)
 	if (target->init)
 		target->init(target);
 
-	if (arch_msize_long) {
+	if (arch_msize_long || target->size_t_long) {
 		size_t_ctype = &ulong_ctype;
 		ssize_t_ctype = &long_ctype;
 	}
diff --git a/target.h b/target.h
index c6aef9592080..ebd8f1b15ce6 100644
--- a/target.h
+++ b/target.h
@@ -59,6 +59,7 @@ struct target {
 	enum bitness	bitness;
 	unsigned int	big_endian:1;
 	unsigned int	unsigned_char:1;
+	unsigned int	size_t_long:1;
 
 	struct symbol	*wchar;
 	struct symbol	*wint;
-- 
2.24.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