aboutsummaryrefslogtreecommitdiffstats
path: root/libc/kernel/tools/defaults.py
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-09-30 17:41:08 -0700
committerElliott Hughes <enh@google.com>2013-09-30 18:42:13 -0700
commitd3e64a3f403918abf2cc3f9f0f9a2204a420ec96 (patch)
treeec7cb0e25587096a42ed0fce4a125bf4bba7affd /libc/kernel/tools/defaults.py
parent76218efbeb2e124656ce15d4eb5a7039da065123 (diff)
downloadandroid_bionic-d3e64a3f403918abf2cc3f9f0f9a2204a420ec96.tar.gz
android_bionic-d3e64a3f403918abf2cc3f9f0f9a2204a420ec96.tar.bz2
android_bionic-d3e64a3f403918abf2cc3f9f0f9a2204a420ec96.zip
Add x86_64 to the bionic headers.
Manual changes: cpp.py: cope with macros that refer to other macros. defaults.py: x86 no longer always implies __i386__; use __i386__ to replace the kernel CONFIG_X86_32 flag. asm/page.h: the upstream page.h isn't a uapi header and no longer includes the stuff we were using it for. Let's just have our own static file, since it's the same for all our architectures (both 32- and 64-bit). sys/select.h: we used to use the various FD_SET-related macros from the kernel header files, but they've gone. Adjust by adding trivial equivalent definitions. Automated changes: libc/kernel/arch-x86, libc/kernel/common: regenerated from external/kernel-headers. Change-Id: I84fc0ed52dc742e043b4ae300fd3b58ee99b7fcd
Diffstat (limited to 'libc/kernel/tools/defaults.py')
-rw-r--r--libc/kernel/tools/defaults.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/libc/kernel/tools/defaults.py b/libc/kernel/tools/defaults.py
index da024815a..77bfc47a7 100644
--- a/libc/kernel/tools/defaults.py
+++ b/libc/kernel/tools/defaults.py
@@ -7,7 +7,7 @@ from utils import *
# the list of supported architectures
#
-kernel_archs = [ 'arm', 'x86', 'mips' ]
+kernel_archs = [ 'arm', 'mips', 'x86' ]
# the list of include directories that belong to the kernel
# tree. used when looking for sources...
@@ -33,6 +33,7 @@ kernel_known_macros = {
"__KERNEL_STRICT_NAMES":"1",
"__CHECKER__": kCppUndefinedMacro,
"__CHECK_ENDIAN__": kCppUndefinedMacro,
+ "CONFIG_X86_32": "__i386__",
}
# define to true if you want to remove all defined(CONFIG_FOO) tests
@@ -44,14 +45,14 @@ kernel_remove_config_macros = True
# toolchain preprocessor
kernel_default_arch_macros = {
"arm": {},
- "x86": {"__i386__": "1", "CONFIG_X86_32": "1"},
"mips": {"CONFIG_32BIT":"1"},
+ "x86": {},
}
kernel_arch_token_replacements = {
"arm": {},
- "x86": {},
"mips": {"off_t":"__kernel_off_t"},
+ "x86": {},
}
# Replace tokens in the output according to this mapping
kernel_token_replacements = {
@@ -63,13 +64,7 @@ kernel_token_replacements = {
# in the final ARM headers. this is only used to keep optimized byteswapping
# static functions and stuff like that.
kernel_known_arm_statics = set(
- [ "___arch__swab32", # asm-arm/byteorder.h
- ]
- )
-
-kernel_known_x86_statics = set(
- [ "___arch__swab32", # asm-x86/byteorder.h
- "___arch__swab64", # asm-x86/byteorder.h
+ [ "___arch__swab32", # asm-arm/byteorder.h
]
)
@@ -78,6 +73,12 @@ kernel_known_mips_statics = set(
]
)
+kernel_known_x86_statics = set(
+ [ "___arch__swab32", # asm-x86/byteorder.h
+ "___arch__swab64", # asm-x86/byteorder.h
+ ]
+ )
+
kernel_known_generic_statics = set(
[ "__invalid_size_argument_for_IOC", # asm-generic/ioctl.h
"__cmsg_nxthdr", # linux/socket.h
@@ -92,8 +93,8 @@ kernel_known_generic_statics = set(
#
kernel_known_statics = {
"arm" : kernel_known_arm_statics,
+ "mips" : kernel_known_mips_statics,
"x86" : kernel_known_x86_statics,
- "mips" : kernel_known_mips_statics
}
# this is a list of macros which we want to specifically exclude from