This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]Add -fprofile-use option for check_effective_target_freorder.
- From: Renlin Li <renlin dot li at arm dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: tejohnson at google dot com, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Date: Mon, 26 Oct 2015 09:00:16 +0000
- Subject: [PATCH]Add -fprofile-use option for check_effective_target_freorder.
- Authentication-results: sourceware.org; auth=none
Hi all,
After r228136, flag_reorder_blocks_and_partition is canceled when
-fprofile-use is not specified.
In this case check_effective_target_freorder() is not able to check the
proper target support.
This is a simple patch to add "-fprofile-use" option that effective
target check.
Okay to commit on the trunk?
Regards,
Renlin Li
gcc/testsuite/ChangeLog:
2015-10-26 Renlin Li <renlin.li@arm.com>
* lib/target-supports.exp (check_effective_target_freorder): Add
-fprofile-use flag.
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index b543519..0dc13be 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -960,11 +960,12 @@ proc check_effective_target_fstack_protector {} {
# Return 1 if compilation with -freorder-blocks-and-partition is error-free
# for trivial code, 0 otherwise.
+# -freorder-blocks-and-partition has no effect if given without -fprofile-use.
proc check_effective_target_freorder {} {
return [check_no_compiler_messages freorder object {
void foo (void) { }
- } "-freorder-blocks-and-partition"]
+ } "-freorder-blocks-and-partition -fprofile-use"]
}
# Return 1 if -fpic and -fPIC are supported, as in no warnings or errors