| OLD | NEW |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 # See native_client/Sconstruct for more details. | 7 # See native_client/Sconstruct for more details. |
| 8 # Expected address for beginning of data in for the IRT. | 8 # Expected address for beginning of data in for the IRT. |
| 9 'NACL_IRT_DATA_START': '0x3ef00000', | 9 'NACL_IRT_DATA_START': '0x3ef00000', |
| 10 # Expected address for beginning of code in for the IRT. | 10 # Expected address for beginning of code in for the IRT. |
| 11 'NACL_IRT_TEXT_START': '0x0fa00000', | 11 'NACL_IRT_TEXT_START': '0x0fa00000', |
| 12 'nacl_enable_arm_gcc%': 0, | |
| 13 # Default C compiler defines. | 12 # Default C compiler defines. |
| 14 'nacl_default_defines': [ | 13 'nacl_default_defines': [ |
| 15 '__linux__', | 14 '__linux__', |
| 16 '__STDC_LIMIT_MACROS=1', | 15 '__STDC_LIMIT_MACROS=1', |
| 17 '__STDC_FORMAT_MACROS=1', | 16 '__STDC_FORMAT_MACROS=1', |
| 18 '_GNU_SOURCE=1', | 17 '_GNU_SOURCE=1', |
| 19 '_BSD_SOURCE=1', | 18 '_BSD_SOURCE=1', |
| 20 '_POSIX_C_SOURCE=199506', | 19 '_POSIX_C_SOURCE=199506', |
| 21 '_XOPEN_SOURCE=600', | 20 '_XOPEN_SOURCE=600', |
| 22 'DYNAMIC_ANNOTATIONS_ENABLED=1', | 21 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 'nacl_glibc_tc_root': '<(DEPTH)/native_client/toolchain/linux_x86'
, | 55 'nacl_glibc_tc_root': '<(DEPTH)/native_client/toolchain/linux_x86'
, |
| 57 }, | 56 }, |
| 58 }], | 57 }], |
| 59 ], | 58 ], |
| 60 'defines': [], | 59 'defines': [], |
| 61 'sources': [], | 60 'sources': [], |
| 62 'compile_flags': [], | 61 'compile_flags': [], |
| 63 'link_flags': [], | 62 'link_flags': [], |
| 64 'include_dirs': [], | 63 'include_dirs': [], |
| 65 'variables': { | 64 'variables': { |
| 65 'newlib_tls_flags': [ '-mtls-use-call' ], |
| 66 'nexe_target': '', | 66 'nexe_target': '', |
| 67 'nlib_target': '', | 67 'nlib_target': '', |
| 68 'nso_target': '', | 68 'nso_target': '', |
| 69 'build_newlib': 0, | 69 'build_newlib': 0, |
| 70 'build_glibc': 0, | 70 'build_glibc': 0, |
| 71 'disable_glibc%': 0, | 71 'disable_glibc%': 0, |
| 72 'extra_args': [], | 72 'extra_args': [], |
| 73 'enable_x86_32': 1, | 73 'enable_x86_32': 1, |
| 74 'enable_x86_64': 1, | 74 'enable_x86_64': 1, |
| 75 'enable_arm': 0, | 75 'enable_arm': 0, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 101 }, | 101 }, |
| 102 }, { | 102 }, { |
| 103 # ARM case | 103 # ARM case |
| 104 'target_defaults': { | 104 'target_defaults': { |
| 105 'defines': [], | 105 'defines': [], |
| 106 'sources': [], | 106 'sources': [], |
| 107 'compile_flags': [], | 107 'compile_flags': [], |
| 108 'link_flags': [], | 108 'link_flags': [], |
| 109 'include_dirs': [], | 109 'include_dirs': [], |
| 110 'variables': { | 110 'variables': { |
| 111 'newlib_tls_flags': [ '-mtp=soft' ], |
| 111 'python_exe': 'python', | 112 'python_exe': 'python', |
| 112 'nexe_target': '', | 113 'nexe_target': '', |
| 113 'nlib_target': '', | 114 'nlib_target': '', |
| 114 'nso_target': '', | 115 'nso_target': '', |
| 116 'force_arm_pnacl': 0, |
| 115 'build_newlib': 0, | 117 'build_newlib': 0, |
| 116 'nacl_enable_arm_gcc%': 0, | |
| 117 'build_glibc': 0, | 118 'build_glibc': 0, |
| 118 'disable_glibc%': 1, | 119 'disable_glibc%': 1, |
| 119 'extra_args': [], | 120 'extra_args': [], |
| 120 'enable_x86_32': 0, | 121 'enable_x86_32': 0, |
| 121 'enable_x86_64': 0, | 122 'enable_x86_64': 0, |
| 122 'enable_arm': 1, | 123 'enable_arm': 1, |
| 123 'extra_deps_newlib_arm': [], | 124 'extra_deps_newlib_arm': [], |
| 124 'native_sources': [], | 125 'native_sources': [], |
| 125 'lib_dirs_newlib_arm': [], | 126 'lib_dirs_newlib_arm': [], |
| 126 'include_dirs': ['<(DEPTH)', '<(DEPTH)/ppapi'], | 127 'include_dirs': ['<(DEPTH)', '<(DEPTH)/ppapi'], |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 ], | 309 ], |
| 309 }, | 310 }, |
| 310 ], | 311 ], |
| 311 }], | 312 }], |
| 312 ], | 313 ], |
| 313 }, | 314 }, |
| 314 }], | 315 }], |
| 315 ['target_arch=="arm"', { | 316 ['target_arch=="arm"', { |
| 316 'target_defaults': { | 317 'target_defaults': { |
| 317 'target_conditions': [ | 318 'target_conditions': [ |
| 318 # GCC ARM build | 319 # GCC ARM build (the default) |
| 319 ['nacl_enable_arm_gcc!=0 and nexe_target!="" and build_newlib!=0', { | 320 ['force_arm_pnacl==0 and nexe_target!="" and build_newlib!=0', { |
| 320 'variables': { | 321 'variables': { |
| 321 'tool_name': 'newlib', | 322 'tool_name': 'newlib', |
| 322 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', | 323 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
| 323 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe
', | 324 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe
', |
| 324 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_ta
rget_name)', | 325 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_ta
rget_name)', |
| 325 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sour
ce_list.gypcmd', | 326 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sour
ce_list.gypcmd', |
| 326 }, | 327 }, |
| 327 'actions': [ | 328 'actions': [ |
| 328 { | 329 { |
| 329 'action_name': 'build newlib arm nexe', | 330 'action_name': 'build newlib arm nexe', |
| (...skipping 12 matching lines...) Expand all Loading... |
| 342 '<(DEPTH)/native_client/build/build_nexe.py', | 343 '<(DEPTH)/native_client/build/build_nexe.py', |
| 343 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', | 344 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', |
| 344 '>@(extra_args)', | 345 '>@(extra_args)', |
| 345 '--arch', 'arm', | 346 '--arch', 'arm', |
| 346 '--build', 'newlib_nexe', | 347 '--build', 'newlib_nexe', |
| 347 '--root', '<(DEPTH)', | 348 '--root', '<(DEPTH)', |
| 348 '--name', '>(out_newlib_arm)', | 349 '--name', '>(out_newlib_arm)', |
| 349 '--objdir', '>(objdir_newlib_arm)', | 350 '--objdir', '>(objdir_newlib_arm)', |
| 350 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include
_dirs)', | 351 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include
_dirs)', |
| 351 '--lib-dirs=>(lib_dirs_newlib_arm) ', | 352 '--lib-dirs=>(lib_dirs_newlib_arm) ', |
| 352 '--compile_flags=^(gcc_compile_flags) >(_gcc_compile_flags) ^(
compile_flags) >(_compile_flags)', | 353 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(newli
b_tls_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_comp
ile_flags)', |
| 353 '--defines=^(defines) >(_defines)', | 354 '--defines=^(defines) >(_defines)', |
| 354 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^(
link_flags) >(_link_flags)', | 355 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^(
link_flags) >(_link_flags)', |
| 355 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour
ces) ^(native_sources))', | 356 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour
ces) ^(native_sources))', |
| 356 ], | 357 ], |
| 357 }, | 358 }, |
| 358 ], | 359 ], |
| 359 }], | 360 }], |
| 360 # GCC ARM library build | 361 # GCC ARM library build (the default) |
| 361 ['nacl_enable_arm_gcc!=0 and nlib_target!="" and build_newlib!=0', { | 362 ['force_arm_pnacl==0 and nlib_target!="" and build_newlib!=0', { |
| 362 'variables': { | 363 'variables': { |
| 363 'tool_name': 'newlib', | 364 'tool_name': 'newlib', |
| 364 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', | 365 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
| 365 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib
arm/>(nlib_target)', | 366 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib
arm/>(nlib_target)', |
| 366 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar
get_name)', | 367 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar
get_name)', |
| 367 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc
e_list.gypcmd', | 368 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc
e_list.gypcmd', |
| 368 }, | 369 }, |
| 369 'actions': [ | 370 'actions': [ |
| 370 { | 371 { |
| 371 'action_name': 'build newlib arm nlib', | 372 'action_name': 'build newlib arm nlib', |
| (...skipping 12 matching lines...) Expand all Loading... |
| 384 '<(DEPTH)/native_client/build/build_nexe.py', | 385 '<(DEPTH)/native_client/build/build_nexe.py', |
| 385 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', | 386 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', |
| 386 '>@(extra_args)', | 387 '>@(extra_args)', |
| 387 '--arch', 'arm', | 388 '--arch', 'arm', |
| 388 '--build', 'newlib_nlib', | 389 '--build', 'newlib_nlib', |
| 389 '--root', '<(DEPTH)', | 390 '--root', '<(DEPTH)', |
| 390 '--name', '>(out_newlib_arm)', | 391 '--name', '>(out_newlib_arm)', |
| 391 '--objdir', '>(objdir_newlib_arm)', | 392 '--objdir', '>(objdir_newlib_arm)', |
| 392 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include
_dirs)', | 393 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include
_dirs)', |
| 393 '--lib-dirs=>(lib_dirs_newlib_arm)', | 394 '--lib-dirs=>(lib_dirs_newlib_arm)', |
| 394 '--compile_flags=^(gcc_compile_flags) >(_gcc_compile_flags) ^(
compile_flags) >(_compile_flags)', | 395 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(newli
b_tls_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_comp
ile_flags)', |
| 395 '--defines=^(defines) >(_defines)', | 396 '--defines=^(defines) >(_defines)', |
| 396 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^(
link_flags) >(_link_flags)', | 397 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^(
link_flags) >(_link_flags)', |
| 397 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour
ces) ^(native_sources))', | 398 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour
ces) ^(native_sources))', |
| 398 ], | 399 ], |
| 399 }, | 400 }, |
| 400 ], | 401 ], |
| 401 }], | 402 }], |
| 402 # pnacl ARM build is the default (unless nacl_enable_arm_gcc is set) | 403 # pnacl ARM build (only used if force_arm_pnacl is set) |
| 403 ['nacl_enable_arm_gcc==0 and nexe_target!="" and build_newlib!=0', { | 404 ['force_arm_pnacl==1 and nexe_target!="" and build_newlib!=0', { |
| 404 'variables': { | 405 'variables': { |
| 405 'tool_name': 'newlib', | 406 'tool_name': 'newlib', |
| 406 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', | 407 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
| 407 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe'
, | 408 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe'
, |
| 408 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar
get_name)', | 409 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar
get_name)', |
| 409 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc
e_list.gypcmd', | 410 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc
e_list.gypcmd', |
| 410 }, | 411 }, |
| 411 'actions': [ | 412 'actions': [ |
| 412 { | 413 { |
| 413 'action_name': 'build newlib arm nexe (via pnacl)', | 414 'action_name': 'build newlib arm nexe (via pnacl)', |
| (...skipping 14 matching lines...) Expand all Loading... |
| 428 '>@(extra_args)', | 429 '>@(extra_args)', |
| 429 '--arch', 'arm', | 430 '--arch', 'arm', |
| 430 '--build', 'newlib_nexe_pnacl', | 431 '--build', 'newlib_nexe_pnacl', |
| 431 '--root', '<(DEPTH)', | 432 '--root', '<(DEPTH)', |
| 432 '--name', '>(out_newlib_arm)', | 433 '--name', '>(out_newlib_arm)', |
| 433 '--objdir', '>(objdir_newlib_arm)', | 434 '--objdir', '>(objdir_newlib_arm)', |
| 434 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include
_dirs)', | 435 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include
_dirs)', |
| 435 '--lib-dirs=>(lib_dirs_newlib_arm) ', | 436 '--lib-dirs=>(lib_dirs_newlib_arm) ', |
| 436 '--compile_flags=--pnacl-frontend-triple=armv7-unknown-nacl-gn
ueabi -mfloat-abi=hard ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags)
>(_pnacl_compile_flags)', | 437 '--compile_flags=--pnacl-frontend-triple=armv7-unknown-nacl-gn
ueabi -mfloat-abi=hard ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags)
>(_pnacl_compile_flags)', |
| 437 '--defines=^(defines) >(_defines)', | 438 '--defines=^(defines) >(_defines)', |
| 438 '--link_flags=-arch arm --pnacl-allow-translate --pnacl-allow-
native -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^(link_flags) >(_link_flags
)', | 439 '--link_flags=-arch arm --pnacl-allow-translate --pnacl-allow-
native -Wl,--pnacl-irt-link -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^(link
_flags) >(_link_flags)', |
| 439 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour
ces))', | 440 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour
ces))', |
| 440 ], | 441 ], |
| 441 }, | 442 }, |
| 442 ], | 443 ], |
| 443 }], | 444 }], |
| 444 # pnacl ARM library build | 445 # pnacl ARM library build |
| 445 ['nacl_enable_arm_gcc==0 and nlib_target!="" and build_newlib!=0', { | 446 ['force_arm_pnacl==1 and nlib_target!="" and build_newlib!=0', { |
| 446 'variables': { | 447 'variables': { |
| 447 'tool_name': 'newlib', | 448 'tool_name': 'newlib', |
| 448 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', | 449 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
| 449 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib
arm/>(nlib_target)', | 450 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib
arm/>(nlib_target)', |
| 450 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar
get_name)', | 451 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar
get_name)', |
| 451 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc
e_list.gypcmd', | 452 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc
e_list.gypcmd', |
| 452 }, | 453 }, |
| 453 'actions': [ | 454 'actions': [ |
| 454 { | 455 { |
| 455 'action_name': 'build newlib arm nlib (via pnacl)', | 456 'action_name': 'build newlib arm nlib (via pnacl)', |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 '-fomit-frame-pointer', | 756 '-fomit-frame-pointer', |
| 756 # A debugger should be able to unwind IRT call frames. As the IRT is | 757 # A debugger should be able to unwind IRT call frames. As the IRT is |
| 757 # compiled with high level of optimizations and without debug info, | 758 # compiled with high level of optimizations and without debug info, |
| 758 # compiler is requested to generate unwind tables explicitly. This | 759 # compiler is requested to generate unwind tables explicitly. This |
| 759 # is the default behavior on x86-64 and when compiling C++ with | 760 # is the default behavior on x86-64 and when compiling C++ with |
| 760 # exceptions enabled, the change is for the benefit of x86-32 C. | 761 # exceptions enabled, the change is for the benefit of x86-32 C. |
| 761 # These are only required for the IRT but are here for all | 762 # These are only required for the IRT but are here for all |
| 762 # nacl-gcc-compiled binaries because the IRT depends on other libs | 763 # nacl-gcc-compiled binaries because the IRT depends on other libs |
| 763 '-fasynchronous-unwind-tables', | 764 '-fasynchronous-unwind-tables', |
| 764 ], | 765 ], |
| 765 'newlib_tls_flags': [ | |
| 766 # This option is currently only honored by x86/x64 builds. The | |
| 767 # equivalent arm option is apparently -mtp=soft but we don't need use | |
| 768 # it at this point. | |
| 769 '-mtls-use-call', | |
| 770 ], | |
| 771 'pnacl_compile_flags': [ | 766 'pnacl_compile_flags': [ |
| 772 '-Wno-extra-semi', | 767 '-Wno-extra-semi', |
| 773 '-Wno-unused-private-field', | 768 '-Wno-unused-private-field', |
| 774 ], | 769 ], |
| 775 }, | 770 }, |
| 776 'target_conditions': [ | 771 'target_conditions': [ |
| 777 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0', { | 772 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0', { |
| 778 'variables': { | 773 'variables': { |
| 779 'out_pnacl_newlib_x86_32_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnac
l_newlib_x32.nexe', | 774 'out_pnacl_newlib_x86_32_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnac
l_newlib_x32.nexe', |
| 780 'out_pnacl_newlib_x86_64_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnac
l_newlib_x64.nexe', | 775 'out_pnacl_newlib_x86_64_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnac
l_newlib_x64.nexe', |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 '--defines=^(defines) >(_defines)', | 930 '--defines=^(defines) >(_defines)', |
| 936 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib ^(l
ink_flags) >(_link_flags)', | 931 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib ^(l
ink_flags) >(_link_flags)', |
| 937 '--source-list=^|(<(source_list_pnacl_newlib) ^(_sources) ^(source
s))', | 932 '--source-list=^|(<(source_list_pnacl_newlib) ^(_sources) ^(source
s))', |
| 938 ], | 933 ], |
| 939 }, | 934 }, |
| 940 ], | 935 ], |
| 941 }], | 936 }], |
| 942 ], | 937 ], |
| 943 }, | 938 }, |
| 944 } | 939 } |
| OLD | NEW |