This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [testsuite] fix to check_effective_target_arm_hard_vfp_ok


On 21/09/12 03:52, Janis Johnson wrote:
Tests in gcc.target/arm/aapcs check for floating-point arguments being
passed correctly, but the added flag "-mfloat-abi=hard" can be
overridden by another value in flags used for all tests (like multilib
flags), causing the tests to fail.  The tests in that directory are all
gated on effective-target arm_hard_vfp_ok; this patch changes its code
to return 0 if the test will use a different value of -mfloat-abi.

Tested on arm-none-eabi with a variety of test flags.  I'm hoping to
hear from ARM experts that this is OK; there are a handful of tests in
arm/aapcs that pass even with -mfloat-abi=softfp, so a better solution
might be to skip individual tests for that option.

Janis


gcc-20120920-2



2012-09-20 Janis Johnson <janisjo@codesourcery.com>


	* lib/target-supports.exp (check_effective_target_arm_hard_vfp_ok):
	Return 0 if already specifying -mfloat-abi other than hard.


OK.


R.

Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 191501)
+++ lib/target-supports.exp	(working copy)
@@ -2053,7 +2053,8 @@
  # options.

  proc check_effective_target_arm_hard_vfp_ok { } {
-    if { [check_effective_target_arm32] } {
+    if { [check_effective_target_arm32]
+	 && ! [check-flags [list "" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" }]] } {
  	return [check_no_compiler_messages arm_hard_vfp_ok executable {
  	    int main() { return 0;}
  	} "-mfpu=vfp -mfloat-abi=hard"]




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]