Index: tests/toolchain/nacl.scons |
diff --git a/tests/toolchain/nacl.scons b/tests/toolchain/nacl.scons |
index 361e1e52227157518fec9cb8c68de069d841c680..f73e7f325d37152946e573019f4e84212fc474d4 100644 |
--- a/tests/toolchain/nacl.scons |
+++ b/tests/toolchain/nacl.scons |
@@ -555,7 +555,7 @@ env.AddNodeToTestSuite(node, ['toolchain_tests','small_tests'], 'run_wrap_test') |
if (env.Bit('target_x86_32') and env.Bit('bitcode') and |
not env.Bit('pnacl_generate_pexe') and |
- env['TOOLCHAIN_FEATURE_VERSION'] >= 7): |
+ env['TOOLCHAIN_FEATURE_VERSION'] >= 8): |
# This test compiles a file that will need to generate a call to a compiler-rt |
# function (__udivdi3) on x86-32. Ensure that when we pre-translate to a |
# native object file, libgcc is included in the bitcode link to satisfy the |
@@ -567,9 +567,25 @@ if (env.Bit('target_x86_32') and env.Bit('bitcode') and |
mixedlink_env.Append(LINKFLAGS=['--pnacl-allow-translate', |
'--pnacl-allow-native', |
'-arch', 'x86-32']) |
+ |
nexe = mixedlink_env.ComponentProgram('libgcc_mixed_link', 'needs_libgcc.c', |
EXTRA_LIBS=['${NONIRT_LIBS}']) |
node = mixedlink_env.CommandSelLdrTestNacl('libgcc_mixed_link.out', nexe, |
['9', '3']) |
- mixedlink_env.AddNodeToTestSuite(node, ['nonpexe_tests', 'small_tests'], |
+ mixedlink_env.AddNodeToTestSuite(node, ['nonpexe_tests', 'small_tests', |
+ 'toolchain_tests'], |
'run_libgcc_mixed_link_test') |
+ |
+ # This tests the translator's -force-align-stack flag, which means that the |
+ # compiler cannot assume that the stack pointer is aligned to a 16-byte |
+ # boundary, and must force realignment on entry to each function. |
+ mixedlink_env.Append(ASFLAGS=['-arch', 'x86-32']) |
+ mixedlink_env.Append(CCFLAGS=['-Wt,-force-align-stack']) |
+ obj1 = mixedlink_env.ComponentObject('call_with_misaligned_stack.S') |
Mark Seaborn
2014/08/28 19:13:13
I suspect you don't need ComponentObject. Can the
Derek Schuff
2014/08/28 22:07:24
Done.
|
+ obj2 = mixedlink_env.ComponentObject('stackalign_test.c') |
+ nexe = mixedlink_env.ComponentProgram('stackalign_test', [obj1, obj2], |
+ EXTRA_LIBS=['${NONIRT_LIBS}']) |
+ node = mixedlink_env.CommandSelLdrTestNacl('stackalign.out', nexe) |
+ mixedlink_env.AddNodeToTestSuite(node, ['nonpexe_tests', 'small_tests', |
+ 'toolchain_tests'], |
Mark Seaborn
2014/08/28 19:13:13
Nit: fix indentation alignment
Derek Schuff
2014/08/28 22:07:24
Done.
|
+ 'run_stackalign_test') |
Mark Seaborn
2014/08/28 19:13:13
Nit: fix indentation alignment here too
Derek Schuff
2014/08/28 22:07:24
Done.
|