From a69eaec4d48e978751356b2e8fd989d5e23a34db Mon Sep 17 00:00:00 2001 From: Duane Sand Date: Thu, 19 Jun 2014 14:38:07 -0700 Subject: [PATCH] [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 --- libc/kernel/tools/defaults.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libc/kernel/tools/defaults.py b/libc/kernel/tools/defaults.py index 67ab702dd..2efd45566 100644 --- a/libc/kernel/tools/defaults.py +++ b/libc/kernel/tools/defaults.py @@ -44,7 +44,11 @@ kernel_remove_config_macros = True 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": {}, }