Commit d414c915 by Christophe Lyon

testsuite: [arm] Add arm_softfp_ok and arm_hard_ok effective targets.

For arm-linux-gnueabi* targets, a toolchain cannot support the
float-abi opposite to the one it has been configured for: since glibc
does not support such multilibs, we end up lacking gnu/stubs-*.h when
including stdint.h for instance.

This patch introduces two new effective targets to detect whether we
can compile tests with -mfloat-abi=softfp or -mfloat-abi=hard.

This enables to make such tests unsupported rather than fail.

2020-04-22  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* lib/target-supports.exp (arm_softfp_ok): New effective target.
	(arm_hard_ok): Likewise.

	gcc/
	* doc/sourcebuild.texi (arm_softfp_ok, arm_hard_ok): Document.
parent a87e0cba
2020-04-22 Christophe Lyon <christophe.lyon@linaro.org>
* doc/sourcebuild.texi (arm_softfp_ok, arm_hard_ok): Document.
2020-04-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2020-04-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Andre Vieira <andre.simoesdiasvieira@arm.com> Andre Vieira <andre.simoesdiasvieira@arm.com>
Mihail Ionescu <mihail.ionescu@arm.com> Mihail Ionescu <mihail.ionescu@arm.com>
......
...@@ -1971,6 +1971,14 @@ ARM Target supports options suitable for accessing the Q-bit manipulation ...@@ -1971,6 +1971,14 @@ ARM Target supports options suitable for accessing the Q-bit manipulation
intrinsics from @code{arm_acle.h}. intrinsics from @code{arm_acle.h}.
Some multilibs may be incompatible with these options. Some multilibs may be incompatible with these options.
@item arm_softfp_ok
@anchor{arm_softfp_ok}
ARM target supports the @code{-mfloat-abi=softfp} option.
@item arm_hard_ok
@anchor{arm_hard_ok}
ARM target supports the @code{-mfloat-abi=hard} option.
@end table @end table
@subsubsection AArch64-specific attributes @subsubsection AArch64-specific attributes
......
2020-04-22 Christophe Lyon <christophe.lyon@linaro.org>
* lib/target-supports.exp (arm_softfp_ok): New effective target.
(arm_hard_ok): Likewise.
2020-04-22 Tobias Burnus <tobias@codesourcery.com> 2020-04-22 Tobias Burnus <tobias@codesourcery.com>
PR fortran/94709 PR fortran/94709
......
...@@ -4739,6 +4739,26 @@ proc check_effective_target_default_branch_protection { } { ...@@ -4739,6 +4739,26 @@ proc check_effective_target_default_branch_protection { } {
return [check_configured_with "enable-standard-branch-protection"] return [check_configured_with "enable-standard-branch-protection"]
} }
# Return 1 if this is an ARM target supporting -mfloat-abi=softfp.
proc check_effective_target_arm_softfp_ok { } {
return [check_no_compiler_messages arm_softfp_ok object {
#include <stdint.h>
int dummy;
int main (void) { return 0; }
} "-mfloat-abi=softfp"]
}
# Return 1 if this is an ARM target supporting -mfloat-abi=hard.
proc check_effective_target_arm_hard_ok { } {
return [check_no_compiler_messages arm_hard_ok object {
#include <stdint.h>
int dummy;
int main (void) { return 0; }
} "-mfloat-abi=hard"]
}
# Return 1 if the target supports ARMv8.1-M MVE with floating point # Return 1 if the target supports ARMv8.1-M MVE with floating point
# instructions, 0 otherwise. The test is valid for ARM. # instructions, 0 otherwise. The test is valid for ARM.
# Record the command line options needed. # Record the command line options needed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment