---- chromium-browser-23.0.1271.64/src/native_client/tools.gyp~ 2012-11-11 16:04:58.000000000 +0200
-+++ chromium-browser-23.0.1271.64/src/native_client/tools.gyp 2012-11-11 16:06:02.252718808 +0200
-@@ -35,7 +35,7 @@
- 'disable_pnacl%': 0,
- },
- 'conditions': [
-- ['disable_newlib==0', {
-+ ['disable_newlib==0 and disable_newlib_untar==0', {
- 'actions': [
- {
- 'action_name': 'Untar newlib',
-@@ -58,7 +58,7 @@
- },
- ]
- }],
-- ['disable_glibc==0', {
-+ ['disable_glibc==0 and disable_glibc_untar==0', {
- 'actions': [
- {
- 'action_name': 'Untar glibc',
-@@ -81,7 +81,7 @@
- },
- ]
- }],
-- ['disable_pnacl==0', {
-+ ['disable_pnacl==0 and disable_pnacl_untar==0', {
- 'actions': [
- {
- 'action_name': 'Untar pnacl',
---- chromium-browser-23.0.1271.64/src/native_client/build/untrusted.gypi~ 2012-11-11 16:04:58.000000000 +0200
-+++ chromium-browser-23.0.1271.64/src/native_client/build/untrusted.gypi 2012-11-11 16:19:15.369299822 +0200
-@@ -168,7 +168,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_newlib64)',
- '>(source_list_newlib64)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/stamp.untar',
- ],
- 'outputs': ['>(out_newlib64)'],
- 'action': [
-@@ -209,7 +208,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_newlib64)',
- '>(source_list_newlib64)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/stamp.untar',
- ],
- 'outputs': ['>(out_newlib64)'],
- 'action': [
-@@ -250,7 +248,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_newlib32)',
- '>(source_list_newlib32)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/stamp.untar',
- ],
- 'outputs': ['>(out_newlib32)'],
- 'action': [
-@@ -291,7 +288,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_newlib32)',
- '>(source_list_newlib32)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/stamp.untar',
- ],
- 'outputs': ['>(out_newlib32)'],
+--- chromium-browser-33.0.1750.117/native_client/build/untrusted.gypi 2014-02-28 09:05:36.555378590 +0200
++++ chromium-browser-33.0.1750.117.patched/native_client/build/untrusted.gypi 2014-02-27 23:15:49.506025570 +0200
+@@ -246,7 +246,7 @@
'action': [
-@@ -424,7 +420,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_glibc64)',
- '>(source_list_glibc64)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_glibc/stamp.untar',
- ],
- 'outputs': ['>(out_glibc64)'],
- 'action': [
-@@ -465,7 +460,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_glibc32)',
- '>(source_list_glibc32)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_glibc/stamp.untar',
- ],
- 'outputs': ['>(out_glibc32)'],
- 'action': [
-@@ -506,7 +500,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_glibc64)',
- '>(source_list_glibc64)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_glibc/stamp.untar',
- ],
- 'outputs': ['>(out_glibc64)'],
- 'action': [
-@@ -547,7 +540,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_glibc32)',
- '>(source_list_glibc32)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_glibc/stamp.untar',
- ],
- 'outputs': ['>(out_glibc32)'],
- 'action': [
-@@ -588,7 +580,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_glibc64)',
- '>(source_list_glibc64)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/stamp.untar',
- ],
- 'outputs': ['>(out_glibc64)'],
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'x86-64',
+ '--build', 'newlib_nexe',
+@@ -289,7 +289,7 @@
'action': [
-@@ -629,7 +620,6 @@
- '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
- '>@(extra_deps_glibc32)',
- '>(source_list_glibc32)',
-- '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/stamp.untar',
- ],
- 'outputs': ['>(out_glibc32)'],
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'x86-64',
+ '--build', 'newlib_nlib',
+@@ -332,7 +332,7 @@
'action': [
---- chromium-browser-23.0.1271.64/src/native_client/build/untrusted.gypi~ 2012-11-11 16:54:53.000000000 +0000
-+++ chromium-browser-23.0.1271.64/src/native_client/build/untrusted.gypi 2012-11-11 17:00:51.043248254 +0000
-@@ -173,7 +173,7 @@
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'x86-64',
+ '--build', 'newlib_nexe_pnacl',
+@@ -376,7 +376,7 @@
'action': [
- '>(python_exe)',
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
'--arch', 'x86-64',
+ '--build', 'newlib_nlib_pnacl',
+@@ -420,7 +420,7 @@
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'x86-32',
'--build', 'newlib_nexe',
-@@ -213,7 +213,7 @@
+@@ -463,7 +463,7 @@
'action': [
- '>(python_exe)',
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
- '--arch', 'x86-64',
+ '--arch', 'x86-32',
'--build', 'newlib_nlib',
-@@ -253,7 +253,7 @@
+@@ -506,7 +506,7 @@
'action': [
- '>(python_exe)',
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
'--arch', 'x86-32',
'--build', 'newlib_nexe',
-@@ -293,7 +293,7 @@
+@@ -549,7 +549,7 @@
'action': [
- '>(python_exe)',
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
'--arch', 'x86-32',
'--build', 'newlib_nlib',
-@@ -339,7 +339,7 @@
+@@ -598,7 +598,7 @@
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'arm',
+ '--build', 'newlib_nexe',
+@@ -641,7 +641,7 @@
'action': [
- '>(python_exe)',
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'arm',
+ '--build', 'newlib_nlib',
+@@ -684,7 +684,7 @@
+ 'action': [
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
'--arch', 'arm',
'--build', 'newlib_nexe',
-@@ -379,7 +379,7 @@
+@@ -727,7 +727,7 @@
'action': [
- '>(python_exe)',
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
'--arch', 'arm',
'--build', 'newlib_nlib',
-@@ -425,7 +425,7 @@
+@@ -772,7 +772,7 @@
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'arm',
+ '--build', 'newlib_nlib_pnacl',
+@@ -821,7 +821,7 @@
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'mips',
+ '--build', 'newlib_nexe',
+@@ -864,7 +864,7 @@
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'mips',
+ '--build', 'newlib_nlib',
+@@ -907,7 +907,7 @@
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'mips',
+ '--build', 'newlib_nexe',
+@@ -950,7 +950,7 @@
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'mips',
+ '--build', 'newlib_nlib',
+@@ -999,7 +999,7 @@
'action': [
- '>(python_exe)',
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
'--arch', 'x86-64',
'--build', 'glibc_nexe',
-@@ -465,7 +465,7 @@
+@@ -1042,7 +1042,7 @@
'action': [
- '>(python_exe)',
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
'--arch', 'x86-32',
'--build', 'glibc_nexe',
-@@ -505,7 +505,7 @@
+@@ -1085,7 +1085,7 @@
'action': [
- '>(python_exe)',
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
'--arch', 'x86-64',
'--build', 'glibc_nlib',
-@@ -545,7 +545,7 @@
+@@ -1128,7 +1128,7 @@
'action': [
- '>(python_exe)',
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
+ '-t', '<(DEPTH)/native_client/toolchain/',
'>@(extra_args)',
'--arch', 'x86-32',
'--build', 'glibc_nlib',
-@@ -586,7 +586,7 @@
- '>(python_exe)',
+@@ -1172,7 +1172,7 @@
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
'>@(extra_args)',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
'--arch', 'x86-64',
'--build', 'glibc_nso',
'--root', '<(DEPTH)',
-@@ -626,7 +626,7 @@
- '>(python_exe)',
+@@ -1215,7 +1215,7 @@
+ 'python',
'<(DEPTH)/native_client/build/build_nexe.py',
'>@(extra_args)',
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
'--arch', 'x86-32',
'--build', 'glibc_nso',
'--root', '<(DEPTH)',
+@@ -1304,7 +1304,7 @@
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'pnacl',
+ '--build', 'newlib_pexe',
+@@ -1335,7 +1335,7 @@
+ 'action' : [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '--arch', 'x86-32',
+ '--build', 'newlib_translate',
+ '--root', '<(DEPTH)',
+@@ -1360,7 +1360,7 @@
+ 'action' : [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '--arch', 'x86-64',
+ '--build', 'newlib_translate',
+ '--root', '<(DEPTH)',
+@@ -1385,7 +1385,7 @@
+ 'action' : [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '--arch', 'arm',
+ '--build', 'newlib_translate',
+ '--root', '<(DEPTH)',
+@@ -1423,7 +1423,7 @@
+ 'action': [
+ 'python',
+ '<(DEPTH)/native_client/build/build_nexe.py',
+- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/',
++ '-t', '<(DEPTH)/native_client/toolchain/',
+ '>@(extra_args)',
+ '--arch', 'pnacl',
+ '--build', 'newlib_plib',
+--- chromium-browser-33.0.1750.117/native_client/tools.gyp 2014-02-20 22:29:12.000000000 +0200
++++ chromium-browser-33.0.1750.117.patched/native_client/tools.gyp 2014-02-27 19:27:23.085288396 +0200
+@@ -64,6 +64,17 @@
+ 'arm_dir': '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_arm_newlib',
+ },
+ 'conditions': [
++ # create stamp.untar that build system depends on
++ ['disable_newlib==0 and disable_newlib_untar==1', {
++ 'actions': [
++ {
++ 'action_name': 'Touch newlib',
++ 'outputs': ['>(newlib_dir)/stamp.untar'],
++ 'inputs': [], # input is required. so let it be empty
++ 'action': ['touch', '<@(_outputs)'],
++ },
++ ],
++ }],
+ ['disable_newlib==0 and disable_newlib_untar==0', {
+ 'actions': [
+ {
+--- chromium-browser-24.0.1312.45/native_client/build/untrusted.gypi 2013-01-01 23:08:43.214443900 +0200
++++ chromium-browser-24.0.1312.45-almost-there/native_client/build/untrusted.gypi 2013-01-01 22:50:53.863859341 +0200
+@@ -142,6 +142,8 @@
+ 'variables': {
+ 'tool_name': 'newlib',
+ 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
++# make semaphore.h visible for base/shared_memory_nacl.cc compilation
++ 'newlib_dir': '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/x86_64-nacl',
+ 'out_newlib64%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x64.nexe',
+ 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
+ 'source_list_newlib64%': '<(tool_name)-x86-64.>(_target_name).source_list.gypcmd',
+@@ -169,11 +171,14 @@
+ '--root', '<(DEPTH)',
+ '--name', '>(out_newlib64)',
+ '--objdir', '>(objdir_newlib64)',
+- '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include_dirs)',
++# FIXED
++ '--include-dirs=<(inst_dir)/include ^(include_dirs) <(newlib_dir)/include >(_include_dirs)',
+ '--lib-dirs=>(lib_dirs_newlib64) ',
+ '--compile_flags=-m64 ^(newlib_tls_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
+ '--defines=^(defines) >(_defines)',
+- '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64 ^(link_flags) >(_link_flags)',
++# -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64
++# ./src/out/Release/obj/gen/sdk/toolchain/linux_x86_newlib/x86_64-nacl/lib/crt1.o
++ '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64 -B<(newlib_dir)/lib ^(link_flags) >(_link_flags)',
+ '--source-list=^|(<(source_list_newlib64) ^(_sources) ^(sources))',
+ ],
+ },
+@@ -183,6 +188,8 @@
+ 'variables': {
+ 'tool_name': 'newlib',
+ 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
++# make semaphore.h visible for base/shared_memory_nacl.cc compilation
++ 'newlib_dir': '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/x86_64-nacl',
+ 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
+ 'source_list_newlib64%': '<(tool_name)-x86-64.>(_target_name).source_list.gypcmd',
+ 'out_newlib64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nlib_target)',
+@@ -210,7 +217,19 @@
+ '--root', '<(DEPTH)',
+ '--name', '>(out_newlib64)',
+ '--objdir', '>(objdir_newlib64)',
+- '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include_dirs)',
++#XXX
++#glen@carme-pld src/base $ find .. -name semaphore.h
++#../native_client/src/untrusted/pthread/semaphore.h
++#../native_client_sdk/src/libraries/third_party/pthreads-win32/semaphore.h
++#../out/Release/obj/gen/sdk/toolchain/linux_x86_newlib/x86_64-nacl/include/semaphore.h
++#../out/Release/obj/gen/sdk/toolchain/linux_x86_pnacl/newlib/sdk/include/include/semaphore.h
++#
++#-I/home/users/glen/rpm/packages/chromium-browser/autoupdate/beta/BU
++#ILD/chromium-browser-24.0.1312.45/src/out/Release/obj/gen/tc_newlib/include
++# 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
++# 'newlib_dir__': '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib',
++
++ '--include-dirs=<(inst_dir)/include ^(include_dirs) <(newlib_dir)/include >(_include_dirs)',
+ '--lib-dirs=>(lib_dirs_newlib64) ',
+ '--compile_flags=-m64 ^(newlib_tls_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
+ '--defines=^(defines) >(_defines)',
+@@ -224,6 +243,8 @@
+ 'variables': {
+ 'tool_name': 'newlib',
+ 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
++# make semaphore.h visible for base/shared_memory_nacl.cc compilation
++ 'newlib_dir': '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/x86_64-nacl',
+ 'out_newlib32%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x32.nexe',
+ 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
+ 'source_list_newlib32%': '<(tool_name)-x86-32.>(_target_name).source_list.gypcmd',
+@@ -251,11 +272,12 @@
+ '--root', '<(DEPTH)',
+ '--name', '>(out_newlib32)',
+ '--objdir', '>(objdir_newlib32)',
+- '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include_dirs)',
++# FIXED
++ '--include-dirs=<(inst_dir)/include ^(include_dirs) <(newlib_dir)/include >(_include_dirs)',
+ '--lib-dirs=>(lib_dirs_newlib32)',
+ '--compile_flags=-m32 ^(newlib_tls_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
+ '--defines=^(defines) >(_defines)',
+- '--link_flags=-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32 ^(link_flags) >(_link_flags)',
++ '--link_flags=-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32 -B<(newlib_dir)/lib ^(link_flags) >(_link_flags)',
+ '--source-list=^|(<(source_list_newlib32) ^(_sources) ^(sources))',
+ ],
+ },
+@@ -265,6 +287,8 @@
+ 'variables': {
+ 'tool_name': 'newlib',
+ 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
++# make semaphore.h visible for base/shared_memory_nacl.cc compilation
++ 'newlib_dir': '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_x86_newlib/x86_64-nacl',
+ 'out_newlib32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)',
+ 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
+ 'source_list_newlib32%': '<(tool_name)-x86-32.>(_target_name).source_list.gypcmd',
+@@ -292,7 +316,8 @@
+ '--root', '<(DEPTH)',
+ '--name', '>(out_newlib32)',
+ '--objdir', '>(objdir_newlib32)',
+- '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include_dirs)',
++# FIXED
++ '--include-dirs=<(inst_dir)/include ^(include_dirs) <(newlib_dir)/include >(_include_dirs)',
+ '--lib-dirs=>(lib_dirs_newlib32)',
+ '--compile_flags=-m32 ^(newlib_tls_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
+ '--defines=^(defines) >(_defines)',
+Could not find toolchain prep stamp file: ../native_client/toolchain/linux_x86_newlib/stamp.prep
+Could not find toolchain prep stamp file: ../native_client/toolchain/linux_x86_newlib/stamp.prep
+make: *** [out/Release/obj/gen/tc_newlib/lib32/crtn.o] Error 1
+make: *** Waiting for unfinished jobs....
+make: *** [out/Release/obj/gen/tc_newlib/lib32/crti.o] Error 1
+--- chromium-browser-33.0.1750.117/native_client/build/build_nexe.py 2014-02-20 22:28:56.000000000 +0200
++++ chromium-browser-33.0.1750.117.patched/native_client/build/build_nexe.py 2014-02-27 19:27:23.085288396 +0200
+@@ -251,9 +251,6 @@
+ # Set the toolchain directories
+ self.toolchain = os.path.join(options.toolpath, tooldir)
+ self.toolbin = os.path.join(self.toolchain, 'bin')
+- self.toolstamp = os.path.join(self.toolchain, 'stamp.prep')
+- if not IsFile(self.toolstamp):
+- raise Error('Could not find toolchain prep stamp file: ' + self.toolstamp)
+
+ self.inc_paths = ArgToList(options.incdirs)
+ self.lib_paths = ArgToList(options.libdirs)
+@@ -465,10 +462,6 @@
+ return path
+
+ def NeedsRebuild(self, outd, out, src, rebuilt=False):
+- if not IsFile(self.toolstamp):
+- if rebuilt:
+- raise Error('Could not find toolchain stamp file %s.' % self.toolstamp)
+- return True
+ if not IsFile(outd):
+ if rebuilt:
+ raise Error('Could not find dependency file %s.' % outd)
+@@ -477,15 +470,9 @@
+ if rebuilt:
+ raise Error('Could not find output file %s.' % out)
+ return True
+- stamp_tm = GetMTime(self.toolstamp)
+ out_tm = GetMTime(out)
+ outd_tm = GetMTime(outd)
+ src_tm = GetMTime(src)
+- if IsStale(out_tm, stamp_tm, rebuilt):
+- if rebuilt:
+- raise Error('Output %s is older than toolchain stamp %s' % (
+- out, self.toolstamp))
+- return True
+ if IsStale(out_tm, src_tm, rebuilt):
+ if rebuilt:
+ raise Error('Output %s is older than source %s.' % (out, src))