Skip to content

Commit 1757bed

Browse files
Make Newlib use int for INT32 PRx types
Otherwise GCC will default to using `long` which can cause format strings to fail due to int/long mismatch.
1 parent 9bcba0b commit 1757bed

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
2+
index 8e1bcf823e4..3cfcd2b6628 100644
3+
--- a/gcc/config/xtensa/xtensa.h
4+
+++ b/gcc/config/xtensa/xtensa.h
5+
@@ -801,3 +801,8 @@ typedef struct xtensa_args
6+
callx0\ta0\n" \
7+
TEXT_SECTION_ASM_OP);
8+
#endif
9+
+
10+
+
11+
+/* Use int, instead of long int, for int32_t and uint32_t. */
12+
+#undef STDINT_LONG32
13+
+#define STDINT_LONG32 0

0 commit comments

Comments
 (0)