diff --git a/meson.build b/meson.build index 9e5c1fe399..9a24b17373 100644 --- a/meson.build +++ b/meson.build @@ -1241,8 +1241,8 @@ conf_data.set('_HAVE_SEMIHOST', has_semihost, description: 'Semihost APIs suppor # By default, tests don't require any special arguments -# disable compiler built-ins so we reach the library equivalents -test_c_args = c_args + arg_fnobuiltin +test_c_args = c_args +# disable compiler built-ins so we don't use native equivalents native_c_args += arg_fnobuiltin if tests_enable_stack_protector if cc.has_argument('-fstack-protector-all') and cc.has_argument('-fstack-protector-strong') diff --git a/test/meson.build b/test/meson.build index 988678b6ad..337cb610c1 100644 --- a/test/meson.build +++ b/test/meson.build @@ -242,6 +242,22 @@ foreach target : targets env: test_env) endif + t1 = 'math_errhandling' + if target == '' + t1_name = t1 + else + t1_name = t1 + '_' + target + endif + + test(t1_name, + executable(t1_name, ['math_errhandling.c'], + c_args: arg_fnobuiltin + _c_args, + link_args: _link_args, + link_with: _libs, + include_directories: inc), + depends: bios_bin, + env: test_env) + t1 = 'rounding-mode' if target == '' t1_name = t1 @@ -251,7 +267,7 @@ foreach target : targets test(t1_name, executable(t1_name, ['rounding-mode.c', 'rounding-mode-sub.c'], - c_args: _c_args, + c_args: arg_fnobuiltin + _c_args, link_args: _link_args, link_with: _libs, include_directories: inc), @@ -268,7 +284,7 @@ foreach target : targets test(t1_name, executable(t1_name, [t1_src, 'lock-valid.c'], - c_args: double_printf_compile_args + _c_args, + c_args: double_printf_compile_args + arg_fnobuiltin + _c_args, link_args: double_printf_link_args + _link_args, link_with: _libs, link_depends: test_link_depends, @@ -298,7 +314,7 @@ foreach target : targets ) plain_tests = ['rand', 'regex', 'ungetc', 'fenv', - 'math_errhandling', 'malloc', 'tls', + 'malloc', 'tls', 'ffs', 'setjmp', 'atexit', 'on_exit', 'math-funcs', 'timegm', 'time-tests', 'test-strtod', 'test-strchr',