diff options
Diffstat (limited to 'libc/kernel/tools/defaults.py')
-rw-r--r-- | libc/kernel/tools/defaults.py | 23 |
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 |