Commit cc46bc43 by Andrew Burgess Committed by Andrew Burgess

arm/gcc: Tighten checks in check_effective_target_freorder

In check_effective_target_freorder we check to see if the target
supports -freorder-blocks-and-partition.  However we disable
-freorder-blocks-and-partition when -fprofile-use is not supplied so for
some targets we'll not see any message about lack of support for
-freorder-blocks-and-partition unless -fprofile-use is also passed.

This commit extends check_effective_target_freorder to first try
-freorder-blocks-and-partition on its own, then try -fprofile-use and
-freorder-blocks-and-partition.

gcc/testsuite/ChangeLog:

	* lib/target-supports.exp (check_effective_target_freorder): Check
	additional case.

From-SVN: r243009
parent 6c8bf066
2016-11-30 Andrew Burgess <andrew.burgess@embecosm.com> 2016-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
* lib/target-supports.exp (check_effective_target_freorder): Check
additional case.
2016-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
* gcc.target/arc/arc700-stld-hazard.c: New file. * gcc.target/arc/arc700-stld-hazard.c: New file.
2016-11-30 Janus Weil <janus@gcc.gnu.org> 2016-11-30 Janus Weil <janus@gcc.gnu.org>
......
...@@ -1011,12 +1011,19 @@ proc check_effective_target_fstack_protector {} { ...@@ -1011,12 +1011,19 @@ proc check_effective_target_fstack_protector {} {
} }
# Return 1 if compilation with -freorder-blocks-and-partition is error-free # Return 1 if compilation with -freorder-blocks-and-partition is error-free
# for trivial code, 0 otherwise. # for trivial code, 0 otherwise. As some targets (ARM for example) only
# warn when -fprofile-use is also supplied we test that combination too.
proc check_effective_target_freorder {} { proc check_effective_target_freorder {} {
return [check_no_compiler_messages freorder object { if { [check_no_compiler_messages freorder object {
void foo (void) { } void foo (void) { }
} "-freorder-blocks-and-partition"] } "-freorder-blocks-and-partition"]
&& [check_no_compiler_messages fprofile_use_freorder object {
void foo (void) { }
} "-fprofile-use -freorder-blocks-and-partition"] } {
return 1
}
return 0
} }
# Return 1 if -fpic and -fPIC are supported, as in no warnings or errors # Return 1 if -fpic and -fPIC are supported, as in no warnings or errors
......
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