X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fnative_client%2Ftests%2Fsimd%2Fnacl.scons;h=364f19b5487b0951c6037fcdf30deb3b087c924d;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=4b0436c11f8424ef37c9f2cdd6e486192ff4edd8;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/native_client/tests/simd/nacl.scons b/src/native_client/tests/simd/nacl.scons index 4b0436c..364f19b 100644 --- a/src/native_client/tests/simd/nacl.scons +++ b/src/native_client/tests/simd/nacl.scons @@ -23,6 +23,7 @@ def AddTest(env, src, exit_status='0', golden_file=None, test_suffix='', node, ['toolchain_tests', 'small_tests'], 'run_' + name + '_test', is_broken=is_broken) +c_flags = ['-std=gnu99'] cxx_flags = (['-Wc++11-narrowing', '-std=gnu++11'] if env.Bit('bitcode') else ['-std=gnu++0x']) @@ -37,13 +38,29 @@ elif env.Bit('target_arm'): native_flags = ['--target=armv7a-unknown-nacl-gnueabi','-mfloat-abi=hard'] elif env.Bit('target_mips32'): native_flags = [] -native_env.Append(CCFLAGS=native_flags + cxx_flags) +native_env.Append(CFLAGS=c_flags) +native_env.Append(CXXFLAGS=cxx_flags) +native_env.Append(CCFLAGS=native_flags) +# C++ code can't use vector literals because of the following warning: +# compound literals are a C99-specific feature +# Remove pedantic to work around this issue. +native_env.FilterOut(CCFLAGS=['-pedantic']) ref_env = env.Clone() ref_flags = ['-DVREFIMPL'] -ref_env.Append(CCFLAGS=ref_flags + cxx_flags) +ref_env.Append(CFLAGS=c_flags) +ref_env.Append(CXXFLAGS=cxx_flags) +ref_env.Append(CCFLAGS=ref_flags) # TODO(jfb): The native environment currently doesn't compile. if env.Bit('bitcode'): AddTest(native_env, 'simd.cc', test_suffix='_native') AddTest(ref_env, 'simd.cc', test_suffix='_ref') + +# GCC 4.4 doesn't support all features of the vector extensions in C. +# TODO(jfb) Re-enable testing when we migrate to a newer GCC. +if env.Bit('bitcode') and env['TOOLCHAIN_FEATURE_VERSION'] >= 5: + AddTest(native_env, 'vector_extension.c', + golden_file=native_env.File('vector_extension.stdout')) + AddTest(native_env, 'vector_shuffle.cc', + golden_file=native_env.File('vector_shuffle.stdout'))