From: Andrew Burgess Date: Wed, 30 Nov 2016 11:38:46 +0000 (+0000) Subject: arm/gcc: Tighten checks in check_effective_target_freorder X-Git-Tag: upstream/12.2.0~42863 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc46bc434015f59862e9905c98e9226d3bb1a6d1;p=platform%2Fupstream%2Fgcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5532ed1..e89bca5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2016-11-30 Andrew Burgess + * lib/target-supports.exp (check_effective_target_freorder): Check + additional case. + +2016-11-30 Andrew Burgess + * gcc.target/arc/arc700-stld-hazard.c: New file. 2016-11-30 Janus Weil diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2192eb6..ace080e 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1011,12 +1011,19 @@ proc check_effective_target_fstack_protector {} { } # 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 {} { - return [check_no_compiler_messages freorder object { + if { [check_no_compiler_messages freorder object { void foo (void) { } } "-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