Chromium Code Reviews| Index: build/untrusted.gypi |
| diff --git a/build/untrusted.gypi b/build/untrusted.gypi |
| index 77b9f11fb2114242e705a59d1ef9ca94f8fa2fdc..e71eb7c082e457fa022c819290ebf175caadacb6 100755 |
| --- a/build/untrusted.gypi |
| +++ b/build/untrusted.gypi |
| @@ -130,7 +130,7 @@ |
| # X86-32 IRT needs to be callable with an under-aligned stack so we |
| # disable SSE instructions, which can fault on misaligned addresses: |
| # see https://code.google.com/p/nativeclient/issues/detail?id=3935 |
| - 'irt_flags_x86_32': '-Wt,-mattr=-sse', |
| + 'irt_flags_x86_32': '-mstackrealign -mno-sse', |
| }, |
| }, |
| }], |
| @@ -341,14 +341,14 @@ |
| '<@(common_args)', |
| '>@(extra_args)', |
| '--arch', 'x86-64', |
| - '--build', 'newlib_nexe_pnacl', |
| + '--build', 'newlib_nexe_clang', |
| '--name', '>(out_newlib64)', |
| '--objdir', '>(objdir_newlib64)', |
| '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)', |
| - '--compile_flags=--target=x86_64-unknown-nacl ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
| + '--compile_flags=^(pnacl_compile_flags) >(_pnacl_compile_flags) ^(native_irt_compile_flags) -integrated-as', |
|
jvoung (off chromium)
2015/03/19 17:36:25
Could add the same -fno-exceptions and -Os here th
Derek Schuff
2015/03/19 18:36:17
Done. Factored them into a variable.
|
| '--gomadir', '<(gomadir)', |
| '--defines=^(defines) >(_defines)', |
| - '--link_flags=--target=x86_64-unknown-nacl -arch x86-64 --pnacl-allow-translate --pnacl-allow-native -B>(tc_lib_dir_irt64) -L>(tc_lib_dir_irt64) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags) >(libcpp_irt_stdlibs)', |
| + '--link_flags=-B>(tc_lib_dir_irt64) -L>(tc_lib_dir_irt64) ^(native_irt_link_flags) ^(link_flags) >(_link_flags) >(libcpp_irt_stdlibs)', |
| '--source-list=^(source_list_newlib64)', |
| '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', |
| '--irt-linker=<(DEPTH)/native_client/build/link_irt.py', |
| @@ -384,14 +384,14 @@ |
| '<@(common_args)', |
| '>@(extra_args)', |
| '--arch', 'x86-64', |
| - '--build', 'newlib_nlib_pnacl', |
| + '--build', 'newlib_nlib_clang', |
| '--name', '>(out_newlib64)', |
| '--objdir', '>(objdir_newlib64)', |
| '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)', |
| - '--compile_flags=--target=x86_64-unknown-nacl ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
| + '--compile_flags=^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags) ^(native_irt_compile_flags) -Os -integrated-as -fno-exceptions', |
| '--gomadir', '<(gomadir)', |
| '--defines=^(defines) >(_defines)', |
| - '--link_flags=--target=x86_64-unknown-nacl -B>(tc_lib_dir_irt64) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)', |
| + '--link_flags=-B>(tc_lib_dir_irt64) ^(link_flags) >(_link_flags) ^(native_irt_link_flags)', |
|
jvoung (off chromium)
2015/03/19 17:36:25
could make the order of link_flags vs native_irt_l
Derek Schuff
2015/03/19 18:36:17
yeah... there's general inconsistency there now be
|
| '--source-list=^(source_list_newlib64)', |
| ], |
| }, |
| @@ -509,14 +509,14 @@ |
| '<@(common_args)', |
| '>@(extra_args)', |
| '--arch', 'x86-32', |
| - '--build', 'newlib_nexe_pnacl', |
| + '--build', 'newlib_nexe_clang', |
| '--name', '>(out_newlib32)', |
| '--objdir', '>(objdir_newlib32)', |
| '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)', |
| - '--compile_flags=--target=i686-unknown-nacl ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
| + '--compile_flags=-m32 ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags) >(irt_flags_x86_32) ^(native_irt_compile_flags)', |
|
jvoung (off chromium)
2015/03/19 17:36:26
Same comment about -Os and -fno-exceptions. Might
Derek Schuff
2015/03/19 18:36:17
Done; factored them into their own variable as men
|
| '--gomadir', '<(gomadir)', |
| '--defines=^(defines) >(_defines)', |
| - '--link_flags=--target=i686-unknown-nacl -arch x86-32 --pnacl-allow-translate --pnacl-allow-native >(irt_flags_x86_32) -B>(tc_lib_dir_irt32) -L>(tc_lib_dir_irt32) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags) >(libcpp_irt_stdlibs)', |
| + '--link_flags=-m32 -B>(tc_lib_dir_irt32) -L>(tc_lib_dir_irt32) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags) ^(native_irt_link_flags) >(libcpp_irt_stdlibs)', |
|
jvoung (off chromium)
2015/03/19 17:36:25
^(pnacl_irt_link_flags) is still here, and it has
Derek Schuff
2015/03/19 18:36:16
Done.
|
| '--source-list=^(source_list_newlib32)', |
| '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', |
| '--irt-linker=<(DEPTH)/native_client/build/link_irt.py', |
| @@ -552,14 +552,14 @@ |
| '<@(common_args)', |
| '>@(extra_args)', |
| '--arch', 'x86-32', |
| - '--build', 'newlib_nlib_pnacl', |
| + '--build', 'newlib_nlib_clang', |
| '--name', '>(out_newlib32)', |
| '--objdir', '>(objdir_newlib32)', |
| '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)', |
| - '--compile_flags=--target=i686-unknown-nacl >(irt_flags_x86_32) ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
| + '--compile_flags=-m32 >(irt_flags_x86_32) ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags) ^(native_irt_compile_flags) -Os -fno-exceptions', |
| '--gomadir', '<(gomadir)', |
| '--defines=^(defines) >(_defines)', |
| - '--link_flags=--target=i686-unknown-nacl -B>(tc_lib_dir_irt32) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)', |
| + '--link_flags=-m32 -B>(tc_lib_dir_irt32) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags) ^(native_irt_link_flags)', |
| '--source-list=^(source_list_newlib32)', |
| ], |
| }, |
| @@ -833,10 +833,10 @@ |
| '--name', '>(out_newlib_arm)', |
| '--objdir', '>(objdir_newlib_arm)', |
| '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)', |
| - '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
| + '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(native_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
| '--gomadir', '<(gomadir)', |
| '--defines=^(defines) >(_defines)', |
| - '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^(link_flags) >(_link_flags)', |
| + '--link_flags=-B>(tc_lib_dir_irt_arm) ^(native_irt_link_flags) ^(link_flags) >(_link_flags)', |
| '--source-list=^(source_list_newlib_arm)', |
| '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)', |
| '--irt-linker=<(DEPTH)/native_client/build/link_irt.py', |
| @@ -876,10 +876,10 @@ |
| '--name', '>(out_newlib_arm)', |
| '--objdir', '>(objdir_newlib_arm)', |
| '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)', |
| - '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
| + '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(native_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
| '--gomadir', '<(gomadir)', |
| '--defines=^(defines) >(_defines)', |
| - '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^(link_flags) >(_link_flags)', |
| + '--link_flags=-B>(tc_lib_dir_irt_arm) ^(native_irt_link_flags) ^(link_flags) >(_link_flags)', |
| '--source-list=^(source_list_newlib_arm)', |
| ], |
| }, |
| @@ -1453,11 +1453,11 @@ |
| ], |
| # IRT compile/link flags to make the binary smaller. |
| # Omitted from non-IRT libraries to keep the libraries themselves small. |
| - 'gcc_irt_compile_flags': [ |
| + 'native_irt_compile_flags': [ |
| '-ffunction-sections', |
| '-fdata-sections', |
| ], |
| - 'gcc_irt_link_flags': [ |
| + 'native_irt_link_flags': [ |
| '-Wl,--gc-sections', |
| ], |
| 'pnacl_irt_link_flags': [ |
| @@ -1478,6 +1478,7 @@ |
| '-lc', |
| '-lnacl', |
| '-lgcc', |
| + '-lgcc_eh', |
|
jvoung (off chromium)
2015/03/19 17:51:53
Also, does lgcc_eh need to be here, if the stubs a
jvoung (off chromium)
2015/03/19 19:21:06
Ping about this question?
If it links without thi
|
| '-Wl,--end-group' |
| ], |
| }, |