[MIPS64] Adjust kernel/tools for mips32,mips64 headers
Define CONFIG_32BIT as _ABIO32 rather than as 1;
it needs to be undefined for calls from mips64.
We need defined(CONFIG_32BIT) == !defined(CONFIG_64BIT),
and get that via defined(_ABIO32) == !defined(__LP64__).
Define CONFIG_CPU_LITTLE_ENDIAN to get correctly-placed
struct msqid64_ds fillers on ipc calls from mips32.
Without this, big-endian fillers were erroneously used.
This bug exists in prior mips32 Android releases.
Define __SANE_USERSPACE_TYPES__ to use int_ll64.h
rather than int_ll64.h on mips64.
This depends on external/kernel-headers patch
https://android-review.googlesource.com/#/c/98915/
http://patchwork.linux-mips.org/patch/6890/
Change-Id: If65fa80746533723cdf46eebe95733bea7ce24ba
diff --git a/libc/kernel/tools/defaults.py b/libc/kernel/tools/defaults.py
index 67ab702..2efd455 100644
--- a/libc/kernel/tools/defaults.py
+++ b/libc/kernel/tools/defaults.py
@@ -44,7 +44,11 @@
kernel_default_arch_macros = {
"arm": {"__ARMEB__": kCppUndefinedMacro, "__ARM_EABI__": "1"},
"arm64": {},
- "mips": {"CONFIG_32BIT":"1", "__MIPSEB__": kCppUndefinedMacro, "__MIPSEL__": "1"},
+ "mips": {"__MIPSEB__": kCppUndefinedMacro,
+ "__MIPSEL__": "1",
+ "CONFIG_32BIT": "_ABIO32",
+ "CONFIG_CPU_LITTLE_ENDIAN": "1",
+ "__SANE_USERSPACE_TYPES__": "1",},
"x86": {},
}