aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2015-01-13 21:13:36 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2015-01-13 13:13:36 -0800
commitf263fe40d780740a780e8c273fc336da48fd963e (patch)
tree2c703cc8038b3224e58ef89856a4a3d1970cf95e /gcc
parentcaee690e915e13a48a16dabbb61110ae88d1821a (diff)
downloadgcc-f263fe40d780740a780e8c273fc336da48fd963e.zip
gcc-f263fe40d780740a780e8c273fc336da48fd963e.tar.gz
gcc-f263fe40d780740a780e8c273fc336da48fd963e.tar.bz2
Check if -pg links in check_profiling_available
* lib/target-supports.exp (check_profiling_available): Check if -pg links. From-SVN: r219560
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/lib/target-supports.exp11
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a0163c3..5e58e7d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * lib/target-supports.exp (check_profiling_available): Check if
+ -pg links.
+
2015-01-13 Jan Hubicka <hubicka@ucw.cz>
PR ipa/64565
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 0ac9646..61bff53 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -549,7 +549,16 @@ proc check_profiling_available { test_what } {
}
}
- return $profiling_available_saved
+ # -pg link test result can't be cached since it may change between
+ # runs.
+ set profiling_working $profiling_available_saved
+ if { $profiling_available_saved == 1
+ && ![check_no_compiler_messages_nocache profiling executable {
+ int main() { return 0; } } "-pg"] } {
+ set profiling_working 0
+ }
+
+ return $profiling_working
}
# Check to see if a target is "freestanding". This is as per the definition