diff mbox series

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

Message ID 20191216223756.2428-7-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series move arch specificities in their own files | expand

Commit Message

Luc Van Oostenryck Dec. 16, 2019, 10:37 p.m. UTC
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@gmail.com>
---
 target-s390.c | 1 +
 target.c      | 2 +-
 target.h      | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

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;