Change to almalinux bugtracker
Set --with-arch_64=x86-64-v2 on v2 arch
This commit is contained in:
commit
daa39f01ed
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
gcc-14.3.1-20250617.tar.xz
|
||||
gcc-14.3.1-20251022.tar.xz
|
||||
isl-0.24.tar.bz2
|
||||
newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed.tar.xz
|
||||
nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz
|
||||
|
||||
142
gcc14-gcov-function-summaries.patch
Normal file
142
gcc14-gcov-function-summaries.patch
Normal file
@ -0,0 +1,142 @@
|
||||
From 580664d1b66a5d98e5e87d9ff728566b309e89b1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= <j@lambda.is>
|
||||
Date: Wed, 7 Aug 2024 17:33:31 +0200
|
||||
Subject: [PATCH] gcov: branch, conds, calls in function summaries
|
||||
|
||||
The gcov function summaries only output the covered lines, not the
|
||||
branches and calls. Since the function summaries is an opt-in it
|
||||
probably makes sense to also include branch coverage, calls, and
|
||||
condition coverage.
|
||||
|
||||
$ gcc --coverage -fpath-coverage hello.c -o hello
|
||||
$ ./hello
|
||||
|
||||
Before:
|
||||
$ gcov -f hello
|
||||
Function 'main'
|
||||
Lines executed:100.00% of 4
|
||||
|
||||
Function 'fn'
|
||||
Lines executed:100.00% of 7
|
||||
|
||||
File 'hello.c'
|
||||
Lines executed:100.00% of 11
|
||||
Creating 'hello.c.gcov'
|
||||
|
||||
After:
|
||||
$ gcov -f hello
|
||||
Function 'main'
|
||||
Lines executed:100.00% of 3
|
||||
No branches
|
||||
Calls executed:100.00% of 1
|
||||
|
||||
Function 'fn'
|
||||
Lines executed:100.00% of 7
|
||||
Branches executed:100.00% of 4
|
||||
Taken at least once:50.00% of 4
|
||||
No calls
|
||||
|
||||
File 'hello.c'
|
||||
Lines executed:100.00% of 10
|
||||
Creating 'hello.c.gcov'
|
||||
|
||||
Lines executed:100.00% of 10
|
||||
|
||||
With conditions:
|
||||
$ gcov -fg hello
|
||||
Function 'main'
|
||||
Lines executed:100.00% of 3
|
||||
No branches
|
||||
Calls executed:100.00% of 1
|
||||
No conditions
|
||||
|
||||
Function 'fn'
|
||||
Lines executed:100.00% of 7
|
||||
Branches executed:100.00% of 4
|
||||
Taken at least once:50.00% of 4
|
||||
Condition outcomes covered:100.00% of 8
|
||||
No calls
|
||||
|
||||
File 'hello.c'
|
||||
Lines executed:100.00% of 10
|
||||
Creating 'hello.c.gcov'
|
||||
|
||||
Lines executed:100.00% of 10
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* gcov.cc (generate_results): Count branches, conditions.
|
||||
(function_summary): Output branch, calls, condition count.
|
||||
---
|
||||
gcc/gcov.cc | 48 +++++++++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 43 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcov.cc b/gcc/gcov.cc
|
||||
index 96fdc50f0e8..f9ab93b54d9 100644
|
||||
--- a/gcc/gcov.cc
|
||||
+++ b/gcc/gcov.cc
|
||||
@@ -1687,11 +1687,19 @@ generate_results (const char *file_name)
|
||||
memset (&coverage, 0, sizeof (coverage));
|
||||
coverage.name = fn->get_name ();
|
||||
add_line_counts (flag_function_summary ? &coverage : NULL, fn);
|
||||
- if (flag_function_summary)
|
||||
- {
|
||||
- function_summary (&coverage);
|
||||
- fnotice (stdout, "\n");
|
||||
- }
|
||||
+
|
||||
+ if (!flag_function_summary)
|
||||
+ continue;
|
||||
+
|
||||
+ for (const block_info& block : fn->blocks)
|
||||
+ for (arc_info *arc = block.succ; arc; arc = arc->succ_next)
|
||||
+ add_branch_counts (&coverage, arc);
|
||||
+
|
||||
+ for (const block_info& block : fn->blocks)
|
||||
+ add_condition_counts (&coverage, &block);
|
||||
+
|
||||
+ function_summary (&coverage);
|
||||
+ fnotice (stdout, "\n");
|
||||
}
|
||||
|
||||
name_map needle;
|
||||
@@ -2764,6 +2772,36 @@ function_summary (const coverage_info *coverage)
|
||||
{
|
||||
fnotice (stdout, "%s '%s'\n", "Function", coverage->name);
|
||||
executed_summary (coverage->lines, coverage->lines_executed);
|
||||
+
|
||||
+ if (coverage->branches)
|
||||
+ {
|
||||
+ fnotice (stdout, "Branches executed:%s of %d\n",
|
||||
+ format_gcov (coverage->branches_executed, coverage->branches, 2),
|
||||
+ coverage->branches);
|
||||
+ fnotice (stdout, "Taken at least once:%s of %d\n",
|
||||
+ format_gcov (coverage->branches_taken, coverage->branches, 2),
|
||||
+ coverage->branches);
|
||||
+ }
|
||||
+ else
|
||||
+ fnotice (stdout, "No branches\n");
|
||||
+
|
||||
+ if (coverage->calls)
|
||||
+ fnotice (stdout, "Calls executed:%s of %d\n",
|
||||
+ format_gcov (coverage->calls_executed, coverage->calls, 2),
|
||||
+ coverage->calls);
|
||||
+ else
|
||||
+ fnotice (stdout, "No calls\n");
|
||||
+
|
||||
+ if (flag_conditions)
|
||||
+ {
|
||||
+ if (coverage->conditions)
|
||||
+ fnotice (stdout, "Condition outcomes covered:%s of %d\n",
|
||||
+ format_gcov (coverage->conditions_covered,
|
||||
+ coverage->conditions, 2),
|
||||
+ coverage->conditions);
|
||||
+ else
|
||||
+ fnotice (stdout, "No conditions\n");
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Output summary info for a file. */
|
||||
--
|
||||
2.51.0
|
||||
|
||||
107
gcc14-tests-color.patch
Normal file
107
gcc14-tests-color.patch
Normal file
@ -0,0 +1,107 @@
|
||||
commit a02744993035a301c27e753c3cb53ef82bc1bfc5
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Wed Feb 11 23:53:41 2026 +0000
|
||||
|
||||
testsuite: Use color=never for more sanitizer tests
|
||||
|
||||
The sanitizer tests have logic to set ASAN_OPTIONS and UBSAN_OPTIONS
|
||||
to color=never to avoid problems checking against output patterns, in
|
||||
test configurations where the output is otherwise coloured by default.
|
||||
|
||||
This does not however cover all sanitizer tests with issues in such
|
||||
configurations. There is no corresponding logic to set TSAN_OPTIONS
|
||||
for tsan tests, and environment variable settings in
|
||||
dg-set-target-env-var override the globally set color=never.
|
||||
|
||||
Add logic to set TSAN_OPTIONS similarly (following the UBSAN_OPTIONS
|
||||
logic, that saves and restores any previous setting or lack thereof,
|
||||
rather than the ASAN_OPTIONS logic, that just sets ASAN_OPTIONS in the
|
||||
environment so that it remains set for all the rest of the possibly
|
||||
unrelated tests included in the same runtest execution). Also add
|
||||
color=never to dg-set-target-env-var in two such tests where I've seen
|
||||
coloured output causing failures (but not for other tests where I
|
||||
haven't seen the default producing such fallures).
|
||||
|
||||
Tested for x86_64-pc-linux-gnu, and with a cross to aarch64-linux
|
||||
(together with other testsuite fixes) in a configuration where I
|
||||
previously saw failures related to colour output from sanitizer tests.
|
||||
|
||||
* lib/tsan-dg.exp (orig_tsan_options_saved, orig_tsan_options):
|
||||
New global variables.
|
||||
(tsan_init): Save TSAN_OPTIONS and set it to color=never.
|
||||
(tsan_finish): Restore TSAN_OPTIONS.
|
||||
* c-c++-common/asan/pr64820.c: Include color=never in
|
||||
ASAN_OPTIONS.
|
||||
* c-c++-common/asan/use-after-return-1.c: Likewise.
|
||||
|
||||
diff --git a/gcc/testsuite/c-c++-common/asan/pr64820.c b/gcc/testsuite/c-c++-common/asan/pr64820.c
|
||||
index a00debf35883..b675ef21b275 100644
|
||||
--- a/gcc/testsuite/c-c++-common/asan/pr64820.c
|
||||
+++ b/gcc/testsuite/c-c++-common/asan/pr64820.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-require-effective-target fstack_protector } */
|
||||
/* { dg-options "-fstack-protector-strong" } */
|
||||
-/* { dg-set-target-env-var ASAN_OPTIONS "detect_stack_use_after_return=1" } */
|
||||
+/* { dg-set-target-env-var ASAN_OPTIONS "color=never detect_stack_use_after_return=1" } */
|
||||
/* { dg-shouldfail "asan" } */
|
||||
|
||||
__attribute__((noinline))
|
||||
diff --git a/gcc/testsuite/c-c++-common/asan/use-after-return-1.c b/gcc/testsuite/c-c++-common/asan/use-after-return-1.c
|
||||
index e1bb18a57431..557a687e0e32 100644
|
||||
--- a/gcc/testsuite/c-c++-common/asan/use-after-return-1.c
|
||||
+++ b/gcc/testsuite/c-c++-common/asan/use-after-return-1.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-do run } */
|
||||
-/* { dg-set-target-env-var ASAN_OPTIONS "detect_stack_use_after_return=1" } */
|
||||
+/* { dg-set-target-env-var ASAN_OPTIONS "color=never detect_stack_use_after_return=1" } */
|
||||
/* { dg-shouldfail "asan" } */
|
||||
|
||||
#include <stdio.h>
|
||||
diff --git a/gcc/testsuite/lib/tsan-dg.exp b/gcc/testsuite/lib/tsan-dg.exp
|
||||
index 916c8737807e..6379d18e6b54 100644
|
||||
--- a/gcc/testsuite/lib/tsan-dg.exp
|
||||
+++ b/gcc/testsuite/lib/tsan-dg.exp
|
||||
@@ -81,6 +81,9 @@ proc tsan_link_flags { paths } {
|
||||
return "$flags"
|
||||
}
|
||||
|
||||
+set orig_tsan_options_saved 0
|
||||
+set orig_tsan_options 0
|
||||
+
|
||||
#
|
||||
# tsan_init -- called at the start of each subdir of tests
|
||||
#
|
||||
@@ -93,6 +96,17 @@ proc tsan_init { args } {
|
||||
global tsan_saved_ALWAYS_CXXFLAGS
|
||||
global dg-do-what-default
|
||||
global tsan_saved_dg-do-what-default
|
||||
+ global orig_tsan_options_saved
|
||||
+ global orig_tsan_options
|
||||
+
|
||||
+ if { $orig_tsan_options_saved == 0 } {
|
||||
+ # Save the original environment.
|
||||
+ if [info exists env(TSAN_OPTIONS)] {
|
||||
+ set orig_tsan_options "$env(TSAN_OPTIONS)"
|
||||
+ set orig_tsan_options_saved 1
|
||||
+ }
|
||||
+ }
|
||||
+ setenv TSAN_OPTIONS color=never
|
||||
|
||||
set link_flags ""
|
||||
if ![is_remote host] {
|
||||
@@ -134,6 +148,14 @@ proc tsan_finish { args } {
|
||||
global tsan_saved_dg-do-what-default
|
||||
global tsan_saved_library_path
|
||||
global ld_library_path
|
||||
+ global orig_tsan_options_saved
|
||||
+ global orig_tsan_options
|
||||
+
|
||||
+ if { $orig_tsan_options_saved } {
|
||||
+ setenv TSAN_OPTIONS "$orig_tsan_options"
|
||||
+ } elseif [info exists env(TSAN_OPTIONS)] {
|
||||
+ unsetenv TSAN_OPTIONS
|
||||
+ }
|
||||
|
||||
if [info exists tsan_saved_ALWAYS_CXXFLAGS ] {
|
||||
set ALWAYS_CXXFLAGS $tsan_saved_ALWAYS_CXXFLAGS
|
||||
40
gcc14-tests-dg-regexp.patch
Normal file
40
gcc14-tests-dg-regexp.patch
Normal file
@ -0,0 +1,40 @@
|
||||
commit 8641223df928a12246d23147d5ad8073769d5765
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Wed Dec 3 16:15:39 2025 +0000
|
||||
|
||||
testsuite: Escape \r in dg-regexp test names
|
||||
|
||||
When the regular expression matched in a test using dg-regexp contains
|
||||
a newline (written in the source as \n inside ""), there is logic in
|
||||
the testsuite to escape this so the test name after PASS: or FAIL: in
|
||||
the testsuite output has \n instead of that newline.
|
||||
|
||||
When it contains a carriage return (from \r in the source), however,
|
||||
there is no such escaping, and the test names in the .sum and .log
|
||||
files thus contain a literal CR character in the middle of a test
|
||||
name. The process of combining test results from parallel-run parts
|
||||
of each testsuite then turns that CR into end-of-line, losing the rest
|
||||
of the test name (whereas if you use runtest directly, e.g. via
|
||||
contrib/test_installed, the full test name remains in the .sum file
|
||||
because there is no such postprocessing). I suspect the handling of
|
||||
newlines by Python (used for one of the scripts involved in combining
|
||||
results) is responsible for test names getting truncated like this.
|
||||
To avoid this truncation, escape CR like newlines are escaped.
|
||||
|
||||
Bootstrapped with no regressions for x86_64-pc-linux-gnu.
|
||||
|
||||
* lib/gcc-defs.exp (handle-dg-regexps): Also escape \r in output.
|
||||
|
||||
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
|
||||
index d66c833452cc..61bf5f8e0a9d 100644
|
||||
--- a/gcc/testsuite/lib/gcc-defs.exp
|
||||
+++ b/gcc/testsuite/lib/gcc-defs.exp
|
||||
@@ -553,7 +553,7 @@ proc handle-dg-regexps { text } {
|
||||
|
||||
# Escape newlines in $rexp so that we can print them in
|
||||
# pass/fail results.
|
||||
- set escaped_regex [string map {"\n" "\\n"} $rexp]
|
||||
+ set escaped_regex [string map {"\n" "\\n" "\r" "\\r"} $rexp]
|
||||
verbose "escaped_regex: ${escaped_regex}" 4
|
||||
|
||||
set title "$testname_with_flags dg-regexp $linenum"
|
||||
26
gcc14-tests-env-native.patch
Normal file
26
gcc14-tests-env-native.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
|
||||
index 6bd3c211611a..cc7f30f10135 100644
|
||||
--- a/gcc/testsuite/lib/asan-dg.exp
|
||||
+++ b/gcc/testsuite/lib/asan-dg.exp
|
||||
@@ -303,7 +303,6 @@ proc asan-gtest { args } {
|
||||
|
||||
if { ![info exists asan_last_gtest_test_list] } { return }
|
||||
if { [llength $asan_last_gtest_test_list] == 0 } { return }
|
||||
- if { ![isnative] || [is_remote target] } { return }
|
||||
|
||||
set gtest_test_list $asan_last_gtest_test_list
|
||||
unset asan_last_gtest_test_list
|
||||
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
|
||||
index 228c21d12071..49c9f5a8796d 100644
|
||||
--- a/gcc/testsuite/lib/gcc-dg.exp
|
||||
+++ b/gcc/testsuite/lib/gcc-dg.exp
|
||||
@@ -459,9 +459,6 @@ if { [info procs ${tool}_load] != [list] \
|
||||
set saved_target_env_var [list]
|
||||
if { [info exists set_target_env_var] \
|
||||
&& [llength $set_target_env_var] != 0 } {
|
||||
- if { [is_remote target] } {
|
||||
- return [list "unsupported" ""]
|
||||
- }
|
||||
set-target-env-var
|
||||
}
|
||||
set result [eval [list saved_${tool}_load $program] $args]
|
||||
922
gcc14-tests-gcov-native.patch
Normal file
922
gcc14-tests-gcov-native.patch
Normal file
@ -0,0 +1,922 @@
|
||||
commit 39a93faab07ff64a9e828f487f231b013b6cdbdc
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Fri Jan 23 21:14:31 2026 +0000
|
||||
|
||||
testsuite: Enable cross testing for gcov tests
|
||||
|
||||
Tests of gcov are generally restricted to { target native }. The
|
||||
issue for these tests is the need to transfer .gcda files from the
|
||||
target to the host before running gcov. Implement that support and
|
||||
remove the { target native } restrictions for these tests.
|
||||
|
||||
Note that by default code built to generate coverage data expects to
|
||||
be able to write .gcda files to the same directory name in which the
|
||||
compiler generated its output, so if that path cannot be created by
|
||||
the tests on the target then they may still not work in a cross setup.
|
||||
Other options involving -fprofile-dir are possible but involve their
|
||||
own complications such as mangling of the .gcda file name (the
|
||||
mangling logic would then need replicating in gcov.exp). Copying
|
||||
files from the target using such absolute directory paths is what
|
||||
already happens with gcc.dg/tree-prof tests using profopt.exp (and
|
||||
those already work in a cross configuration except for a few using
|
||||
dg-additional-sources), so this change is effectively making the gcov
|
||||
tests work more like the tree-prof ones.
|
||||
|
||||
Note also that [remote_file host absolute ...] may require appropriate
|
||||
support in your host board file for the case of a remote host (this
|
||||
isn't an operation DejaGnu knows about doing remotely by default).
|
||||
The logic for determining .gcda paths does mean it's the absolute path
|
||||
on host, not on build, that is relevant.
|
||||
|
||||
Tested for x86_64-pc-linux-gnu to make sure native testing isn't
|
||||
broken, and with cross to aarch64-linux.
|
||||
|
||||
* g++.dg/gcov/gcov-1.C, g++.dg/gcov/gcov-10.C,
|
||||
g++.dg/gcov/gcov-11.C, g++.dg/gcov/gcov-12.C,
|
||||
g++.dg/gcov/gcov-13.C, g++.dg/gcov/gcov-14.C,
|
||||
g++.dg/gcov/gcov-15.C, g++.dg/gcov/gcov-16.C,
|
||||
g++.dg/gcov/gcov-17.C, g++.dg/gcov/gcov-18.C,
|
||||
g++.dg/gcov/gcov-19.C, g++.dg/gcov/gcov-2.C,
|
||||
g++.dg/gcov/gcov-20.C, g++.dg/gcov/gcov-21.C,
|
||||
g++.dg/gcov/gcov-23.C, g++.dg/gcov/gcov-3.C, g++.dg/gcov/gcov-4.C,
|
||||
g++.dg/gcov/gcov-5.C, g++.dg/gcov/gcov-7.C, g++.dg/gcov/gcov-8.C,
|
||||
g++.dg/gcov/gcov-dump-1.C, g++.dg/gcov/gcov-dump-2.C,
|
||||
g++.dg/gcov/gcov-threads-1.C, g++.dg/gcov/loop.C,
|
||||
g++.dg/gcov/pr16855-priority.C, g++.dg/gcov/pr16855.C,
|
||||
g++.dg/gcov/pr84548.C, g++.dg/gcov/pr86109.C,
|
||||
g++.dg/gcov/pr88045.C, g++.dg/gcov/pr88263-2.C,
|
||||
g++.dg/gcov/pr88263.C, g++.dg/gcov/pr97069.C,
|
||||
g++.dg/gcov/pr98273.C, g++.dg/gcov/ternary.C,
|
||||
gcc.misc-tests/gcov-1.c, gcc.misc-tests/gcov-10.c,
|
||||
gcc.misc-tests/gcov-10b.c, gcc.misc-tests/gcov-11.c,
|
||||
gcc.misc-tests/gcov-12.c, gcc.misc-tests/gcov-13.c,
|
||||
gcc.misc-tests/gcov-14.c, gcc.misc-tests/gcov-15.c,
|
||||
gcc.misc-tests/gcov-16.c, gcc.misc-tests/gcov-17.c,
|
||||
gcc.misc-tests/gcov-18.c, gcc.misc-tests/gcov-19.c,
|
||||
gcc.misc-tests/gcov-1a.c, gcc.misc-tests/gcov-2.c,
|
||||
gcc.misc-tests/gcov-20.c, gcc.misc-tests/gcov-22.c,
|
||||
gcc.misc-tests/gcov-24.c, gcc.misc-tests/gcov-25.c,
|
||||
gcc.misc-tests/gcov-26.c, gcc.misc-tests/gcov-27.c,
|
||||
gcc.misc-tests/gcov-28.c, gcc.misc-tests/gcov-29.c,
|
||||
gcc.misc-tests/gcov-3.c, gcc.misc-tests/gcov-30.c,
|
||||
gcc.misc-tests/gcov-33.c, gcc.misc-tests/gcov-34.c,
|
||||
gcc.misc-tests/gcov-4.c, gcc.misc-tests/gcov-4b.c,
|
||||
gcc.misc-tests/gcov-5b.c, gcc.misc-tests/gcov-6.c,
|
||||
gcc.misc-tests/gcov-7.c, gcc.misc-tests/gcov-8.c,
|
||||
gcc.misc-tests/gcov-9.c, gcc.misc-tests/gcov-pr83813.c,
|
||||
gcc.misc-tests/gcov-pr84758.c, gcc.misc-tests/gcov-pr85217.c,
|
||||
gcc.misc-tests/gcov-pr85332.c, gcc.misc-tests/gcov-pr85338.c,
|
||||
gcc.misc-tests/gcov-pr85350.c, gcc.misc-tests/gcov-pr85372.c,
|
||||
gcc.misc-tests/gcov-pr86536.c, gcc.misc-tests/gcov-pr90574-1.c,
|
||||
gcc.misc-tests/gcov-pr90574-2.c, gdc.dg/gcov1.d,
|
||||
gnat.dg/gcov/check.adb: Do not restrict to { target native }.
|
||||
* lib/gcov.exp (transfer-gcda): New.
|
||||
(clean-gcov-file): Delete .gcda file on target.
|
||||
(run-gcov): Transfer .gcda files from target.
|
||||
|
||||
(Note: GCC 14 version has adjusted diff context to avoid merge
|
||||
conflicts and also changes fewer tests because of new tests added
|
||||
upstream since GCC 14.)
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-1.C b/gcc/testsuite/g++.dg/gcov/gcov-1.C
|
||||
index ee383b480a87..40fee7992a6d 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-1.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-1.C
|
||||
@@ -2,7 +2,7 @@
|
||||
constructs are reported correctly by gcov. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
extern "C" void abort (void);
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-10.C b/gcc/testsuite/g++.dg/gcov/gcov-10.C
|
||||
index 4c91be94ee46..d3942ceabd18 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-10.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-10.C
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Ensure PIC sequence used for comdat functions */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -fpic" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-require-effective-target fpic } */
|
||||
|
||||
inline int __attribute__ ((noinline)) Foo ()
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-11.C b/gcc/testsuite/g++.dg/gcov/gcov-11.C
|
||||
index fa0890206f3a..243c112506ae 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-11.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-11.C
|
||||
@@ -2,7 +2,7 @@
|
||||
distinct from unexecuted normal regions. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
void Baz (int i)
|
||||
{
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-12.C b/gcc/testsuite/g++.dg/gcov/gcov-12.C
|
||||
index 9f2b29b4da50..da694bc7c91b 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-12.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-12.C
|
||||
@@ -1,6 +1,6 @@
|
||||
/* PR 51113 */
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -fpic -fno-implicit-constexpr" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-additional-sources "gcovpart-12b.C" } */
|
||||
|
||||
struct Foo {
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-13.C b/gcc/testsuite/g++.dg/gcov/gcov-13.C
|
||||
index c262a71f5364..45668f65cd3a 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-13.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-13.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
void Baz (int i)
|
||||
{
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-14.C b/gcc/testsuite/g++.dg/gcov/gcov-14.C
|
||||
index b069d0e1881c..ff16f399a03b 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-14.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-14.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -Ofast" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
#include <iostream>
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-15.C b/gcc/testsuite/g++.dg/gcov/gcov-15.C
|
||||
index fcd16b00b1c4..53752449b73f 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-15.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-15.C
|
||||
@@ -1,6 +1,6 @@
|
||||
// PR gcov-profile/64634
|
||||
// { dg-options "-fprofile-arcs -ftest-coverage" }
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
|
||||
void catchEx () // count(1)
|
||||
{
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-16.C b/gcc/testsuite/g++.dg/gcov/gcov-16.C
|
||||
index f09d4060cbdb..beea2e55e1ae 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-16.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-16.C
|
||||
@@ -1,6 +1,6 @@
|
||||
// PR gcov-profile/64634
|
||||
// { dg-options "-fprofile-arcs -ftest-coverage" }
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
|
||||
int main()
|
||||
{
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-17.C b/gcc/testsuite/g++.dg/gcov/gcov-17.C
|
||||
index efe019599a59..19d0197ba776 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-17.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-17.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "--coverage -std=c++11" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
template <class T> class Foo
|
||||
{
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-18.C b/gcc/testsuite/g++.dg/gcov/gcov-18.C
|
||||
index 620aef126995..ecc4716cbfa7 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-18.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-18.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "--coverage -fcondition-coverage -std=c++11" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-2.C b/gcc/testsuite/g++.dg/gcov/gcov-2.C
|
||||
index 05db15de7cc5..9fdcfa84fbdd 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-2.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-2.C
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Verify line coverage counts for simple member functions. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -fno-implicit-constexpr" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
class C {
|
||||
public:
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-3.C b/gcc/testsuite/g++.dg/gcov/gcov-3.C
|
||||
index aff063a4b90f..c128757f281b 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-3.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-3.C
|
||||
@@ -2,7 +2,7 @@
|
||||
within a header file. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
#include "gcov-3.h"
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-4.C b/gcc/testsuite/g++.dg/gcov/gcov-4.C
|
||||
index 2f83ff1becc6..e148d5c95538 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-4.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-4.C
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -fno-exceptions" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
class foo {
|
||||
public:
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-5.C b/gcc/testsuite/g++.dg/gcov/gcov-5.C
|
||||
index 9ada41802caa..fc70b3bee6f7 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-5.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-5.C
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -fno-inline" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
class A {
|
||||
int count;
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-7.C b/gcc/testsuite/g++.dg/gcov/gcov-7.C
|
||||
index 334db1837c85..6240a8fb4278 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-7.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-7.C
|
||||
@@ -3,7 +3,7 @@
|
||||
declaration. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
struct foo
|
||||
{
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-8.C b/gcc/testsuite/g++.dg/gcov/gcov-8.C
|
||||
index 1c97c35d8c1e..bbb075ccea6b 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-8.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-8.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
class C {
|
||||
public:
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-dump-1.C b/gcc/testsuite/g++.dg/gcov/gcov-dump-1.C
|
||||
index 774a7269ff2c..8aba2afadcd3 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-dump-1.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-dump-1.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-generate -ftest-coverage " } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int value;
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-dump-2.C b/gcc/testsuite/g++.dg/gcov/gcov-dump-2.C
|
||||
index e748989d2c0b..f50451cf0769 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-dump-2.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-dump-2.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-generate -ftest-coverage " } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int value;
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-threads-1.C b/gcc/testsuite/g++.dg/gcov/gcov-threads-1.C
|
||||
index 3ae00789439b..54fcdcab39c2 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/gcov-threads-1.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/gcov-threads-1.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -pthread -fprofile-update=atomic" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-require-effective-target profile_update_atomic } */
|
||||
|
||||
#include <stdint.h>
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/loop.C b/gcc/testsuite/g++.dg/gcov/loop.C
|
||||
index e63cb92e6e6d..6d5e4a8632a4 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/loop.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/loop.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
unsigned
|
||||
loop (unsigned n, int value) /* count(14.0k) */
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/pr16855-priority.C b/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
|
||||
index c7a58397bb91..bd6acd2c3e84 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-require-effective-target init_priority } */
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/pr16855.C b/gcc/testsuite/g++.dg/gcov/pr16855.C
|
||||
index f9b86a40001f..5457f4fe3623 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/pr16855.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/pr16855.C
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
/* See PR91087 for information on Darwin xfails. */
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/pr84548.C b/gcc/testsuite/g++.dg/gcov/pr84548.C
|
||||
index 3b60b90e2a26..a83f4cc8b1af 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/pr84548.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/pr84548.C
|
||||
@@ -1,6 +1,6 @@
|
||||
// PR gcov-profile/84548
|
||||
// { dg-options "-fprofile-arcs -ftest-coverage" }
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
// TODO: add support for groups to gcov.exp script
|
||||
|
||||
struct A { static int foo () { return 1; }; static int bar () {
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/pr86109.C b/gcc/testsuite/g++.dg/gcov/pr86109.C
|
||||
index 9052d2e5a042..63549d68509c 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/pr86109.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/pr86109.C
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -std=c++11" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int main()
|
||||
{
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/pr88045.C b/gcc/testsuite/g++.dg/gcov/pr88045.C
|
||||
index 1b077a5e61a2..9961e9d16a5e 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/pr88045.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/pr88045.C
|
||||
@@ -1,6 +1,6 @@
|
||||
// PR gcov-profile/88045
|
||||
// { dg-options "-fprofile-arcs -ftest-coverage -std=c++11" }
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
|
||||
#include <numeric>
|
||||
#include <vector>
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/pr88263-2.C b/gcc/testsuite/g++.dg/gcov/pr88263-2.C
|
||||
index f0cf15f5d0a3..a4ddf776a0d8 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/pr88263-2.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/pr88263-2.C
|
||||
@@ -1,6 +1,6 @@
|
||||
// PR gcov-profile/88263
|
||||
// { dg-options "-fprofile-arcs -ftest-coverage -std=c++11" }
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
|
||||
#include <sstream>
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/pr88263.C b/gcc/testsuite/g++.dg/gcov/pr88263.C
|
||||
index 854772f0594c..37943a3fe40f 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/pr88263.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/pr88263.C
|
||||
@@ -1,6 +1,6 @@
|
||||
// PR gcov-profile/88263
|
||||
// { dg-options "-fprofile-arcs -ftest-coverage -std=c++11" }
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
|
||||
#include <sstream>
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/pr97069.C b/gcc/testsuite/g++.dg/gcov/pr97069.C
|
||||
index 040e336662a9..9171399235e1 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/pr97069.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/pr97069.C
|
||||
@@ -1,6 +1,6 @@
|
||||
// PR gcov-profile/97069
|
||||
// { dg-options "--coverage" }
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
|
||||
# 0 "pr97069.C"
|
||||
# 0 "<built-in>"
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/pr98273.C b/gcc/testsuite/g++.dg/gcov/pr98273.C
|
||||
index bfa83cbe4d00..45cd476ed24d 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/pr98273.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/pr98273.C
|
||||
@@ -1,7 +1,7 @@
|
||||
/* PR gcov-profile/98273 */
|
||||
|
||||
/* { dg-options "--coverage -std=c++11" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int
|
||||
main ()
|
||||
diff --git a/gcc/testsuite/g++.dg/gcov/ternary.C b/gcc/testsuite/g++.dg/gcov/ternary.C
|
||||
index 9b8e34644b46..5ad2b2c6a4e1 100644
|
||||
--- a/gcc/testsuite/g++.dg/gcov/ternary.C
|
||||
+++ b/gcc/testsuite/g++.dg/gcov/ternary.C
|
||||
@@ -1,5 +1,5 @@
|
||||
// { dg-options "-fprofile-arcs -ftest-coverage" }
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
|
||||
int b, c, d, e;
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-1.c b/gcc/testsuite/gcc.misc-tests/gcov-1.c
|
||||
index 99a02790dee8..e6606f99ffae 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-1.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-1.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Test Gcov basics. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
void noop ()
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-10.c b/gcc/testsuite/gcc.misc-tests/gcov-10.c
|
||||
index bd1d418f378a..8a8370228b99 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-10.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-10.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Test gcov block mode. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int main ()
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-10b.c b/gcc/testsuite/gcc.misc-tests/gcov-10b.c
|
||||
index 148d779fdb35..2a4f7a3b25ce 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-10b.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-10b.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Test gcov block mode. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int main ()
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-11.c b/gcc/testsuite/gcc.misc-tests/gcov-11.c
|
||||
index a1037a552a94..153a8d2e3965 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-11.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-11.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Test gcov block mode. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int one = 1; /* subvert constant folder. */
|
||||
int zero = 0;
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-12.c b/gcc/testsuite/gcc.misc-tests/gcov-12.c
|
||||
index f3d6924c9803..2428b8f990e8 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-12.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-12.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Test gcov weak ellision. */
|
||||
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-require-weak "" } */
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-13.c b/gcc/testsuite/gcc.misc-tests/gcov-13.c
|
||||
index b42b904ef3e2..b1f0d79ddff4 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-13.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-13.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Test gcov weak ellision. */
|
||||
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
/* { dg-require-weak "" } */
|
||||
/* { dg-additional-sources "gcovpart-13b.c" } */
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-14.c b/gcc/testsuite/gcc.misc-tests/gcov-14.c
|
||||
index 61a9191c0687..847b09cc13bf 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-14.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-14.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Test gcov extern inline. */
|
||||
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-options "-O2 -fprofile-arcs -ftest-coverage -fgnu89-inline" } */
|
||||
/* The following line arranges that Darwin has behavior like elf weak import. */
|
||||
/* { dg-additional-options "-Wl,-U,_Foo" { target *-*-darwin* } } */
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-15.c b/gcc/testsuite/gcc.misc-tests/gcov-15.c
|
||||
index 04273fcec425..d1a66b2ccc1f 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-15.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-15.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Test gcov multiple paths to file. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
#if !RECURSIVE
|
||||
#define RECURSIVE 1
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-16.c b/gcc/testsuite/gcc.misc-tests/gcov-16.c
|
||||
index 738113c92cb8..5a6a723364f6 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-16.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-16.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
void
|
||||
bar (void)
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-17.c b/gcc/testsuite/gcc.misc-tests/gcov-17.c
|
||||
index e38860808445..c937facf1f2c 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-17.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-17.c
|
||||
@@ -22,7 +22,7 @@ by both branches of the condition in <bb 3>.
|
||||
*/
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
unsigned int
|
||||
UuT (void)
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-18.c b/gcc/testsuite/gcc.misc-tests/gcov-18.c
|
||||
index ae1017866db9..8c42e63a6f96 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-18.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-18.c
|
||||
@@ -3,7 +3,7 @@
|
||||
just once. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int a = 0;
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-19.c b/gcc/testsuite/gcc.misc-tests/gcov-19.c
|
||||
index 44e2f135e2ae..17d6dde87c68 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-19.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-19.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fcondition-coverage -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
/* Some side effect to stop branches from being pruned. */
|
||||
int x = 0;
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-1a.c b/gcc/testsuite/gcc.misc-tests/gcov-1a.c
|
||||
index 2b9fabce66c9..9279b7855945 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-1a.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-1a.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Test Gcov basics. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -fprofile-abs-path" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
void noop ()
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-2.c b/gcc/testsuite/gcc.misc-tests/gcov-2.c
|
||||
index aa3e4b74e902..dde8f8b7926a 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-2.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-2.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Test Gcov basics. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage -g" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
void noop ()
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-20.c b/gcc/testsuite/gcc.misc-tests/gcov-20.c
|
||||
index ca8c12aad2bc..b1357ca47f3f 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-20.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-20.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fcondition-coverage -ftest-coverage -fprofile-update=atomic" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-require-effective-target profile_update_atomic } */
|
||||
|
||||
/* Some side effect to stop branches from being pruned */
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-22.c b/gcc/testsuite/gcc.misc-tests/gcov-22.c
|
||||
index 7ca78467ca31..0c8aba6996da 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-22.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-22.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fcondition-coverage -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
#include <setjmp.h>
|
||||
jmp_buf buf;
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-24.c b/gcc/testsuite/gcc.misc-tests/gcov-24.c
|
||||
index 395099bd7ae3..335857da30cc 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-24.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-24.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int main()
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-3.c b/gcc/testsuite/gcc.misc-tests/gcov-3.c
|
||||
index 5b07dd74bd1b..5107f89d324a 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-3.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-3.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-require-effective-target label_values } */
|
||||
|
||||
/* Test Gcov with computed gotos.
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-4.c b/gcc/testsuite/gcc.misc-tests/gcov-4.c
|
||||
index da7929ef7fcd..f792538e1f54 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-4.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-4.c
|
||||
@@ -2,7 +2,7 @@
|
||||
correctly by gcov. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-4b.c b/gcc/testsuite/gcc.misc-tests/gcov-4b.c
|
||||
index da98749f719a..3a67b2f6bb5c 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-4b.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-4b.c
|
||||
@@ -2,7 +2,7 @@
|
||||
correctly by gcov. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-5b.c b/gcc/testsuite/gcc.misc-tests/gcov-5b.c
|
||||
index cbd3958718cc..da53879bd33b 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-5b.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-5b.c
|
||||
@@ -2,7 +2,7 @@
|
||||
that are large enough to hold the count. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
#define LIMIT1 7000
|
||||
#define LIMIT2 7000
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-6.c b/gcc/testsuite/gcc.misc-tests/gcov-6.c
|
||||
index aefab3ed33a7..9b46d64214a7 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-6.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-6.c
|
||||
@@ -4,7 +4,7 @@
|
||||
for call return percentages was added. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
extern void exit (int);
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-7.c b/gcc/testsuite/gcc.misc-tests/gcov-7.c
|
||||
index 2e0f6e8b03c1..a5a20a0a3cd2 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-7.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-7.c
|
||||
@@ -2,7 +2,7 @@
|
||||
* and call return percentages for functions that call longjmp. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-8.c b/gcc/testsuite/gcc.misc-tests/gcov-8.c
|
||||
index 7223bde8374c..6e0eb918d5e4 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-8.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-8.c
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int proxy (int i)
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-9.c b/gcc/testsuite/gcc.misc-tests/gcov-9.c
|
||||
index 6e1b4a85c0c5..ed8d57aa9342 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-9.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-9.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Test gcov block mode. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int main ()
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr83813.c b/gcc/testsuite/gcc.misc-tests/gcov-pr83813.c
|
||||
index ac935b969f84..8604f1f72f06 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr83813.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr83813.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
union U
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr84758.c b/gcc/testsuite/gcc.misc-tests/gcov-pr84758.c
|
||||
index 2ae6900375fa..a9530a14e24b 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr84758.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr84758.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int x, y;
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr85217.c b/gcc/testsuite/gcc.misc-tests/gcov-pr85217.c
|
||||
index 86a3c4b5a129..cdc2b6fb91ef 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr85217.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr85217.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int a=0;
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr85332.c b/gcc/testsuite/gcc.misc-tests/gcov-pr85332.c
|
||||
index 73e50b19fc70..081afdcb0f90 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr85332.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr85332.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int doit(int sel, int n, void *p)
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr85338.c b/gcc/testsuite/gcc.misc-tests/gcov-pr85338.c
|
||||
index d1e16d29c7a8..8416f478348b 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr85338.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr85338.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
void Test(long long Val, int Amt)
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr85350.c b/gcc/testsuite/gcc.misc-tests/gcov-pr85350.c
|
||||
index 0383b81fdfb6..7bb8b0a359ca 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr85350.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr85350.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int main (void)
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr85372.c b/gcc/testsuite/gcc.misc-tests/gcov-pr85372.c
|
||||
index 7c90e68b0dce..10409bd490c4 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr85372.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr85372.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-require-effective-target indirect_jumps } */
|
||||
|
||||
void *buf[5];
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c b/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c
|
||||
index 481777359995..febfacd92431 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c
|
||||
@@ -1,6 +1,6 @@
|
||||
// PR gcov-profile/86536
|
||||
// { dg-options "-fprofile-arcs -ftest-coverage" }
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
// { dg-require-fork "" }
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr90574-1.c b/gcc/testsuite/gcc.misc-tests/gcov-pr90574-1.c
|
||||
index 41ac9bb3eccb..8a6fb09b831d 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr90574-1.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr90574-1.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr90574-2.c b/gcc/testsuite/gcc.misc-tests/gcov-pr90574-2.c
|
||||
index 2db70c96f715..1b6f4517b3eb 100644
|
||||
--- a/gcc/testsuite/gcc.misc-tests/gcov-pr90574-2.c
|
||||
+++ b/gcc/testsuite/gcc.misc-tests/gcov-pr90574-2.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
diff --git a/gcc/testsuite/gdc.dg/gcov1.d b/gcc/testsuite/gdc.dg/gcov1.d
|
||||
index 10ffa4a0e308..048001663d5f 100644
|
||||
--- a/gcc/testsuite/gdc.dg/gcov1.d
|
||||
+++ b/gcc/testsuite/gdc.dg/gcov1.d
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-options "-fcondition-coverage -ftest-coverage" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
/* Some side effect to stop branches from being pruned. */
|
||||
int x = 0;
|
||||
diff --git a/gcc/testsuite/gnat.dg/gcov/check.adb b/gcc/testsuite/gnat.dg/gcov/check.adb
|
||||
index b3cb8e36b92d..737272b01c31 100644
|
||||
--- a/gcc/testsuite/gnat.dg/gcov/check.adb
|
||||
+++ b/gcc/testsuite/gnat.dg/gcov/check.adb
|
||||
@@ -1,5 +1,5 @@
|
||||
-- { dg-options "-fprofile-arcs -ftest-coverage" }
|
||||
--- { dg-do run { target native } } */
|
||||
+-- { dg-do run } */
|
||||
|
||||
procedure Check is
|
||||
|
||||
diff --git a/gcc/testsuite/lib/gcov.exp b/gcc/testsuite/lib/gcov.exp
|
||||
index dd47d66d1b2e..eed104569be5 100644
|
||||
--- a/gcc/testsuite/lib/gcov.exp
|
||||
+++ b/gcc/testsuite/lib/gcov.exp
|
||||
@@ -31,6 +31,23 @@ proc clean-gcov-file { testcase suffix } {
|
||||
set basename [file tail $testcase]
|
||||
set base [file rootname $basename]
|
||||
remote_file host delete $base.$suffix
|
||||
+ # The absolute path to the output when building on the host is
|
||||
+ # used by the compiled program on the target to determine where
|
||||
+ # the .gcda file goes there.
|
||||
+ remote_file target delete [remote_file host absolute $base.$suffix]
|
||||
+}
|
||||
+
|
||||
+# Transfer the .gcda file for a test from the target to the host.
|
||||
+
|
||||
+proc transfer-gcda { testcase } {
|
||||
+ set basename [file tail $testcase]
|
||||
+ set base [file rootname $basename]
|
||||
+ # The absolute path to the output when building on the host is
|
||||
+ # used by the compiled program on the target to determine where
|
||||
+ # the .gcda file goes there.
|
||||
+ set gcda [remote_file host absolute "$base.gcda"]
|
||||
+ set gcda [remote_upload target $gcda]
|
||||
+ remote_download host $gcda
|
||||
}
|
||||
|
||||
#
|
||||
@@ -606,6 +623,14 @@ proc run-gcov { args } {
|
||||
if { $gcov_remove_gcda } {
|
||||
verbose "Removing $testcase.gcda"
|
||||
clean-gcov-file $testcase "gcda"
|
||||
+ } else {
|
||||
+ transfer-gcda $testcase
|
||||
+ global additional_sources_used
|
||||
+ if [info exists additional_sources_used] {
|
||||
+ foreach srcfile $additional_sources_used {
|
||||
+ transfer-gcda $srcfile
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
verbose "Running $GCOV $testcase" 2
|
||||
232
gcc14-tests-guality-native.patch
Normal file
232
gcc14-tests-guality-native.patch
Normal file
@ -0,0 +1,232 @@
|
||||
commit 620c85fb709d27ab9c523f90dc027d05961fa3bd
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Wed Jan 14 17:09:40 2026 +0000
|
||||
|
||||
testsuite: Fix issues with cross testing in guality tests
|
||||
|
||||
The guality tests expect to run (native) GDB on the target. If this
|
||||
is available, there is some support for cross testing, but with
|
||||
various defects and limitations, some of them fixed here.
|
||||
|
||||
* GUALITY_GDB_NAME doesn't get passed through to the target for remote
|
||||
testing (a general limitation of the DejaGnu interface: it doesn't
|
||||
support setting environment variables on the target). Not fixed
|
||||
here.
|
||||
|
||||
* Using in-tree GDB is only appropriate when host = target, since
|
||||
in-tree GDB runs on the host and the testsuite runs GDB on the
|
||||
target. Fixed here. (Note that [isnative] isn't used because that
|
||||
refers to build = target, and we need host = target here.)
|
||||
|
||||
* [transform gdb] is not appropriate because that's a cross-GDB and
|
||||
the tests run GDB on the target, so need a native GDB. Fixed here.
|
||||
|
||||
* gdb-test (used by some guality tests) exits early in cross and
|
||||
remote cases (whereas the tests running GDB directly from the test
|
||||
itself via popen can already do so on the target without needing
|
||||
further patches). Fixed here. There are various other fixes done
|
||||
in gdb-test as well; it needs to transfer files to the target then
|
||||
delete them afterwards.
|
||||
|
||||
* report_gdb expects to run GDB on the host when the tests run it on
|
||||
the target. Fixed here.
|
||||
|
||||
Note: some similar fixes will also be needed for simulate-thread tests
|
||||
to get them working for cross testing, but I haven't done those yet.
|
||||
|
||||
Tested for x86_64-pc-linux-gnu to make sure native testing isn't
|
||||
broken, and with cross to aarch64-linux.
|
||||
|
||||
* lib/gcc-gdb-test.exp (gdb-test): Do not return early for
|
||||
non-native and remote. Download executable and GDB command file
|
||||
to target before running GDB there, and delete when closing
|
||||
target.
|
||||
(report_gdb): Use target when testing GDB availability and
|
||||
version.
|
||||
* g++.dg/guality/guality.exp: Only use in-tree GDB when host =
|
||||
target. Do not use [transform gdb].
|
||||
* gcc.dg/guality/guality.exp: Likewise.
|
||||
* gfortran.dg/guality/guality.exp: Likewise.
|
||||
|
||||
diff --git a/gcc/testsuite/g++.dg/guality/guality.exp b/gcc/testsuite/g++.dg/guality/guality.exp
|
||||
index 6de5e8091a50..695ed02b89bb 100644
|
||||
--- a/gcc/testsuite/g++.dg/guality/guality.exp
|
||||
+++ b/gcc/testsuite/g++.dg/guality/guality.exp
|
||||
@@ -40,14 +40,17 @@ dg-init
|
||||
torture-init
|
||||
|
||||
global GDB
|
||||
+global host_triplet target_triplet
|
||||
if ![info exists ::env(GUALITY_GDB_NAME)] {
|
||||
if [info exists GDB] {
|
||||
set guality_gdb_name "$GDB"
|
||||
- } elseif { [info exists rootme] && [file exists $rootme/../gdb/gdb] } {
|
||||
+ } elseif { [string equal $host_triplet $target_triplet]
|
||||
+ && [info exists rootme]
|
||||
+ && [file exists $rootme/../gdb/gdb] } {
|
||||
# If we're doing a combined build, and gdb is available, use it.
|
||||
set guality_gdb_name "$rootme/../gdb/gdb"
|
||||
} else {
|
||||
- set guality_gdb_name "[transform gdb]"
|
||||
+ set guality_gdb_name "gdb"
|
||||
}
|
||||
setenv GUALITY_GDB_NAME "$guality_gdb_name"
|
||||
}
|
||||
diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp
|
||||
index 0dc8f10762d7..4d342aa51658 100644
|
||||
--- a/gcc/testsuite/gcc.dg/guality/guality.exp
|
||||
+++ b/gcc/testsuite/gcc.dg/guality/guality.exp
|
||||
@@ -40,14 +40,17 @@ dg-init
|
||||
torture-init
|
||||
|
||||
global GDB
|
||||
+global host_triplet target_triplet
|
||||
if ![info exists ::env(GUALITY_GDB_NAME)] {
|
||||
if [info exists GDB] {
|
||||
set guality_gdb_name "$GDB"
|
||||
- } elseif { [info exists rootme] && [file exists $rootme/../gdb/gdb] } {
|
||||
+ } elseif { [string equal $host_triplet $target_triplet]
|
||||
+ && [info exists rootme]
|
||||
+ && [file exists $rootme/../gdb/gdb] } {
|
||||
# If we're doing a combined build, and gdb is available, use it.
|
||||
set guality_gdb_name "$rootme/../gdb/gdb"
|
||||
} else {
|
||||
- set guality_gdb_name "[transform gdb]"
|
||||
+ set guality_gdb_name "gdb"
|
||||
}
|
||||
setenv GUALITY_GDB_NAME "$guality_gdb_name"
|
||||
}
|
||||
diff --git a/gcc/testsuite/gfortran.dg/guality/guality.exp b/gcc/testsuite/gfortran.dg/guality/guality.exp
|
||||
index 105e08a70d88..3ee157abf7b3 100644
|
||||
--- a/gcc/testsuite/gfortran.dg/guality/guality.exp
|
||||
+++ b/gcc/testsuite/gfortran.dg/guality/guality.exp
|
||||
@@ -21,14 +21,17 @@ dg-init
|
||||
torture-init
|
||||
|
||||
global GDB
|
||||
+global host_triplet target_triplet
|
||||
if ![info exists ::env(GUALITY_GDB_NAME)] {
|
||||
if [info exists GDB] {
|
||||
set guality_gdb_name "$GDB"
|
||||
- } elseif { [info exists rootme] && [file exists $rootme/../gdb/gdb] } {
|
||||
+ } elseif { [string equal $host_triplet $target_triplet]
|
||||
+ && [info exists rootme]
|
||||
+ && [file exists $rootme/../gdb/gdb] } {
|
||||
# If we're doing a combined build, and gdb is available, use it.
|
||||
set guality_gdb_name "$rootme/../gdb/gdb"
|
||||
} else {
|
||||
- set guality_gdb_name "[transform gdb]"
|
||||
+ set guality_gdb_name "gdb"
|
||||
}
|
||||
setenv GUALITY_GDB_NAME "$guality_gdb_name"
|
||||
}
|
||||
diff --git a/gcc/testsuite/lib/gcc-gdb-test.exp b/gcc/testsuite/lib/gcc-gdb-test.exp
|
||||
index 942853f183e6..f7c1da8fae25 100644
|
||||
--- a/gcc/testsuite/lib/gcc-gdb-test.exp
|
||||
+++ b/gcc/testsuite/lib/gcc-gdb-test.exp
|
||||
@@ -27,8 +27,6 @@
|
||||
# the literal string with extra whitespace removed.
|
||||
# Argument 3 handles expected failures and the like
|
||||
proc gdb-test { useline args } {
|
||||
- if { ![isnative] || [is_remote target] } { return }
|
||||
-
|
||||
if { [llength $args] >= 4 } {
|
||||
switch [dg-process-target [lindex $args 3]] {
|
||||
"S" { }
|
||||
@@ -80,11 +78,17 @@ proc gdb-test { useline args } {
|
||||
puts $fd "quit"
|
||||
close $fd
|
||||
|
||||
- send_log "Spawning: $gdb_name -nx -nw -quiet -batch -x $cmd_file ./$output_file\n"
|
||||
- set res [remote_spawn target "$gdb_name -nx -nw -quiet -batch -x $cmd_file ./$output_file"]
|
||||
+ set cmd_file_remote [remote_download target $cmd_file]
|
||||
+ set output_file_remote [remote_download target $output_file]
|
||||
+ send_log "Spawning: $gdb_name -nx -nw -quiet -batch -x $cmd_file_remote $output_file_remote\n"
|
||||
+ set res [remote_spawn target "$gdb_name -nx -nw -quiet -batch -x $cmd_file_remote $output_file_remote"]
|
||||
if { $res < 0 || $res == "" } {
|
||||
unsupported "$testname"
|
||||
file delete $cmd_file
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $output_file_remote
|
||||
+ }
|
||||
return
|
||||
}
|
||||
|
||||
@@ -94,6 +98,10 @@ proc gdb-test { useline args } {
|
||||
unsupported "$testname"
|
||||
remote_close target
|
||||
file delete $cmd_file
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $output_file_remote
|
||||
+ }
|
||||
return
|
||||
}
|
||||
# print var; print expected
|
||||
@@ -110,6 +118,10 @@ proc gdb-test { useline args } {
|
||||
}
|
||||
remote_close target
|
||||
file delete $cmd_file
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $output_file_remote
|
||||
+ }
|
||||
return
|
||||
}
|
||||
# ptype var;
|
||||
@@ -131,12 +143,20 @@ proc gdb-test { useline args } {
|
||||
}
|
||||
remote_close target
|
||||
file delete $cmd_file
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $output_file_remote
|
||||
+ }
|
||||
return
|
||||
}
|
||||
timeout {
|
||||
unsupported "$testname"
|
||||
remote_close target
|
||||
file delete $cmd_file
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $output_file_remote
|
||||
+ }
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -144,6 +164,10 @@ proc gdb-test { useline args } {
|
||||
unsupported "$testname"
|
||||
remote_close target
|
||||
file delete $cmd_file
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $output_file_remote
|
||||
+ }
|
||||
return
|
||||
}
|
||||
|
||||
@@ -152,15 +176,18 @@ proc gdb-test { useline args } {
|
||||
# Argument 1 is the location where gdb is used
|
||||
#
|
||||
proc report_gdb { gdb loc } {
|
||||
- if { [catch { exec which $gdb } msg] } {
|
||||
- send_log "gdb not found in $loc: $msg\n"
|
||||
+ set status [remote_exec target "which" "$gdb"]
|
||||
+ set gdb [string trim [lindex $status 1]]
|
||||
+ if { [lindex $status 0] != 0 } {
|
||||
+ send_log "gdb not found in $loc: $gdb\n"
|
||||
return
|
||||
}
|
||||
- set gdb [exec which $gdb]
|
||||
send_log "gdb used in $loc: $gdb\n"
|
||||
|
||||
send_log "gdb used in $loc: "
|
||||
- if { [catch { exec $gdb -v } gdb_version] } {
|
||||
+ set status [remote_exec target "$gdb" "-v"]
|
||||
+ set gdb_version [lindex $status 1]
|
||||
+ if { [lindex $status 0] != 0 } {
|
||||
send_log "getting version failed:\n"
|
||||
} else {
|
||||
send_log "version:\n"
|
||||
229
gcc14-tests-installed-plugin.patch
Normal file
229
gcc14-tests-installed-plugin.patch
Normal file
@ -0,0 +1,229 @@
|
||||
commit edf5b880b876938f9c66aa5859ea089911cde0ba
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Mon Dec 15 17:58:20 2025 +0000
|
||||
|
||||
testsuite: Support plugin testing for installed compiler
|
||||
|
||||
Plugin tests are currently only enabled for build-tree testing.
|
||||
Enable them for installed testing as well, using
|
||||
-print-file-name=plugin/include to locate the installed headers in
|
||||
that case.
|
||||
|
||||
Support is also added to contrib/test_installed for the associated
|
||||
site.exp settings. Installed testing also shows up that some plugin
|
||||
tests are using text-art/*.h headers that aren't currently installed,
|
||||
so add those to PLUGIN_HEADERS.
|
||||
|
||||
Bootstrapped with no regressions for x86_64-pc-linux-gnu, and also ran
|
||||
plugin tests for an installed compiler with contrib/test_installed.
|
||||
|
||||
contrib/
|
||||
* test_installed (--enable-plugin, --with-plugincc=)
|
||||
(--with-plugincflags=, --with-gmpinc=): New options.
|
||||
|
||||
gcc/
|
||||
* Makefile.in (PLUGIN_HEADERS): Add $(srcdir)/text-art/*.h.
|
||||
(install-plugin): Preserve directory structure for text-art
|
||||
headers.
|
||||
|
||||
gcc/testsuite/
|
||||
* lib/plugin-support.exp (plugin-test-execute): Support installed
|
||||
testing.
|
||||
* g++.dg/plugin/plugin.exp, gcc.dg/plugin/plugin.exp,
|
||||
obj-c++.dg/plugin/plugin.exp, objc.dg/plugin/plugin.exp: Do not
|
||||
disable for installed testing.
|
||||
|
||||
(Note: merge conflicts in gcc/Makefile.in in backporting to GCC 14.)
|
||||
|
||||
diff --git a/contrib/test_installed b/contrib/test_installed
|
||||
index 530d21ed74ec..9567ace54b3d 100755
|
||||
--- a/contrib/test_installed
|
||||
+++ b/contrib/test_installed
|
||||
@@ -49,6 +49,7 @@ while true; do
|
||||
--srcdir=*) srcdir=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--target=*) target=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--prefix=*) prefix=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
+ --enable-plugin) ENABLE_PLUGIN=1; shift;;
|
||||
--with-gcc=*) GCC_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--with-g++=*) GXX_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--with-gfortran=*) GFORTRAN_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
@@ -56,6 +57,9 @@ while true; do
|
||||
--with-alt-cxx=*) ALT_CXX_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--with-compat-options=*) COMPAT_OPTIONS=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--with-libiconv=*) libiconv=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
+ --with-plugincc=*) PLUGINCC=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
+ --with-plugincflags=*) PLUGINCFLAGS=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
+ --with-gmpinc=*) GMPINC=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--without-gcc) GCC_UNDER_TEST=no; shift;;
|
||||
--without-g++) GXX_UNDER_TEST=no; shift;;
|
||||
--without-gfortran) GFORTRAN_UNDER_TEST=no; shift;;
|
||||
@@ -80,6 +84,7 @@ Supported arguments:
|
||||
tested if different than the host.
|
||||
|
||||
--prefix=/some/dir use gcc, g++ and gfortran from /some/dir/bin [PATH]
|
||||
+--enable-plugin run GCC plugin tests
|
||||
--with-gcc=/some/dir/bin/gcc use specified gcc program [gcc]
|
||||
--with-g++=/some/dir/bin/g++ use specified g++ program [g++]
|
||||
--with-gfortran=/some/dir/bin/gfortran use specified gfortran program [gfortran]
|
||||
@@ -87,6 +92,9 @@ Supported arguments:
|
||||
--with-alt-cxx=/some/compiler use specified alternative compiler in compat tests
|
||||
--with-compat-options=opts use specified COMPAT_OPTIONS in compat tests
|
||||
--with-libiconv=linker-args use given arguments to link with iconv [-liconv]
|
||||
+--with-plugincc=/some/c++ use given host compiler to build plugins [g++]
|
||||
+--with-plugincflags=args use given options to build plugins [-g -O2]
|
||||
+--with-gmpinc=args use given options to find GMP for host []
|
||||
--without-gcc do not run gcc testsuite
|
||||
--without-g++ do not run g++ testsuite
|
||||
--without-gfortran do not run gfortran testsuite
|
||||
@@ -146,6 +154,12 @@ fi
|
||||
if test x"$COMPAT_OPTIONS" != x; then
|
||||
echo "set COMPAT_OPTIONS \"${COMPAT_OPTIONS}\"" >> site.exp
|
||||
fi
|
||||
+if test x"$ENABLE_PLUGIN" != x; then
|
||||
+ echo "set ENABLE_PLUGIN \"${ENABLE_PLUGIN}\"" >> site.exp
|
||||
+ echo "set PLUGINCC \"${PLUGINCC-g++}\"" >> site.exp
|
||||
+ echo "set PLUGINCFLAGS \"${PLUGINCFLAGS--g -O2}\"" >> site.exp
|
||||
+ echo "set GMPINC \"${GMPINC}\"" >> site.exp
|
||||
+fi
|
||||
|
||||
test x"${GCC_UNDER_TEST}" = x"no" || runtest --tool gcc ${1+"$@"}
|
||||
test x"${GXX_UNDER_TEST}" = x"no" || runtest --tool g++ ${1+"$@"}
|
||||
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
|
||||
index d475bf1c32ec..2022544cf830 100644
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -3858,7 +3858,7 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
hash-set.h dominance.h cfg.h cfgrtl.h cfganal.h cfgbuild.h cfgcleanup.h \
|
||||
lcm.h cfgloopmanip.h file-prefix-map.h builtins.def $(INSN_ATTR_H) \
|
||||
pass-instances.def params.list $(srcdir)/../include/gomp-constants.h \
|
||||
- $(EXPR_H) $(srcdir)/analyzer/*.h
|
||||
+ $(EXPR_H) $(srcdir)/analyzer/*.h $(srcdir)/text-art/*.h
|
||||
|
||||
# generate the 'build fragment' b-header-vars
|
||||
s-header-vars: Makefile
|
||||
@@ -3896,6 +3896,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
|
||||
fi; \
|
||||
case $$path in \
|
||||
"$(srcdir)"/analyzer/* \
|
||||
+ | "$(srcdir)"/text-art/* \
|
||||
| "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
|
||||
| "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
|
||||
base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
|
||||
diff --git a/gcc/testsuite/g++.dg/plugin/plugin.exp b/gcc/testsuite/g++.dg/plugin/plugin.exp
|
||||
index 9410fea6d7d9..2615f31158cb 100644
|
||||
--- a/gcc/testsuite/g++.dg/plugin/plugin.exp
|
||||
+++ b/gcc/testsuite/g++.dg/plugin/plugin.exp
|
||||
@@ -19,12 +19,10 @@
|
||||
load_lib target-supports.exp
|
||||
load_lib g++-dg.exp
|
||||
|
||||
-global TESTING_IN_BUILD_TREE
|
||||
global ENABLE_PLUGIN
|
||||
|
||||
-# The plugin testcases currently only work when the build tree is available.
|
||||
-# Also check whether the host supports plugins.
|
||||
-if { ![info exists TESTING_IN_BUILD_TREE] || ![info exists ENABLE_PLUGIN] } {
|
||||
+# Check whether the host supports plugins.
|
||||
+if { ![info exists ENABLE_PLUGIN] } {
|
||||
return
|
||||
}
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.dg/plugin/plugin.exp b/gcc/testsuite/gcc.dg/plugin/plugin.exp
|
||||
index 83ef1b2dd939..9894b4a46157 100644
|
||||
--- a/gcc/testsuite/gcc.dg/plugin/plugin.exp
|
||||
+++ b/gcc/testsuite/gcc.dg/plugin/plugin.exp
|
||||
@@ -19,12 +19,10 @@
|
||||
load_lib target-supports.exp
|
||||
load_lib gcc-dg.exp
|
||||
|
||||
-global TESTING_IN_BUILD_TREE
|
||||
global ENABLE_PLUGIN
|
||||
|
||||
-# The plugin testcases currently only work when the build tree is available.
|
||||
-# Also check whether the host supports plugins.
|
||||
-if { ![info exists TESTING_IN_BUILD_TREE] || ![info exists ENABLE_PLUGIN] } {
|
||||
+# Check whether the host supports plugins.
|
||||
+if { ![info exists ENABLE_PLUGIN] } {
|
||||
return
|
||||
}
|
||||
|
||||
diff --git a/gcc/testsuite/lib/plugin-support.exp b/gcc/testsuite/lib/plugin-support.exp
|
||||
index 9188adbdf2f7..b2e76a799314 100644
|
||||
--- a/gcc/testsuite/lib/plugin-support.exp
|
||||
+++ b/gcc/testsuite/lib/plugin-support.exp
|
||||
@@ -62,9 +62,11 @@ proc plugin-get-options { src } {
|
||||
proc plugin-test-execute { plugin_src plugin_tests } {
|
||||
global srcdir objdir
|
||||
global verbose
|
||||
+ global tool
|
||||
global GMPINC
|
||||
global PLUGINCC
|
||||
global PLUGINCFLAGS
|
||||
+ global TESTING_IN_BUILD_TREE
|
||||
|
||||
set basename [file tail $plugin_src]
|
||||
set base [file rootname $basename]
|
||||
@@ -76,16 +78,17 @@ proc plugin-test-execute { plugin_src plugin_tests } {
|
||||
# Build the plugin itself
|
||||
set extra_flags [plugin-get-options $plugin_src]
|
||||
|
||||
- # Note that the plugin test support currently only works when the GCC
|
||||
- # build tree is available. (We make sure that is the case in plugin.exp.)
|
||||
- # Once we have figured out how/where to package/install GCC header files
|
||||
- # for general plugin support, we should modify the following include paths
|
||||
- # accordingly.
|
||||
- set gcc_srcdir "$srcdir/../.."
|
||||
- set gcc_objdir "$objdir/../../.."
|
||||
- set includes "-I. -I${srcdir} -I${gcc_srcdir}/gcc -I${gcc_objdir}/gcc \
|
||||
+ if { [info exists TESTING_IN_BUILD_TREE] } {
|
||||
+ set gcc_srcdir "$srcdir/../.."
|
||||
+ set gcc_objdir "$objdir/../../.."
|
||||
+ set includes "-I. -I${srcdir} -I${gcc_srcdir}/gcc -I${gcc_objdir}/gcc \
|
||||
-I${gcc_srcdir}/include -I${gcc_srcdir}/libcpp/include \
|
||||
$GMPINC -I${gcc_objdir}/gettext/intl"
|
||||
+ } else {
|
||||
+ set options [list "additional_flags=-print-file-name=plugin/include"]
|
||||
+ set plugin_inc [lindex [${tool}_target_compile "" "" "none" $options] 0]
|
||||
+ set includes "-I. -I${srcdir} -I${plugin_inc} $GMPINC"
|
||||
+ }
|
||||
|
||||
if { [ ishost *-*-darwin* ] } {
|
||||
# -mdynamic-no-pic is incompatible with -fPIC.
|
||||
diff --git a/gcc/testsuite/obj-c++.dg/plugin/plugin.exp b/gcc/testsuite/obj-c++.dg/plugin/plugin.exp
|
||||
index ad2ca18bf20b..1de7df886c02 100644
|
||||
--- a/gcc/testsuite/obj-c++.dg/plugin/plugin.exp
|
||||
+++ b/gcc/testsuite/obj-c++.dg/plugin/plugin.exp
|
||||
@@ -19,12 +19,10 @@
|
||||
load_lib target-supports.exp
|
||||
load_lib obj-c++-dg.exp
|
||||
|
||||
-global TESTING_IN_BUILD_TREE
|
||||
global ENABLE_PLUGIN
|
||||
|
||||
-# The plugin testcases currently only work when the build tree is available.
|
||||
-# Also check whether the host supports plugins.
|
||||
-if { ![info exists TESTING_IN_BUILD_TREE] || ![info exists ENABLE_PLUGIN] } {
|
||||
+# Check whether the host supports plugins.
|
||||
+if { ![info exists ENABLE_PLUGIN] } {
|
||||
return
|
||||
}
|
||||
|
||||
diff --git a/gcc/testsuite/objc.dg/plugin/plugin.exp b/gcc/testsuite/objc.dg/plugin/plugin.exp
|
||||
index d03ec729aa7e..a508a433fcf2 100644
|
||||
--- a/gcc/testsuite/objc.dg/plugin/plugin.exp
|
||||
+++ b/gcc/testsuite/objc.dg/plugin/plugin.exp
|
||||
@@ -19,12 +19,10 @@
|
||||
load_lib target-supports.exp
|
||||
load_lib objc-dg.exp
|
||||
|
||||
-global TESTING_IN_BUILD_TREE
|
||||
global ENABLE_PLUGIN
|
||||
|
||||
-# The plugin testcases currently only work when the build tree is available.
|
||||
-# Also check whether the host supports plugins.
|
||||
-if { ![info exists TESTING_IN_BUILD_TREE] || ![info exists ENABLE_PLUGIN] } {
|
||||
+# Check whether the host supports plugins.
|
||||
+if { ![info exists ENABLE_PLUGIN] } {
|
||||
return
|
||||
}
|
||||
|
||||
92
gcc14-tests-installed-site-exp.patch
Normal file
92
gcc14-tests-installed-site-exp.patch
Normal file
@ -0,0 +1,92 @@
|
||||
commit a7b8c5faa6ff3d9bcc15457113e611ec377c6f5f
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Mon Dec 8 17:02:22 2025 +0000
|
||||
|
||||
contrib: Set more site.exp variables in test_installed
|
||||
|
||||
Add support in contrib/test_installed for more variables (via
|
||||
associated command-line options to the script) that gcc/Makefile.in
|
||||
can set:
|
||||
|
||||
* ALT_CC_UNDER_TEST, ALT_CXX_UNDER_TEST and COMPAT_OPTIONS are used in
|
||||
compat testing (against the same or a different compiler).
|
||||
|
||||
* The libiconv variable is used for testing iconv support for
|
||||
particular character sets, and defaults to -liconv if not set in
|
||||
site.exp, which is wrong on systems with iconv in libc; keep the
|
||||
default, but add an option to override this.
|
||||
|
||||
Note that the dg-require-iconv testing is currently bogus in a cross
|
||||
environment, and this patch does nothing to address that. The tests
|
||||
using dg-require-iconv actually care about character set support on
|
||||
the *host*, for character conversions carried out in the compiler,
|
||||
and the libiconv setting put in site.exp by gcc/Makefile.in is a
|
||||
*host* library setting. But dg-require-iconv /
|
||||
check_iconv_available tests availability when compiling, linking and
|
||||
executing for the *target*. If the host and target have close
|
||||
enough to the same OS, this may work by accident, but otherwise it
|
||||
will incorrectly enable / disable these tests based on target
|
||||
information (but using a libiconv setting designed for the host)
|
||||
when it should be based on host information.
|
||||
|
||||
* test_installed (--with-alt-cc=, --with-alt-cxx=)
|
||||
(--with-compat-options=, --with-libiconv=): New options.
|
||||
|
||||
diff --git a/contrib/test_installed b/contrib/test_installed
|
||||
index 77492cabe171..42c3f12b7d78 100755
|
||||
--- a/contrib/test_installed
|
||||
+++ b/contrib/test_installed
|
||||
@@ -42,6 +42,7 @@ if test -f site.exp; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+libiconv=-liconv
|
||||
while true; do
|
||||
case "$1" in
|
||||
--with-testsuite=*) testsuite=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
@@ -51,6 +52,10 @@ while true; do
|
||||
--with-gcc=*) GCC_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--with-g++=*) GXX_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--with-gfortran=*) GFORTRAN_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
+ --with-alt-cc=*) ALT_CC_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
+ --with-alt-cxx=*) ALT_CXX_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
+ --with-compat-options=*) COMPAT_OPTIONS=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
+ --with-libiconv=*) libiconv=`echo "$1" | sed 's/[^=]*=//'`; shift;;
|
||||
--without-gcc) GCC_UNDER_TEST=no; shift;;
|
||||
--without-g++) GXX_UNDER_TEST=no; shift;;
|
||||
--without-gfortran) GFORTRAN_UNDER_TEST=no; shift;;
|
||||
@@ -78,6 +83,10 @@ Supported arguments:
|
||||
--with-gcc=/some/dir/bin/gcc use specified gcc program [gcc]
|
||||
--with-g++=/some/dir/bin/g++ use specified g++ program [g++]
|
||||
--with-gfortran=/some/dir/bin/gfortran use specified gfortran program [gfortran]
|
||||
+--with-alt-cc=/some/compiler use specified alternative compiler in compat tests
|
||||
+--with-alt-cxx=/some/compiler use specified alternative compiler in compat tests
|
||||
+--with-compat-options=opts use specified COMPAT_OPTIONS in compat tests
|
||||
+--with-libiconv=linker-args use given arguments to link with iconv [-liconv]
|
||||
--without-gcc do not run gcc testsuite
|
||||
--without-g++ do not run g++ testsuite
|
||||
--without-gfortran do not run gfortran testsuite
|
||||
@@ -108,6 +117,7 @@ cat >site.exp <<EOF
|
||||
set rootme "."
|
||||
set tmpdir "${tmpdir-`${PWDCMD-pwd}`}"
|
||||
set srcdir "${testsuite-${srcdir}/gcc/testsuite}"
|
||||
+set libiconv "$libiconv"
|
||||
set CFLAGS ""
|
||||
set CXXFLAGS ""
|
||||
set GCC_UNDER_TEST "${GCC_UNDER_TEST-${prefix}${prefix+/bin/}gcc}"
|
||||
@@ -123,6 +133,15 @@ if test x${target} != x; then
|
||||
echo "set target_triplet $target" >> site.exp
|
||||
echo "set target_alias $target" >> site.exp
|
||||
fi
|
||||
+if test x"$ALT_CC_UNDER_TEST" != x; then
|
||||
+ echo "set ALT_CC_UNDER_TEST \"${ALT_CC_UNDER_TEST}\"" >> site.exp
|
||||
+fi
|
||||
+if test x"$ALT_CXX_UNDER_TEST" != x; then
|
||||
+ echo "set ALT_CXX_UNDER_TEST \"${ALT_CXX_UNDER_TEST}\"" >> site.exp
|
||||
+fi
|
||||
+if test x"$COMPAT_OPTIONS" != x; then
|
||||
+ echo "set COMPAT_OPTIONS \"${COMPAT_OPTIONS}\"" >> site.exp
|
||||
+fi
|
||||
|
||||
test x"${GCC_UNDER_TEST}" = x"no" || runtest --tool gcc ${1+"$@"}
|
||||
test x"${GXX_UNDER_TEST}" = x"no" || runtest --tool g++ ${1+"$@"}
|
||||
54
gcc14-tests-installed-target.patch
Normal file
54
gcc14-tests-installed-target.patch
Normal file
@ -0,0 +1,54 @@
|
||||
commit 311d2829db18a24c2e46d0434f463ebc1df00a56
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Thu Dec 11 23:20:54 2025 +0000
|
||||
|
||||
contrib: Use config.sub in test_installed
|
||||
|
||||
Correctly running GCC testsuites with an installed compiler requires
|
||||
both the canonical and noncanonical versions of the target triplet:
|
||||
the canonical one for where the testsuite matches on target triplets,
|
||||
and the noncanonical one for various "transform" calls used to find
|
||||
binutils programs. Make test_installed use config.sub to determine
|
||||
the canonical target from any value passed with --target= (and thus
|
||||
make logic to locate the toplevel source directory from its own
|
||||
location unconditional, as it's now used to locate config.sub).
|
||||
|
||||
* test_installed: Use config.sub to determine canonical target.
|
||||
|
||||
diff --git a/contrib/test_installed b/contrib/test_installed
|
||||
index 42c3f12b7d78..530d21ed74ec 100755
|
||||
--- a/contrib/test_installed
|
||||
+++ b/contrib/test_installed
|
||||
@@ -104,13 +104,16 @@ EOF
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
-
|
||||
+
|
||||
+# Determine the source directory to find config.sub, whether or not
|
||||
+# that is also used to locate the testsuite sources.
|
||||
+file=$0
|
||||
+while [ -h $file ]; do
|
||||
+ file=`ls -l $file | sed s/'.* -> '//`
|
||||
+done
|
||||
+top_srcdir=`CDPATH=. && cd \`echo "$file" | sed 's,/*[^/]*$,,;s,^$,.,'\`/.. >/dev/null && ${PWDCMD-pwd}`
|
||||
if test x"${testsuite+set}" != x"set" && test x"${srcdir+set}" != x"set"; then
|
||||
- file=$0
|
||||
- while [ -h $file ]; do
|
||||
- file=`ls -l $file | sed s/'.* -> '//`
|
||||
- done
|
||||
- srcdir=`CDPATH=. && cd \`echo "$file" | sed 's,/*[^/]*$,,;s,^$,.,'\`/.. >/dev/null && ${PWDCMD-pwd}`
|
||||
+ srcdir=$top_srcdir
|
||||
fi
|
||||
|
||||
cat >site.exp <<EOF
|
||||
@@ -130,7 +133,8 @@ set HOSTCFLAGS ""
|
||||
set HOSTCXXFLAGS ""
|
||||
EOF
|
||||
if test x${target} != x; then
|
||||
- echo "set target_triplet $target" >> site.exp
|
||||
+ target_canonical=`$top_srcdir/config.sub $target`
|
||||
+ echo "set target_triplet $target_canonical" >> site.exp
|
||||
echo "set target_alias $target" >> site.exp
|
||||
fi
|
||||
if test x"$ALT_CC_UNDER_TEST" != x; then
|
||||
69
gcc14-tests-misc-native.patch
Normal file
69
gcc14-tests-misc-native.patch
Normal file
@ -0,0 +1,69 @@
|
||||
commit 5bebe71d30b9c7d1479a9b8c0de342bf3ada4b8b
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Mon Jan 19 21:16:46 2026 +0000
|
||||
|
||||
testsuite: Do not restrict five tests to { target native }
|
||||
|
||||
Five miscellaneous tests use { target native }, while not doing
|
||||
anything that actually needs some kind of special handling for cross
|
||||
testing. Remove the { target native } restriction from those tests.
|
||||
|
||||
Tested for x86_64-pc-linux-gnu, and with cross to aarch64-linux.
|
||||
|
||||
* g++.old-deja/g++.mike/eh30.C, g++.old-deja/g++.mike/p4750.C,
|
||||
g++.old-deja/g++.robertl/eb106.C, g++.old-deja/g++.robertl/eb83.C,
|
||||
gcc.dg/20020201-1.c: Do not use { target native }.
|
||||
|
||||
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh30.C b/gcc/testsuite/g++.old-deja/g++.mike/eh30.C
|
||||
index 848809245c14..31c2c856f0c2 100644
|
||||
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh30.C
|
||||
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh30.C
|
||||
@@ -1,4 +1,4 @@
|
||||
-// { dg-do assemble { target native } }
|
||||
+// { dg-do assemble }
|
||||
// { dg-options "-fexceptions -fPIC -S" }
|
||||
|
||||
int
|
||||
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p4750.C b/gcc/testsuite/g++.old-deja/g++.mike/p4750.C
|
||||
index ccf462be00d4..f9353e529fab 100644
|
||||
--- a/gcc/testsuite/g++.old-deja/g++.mike/p4750.C
|
||||
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p4750.C
|
||||
@@ -1,4 +1,4 @@
|
||||
-// { dg-do assemble { target native } }
|
||||
+// { dg-do assemble }
|
||||
// { dg-options "-fpic -pedantic-errors -S" }
|
||||
// prms-id: 4750
|
||||
|
||||
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb106.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb106.C
|
||||
index b341cff55023..3f4dce099fe8 100644
|
||||
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb106.C
|
||||
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb106.C
|
||||
@@ -1,4 +1,4 @@
|
||||
-// { dg-do assemble { target native } }
|
||||
+// { dg-do assemble }
|
||||
// { dg-options "-O2 -fPIC " }
|
||||
struct T
|
||||
{
|
||||
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb83.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb83.C
|
||||
index 47cf5b88f041..41e8ff629979 100644
|
||||
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb83.C
|
||||
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb83.C
|
||||
@@ -1,4 +1,4 @@
|
||||
-// { dg-do run { target native } }
|
||||
+// { dg-do run }
|
||||
// { dg-options "-fprofile-arcs -ftest-coverage" }
|
||||
void
|
||||
test_swap(int& x, int& y) throw()
|
||||
diff --git a/gcc/testsuite/gcc.dg/20020201-1.c b/gcc/testsuite/gcc.dg/20020201-1.c
|
||||
index 1cb2a8788044..fb48a230e962 100644
|
||||
--- a/gcc/testsuite/gcc.dg/20020201-1.c
|
||||
+++ b/gcc/testsuite/gcc.dg/20020201-1.c
|
||||
@@ -5,7 +5,7 @@
|
||||
call-clobbered global pointer. */
|
||||
|
||||
/* { dg-options "-fprofile-arcs" } */
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
115
gcc14-tests-simulate-thread-native.patch
Normal file
115
gcc14-tests-simulate-thread-native.patch
Normal file
@ -0,0 +1,115 @@
|
||||
commit 3119cfc9118eb8545dac9bf765c93f762ad8794a
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Wed Jan 14 17:10:33 2026 +0000
|
||||
|
||||
testsuite: Enable cross testing for simulate-thread tests
|
||||
|
||||
The simulate-thread tests exit early in cross and remote cases. Apply
|
||||
fixes similar to (but affecting separate code) those recently posted
|
||||
for the guality tests: do not use [transform gdb] since that's a cross
|
||||
GDB and the tests expect to run GDB on the target, test existence on
|
||||
the target not the build system, and copy required files to the target
|
||||
(deleting them later).
|
||||
|
||||
Tested for x86_64-pc-linux-gnu to make sure native testing isn't
|
||||
broken, and with cross to aarch64-linux.
|
||||
|
||||
* lib/gcc-dg.exp (gdb-exists): Do not use [transform gdb]. Run
|
||||
selected GDB with -v on target rather than testing for existence
|
||||
on build system.
|
||||
* lib/gcc-simulate-thread.exp (simulate-thread): Do not return
|
||||
early for non-native and remote. Download executable and GDB
|
||||
command file to target before running GDB there, and delete when
|
||||
closing target.
|
||||
|
||||
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
|
||||
index 87dddb8cd8ac..f2e5228fff58 100644
|
||||
--- a/gcc/testsuite/lib/gcc-dg.exp
|
||||
+++ b/gcc/testsuite/lib/gcc-dg.exp
|
||||
@@ -1374,11 +1374,12 @@ proc gdb-exists { args } {
|
||||
if [info exists GDB] {
|
||||
setenv GDB_FOR_GCC_TESTING "$GDB"
|
||||
} else {
|
||||
- setenv GDB_FOR_GCC_TESTING "[transform gdb]"
|
||||
+ setenv GDB_FOR_GCC_TESTING "gdb"
|
||||
}
|
||||
}
|
||||
}
|
||||
- if { [which $::env(GDB_FOR_GCC_TESTING)] != 0 } {
|
||||
+ if { [lindex [remote_exec target "$::env(GDB_FOR_GCC_TESTING)" "-v"] 0]
|
||||
+ == 0 } {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
diff --git a/gcc/testsuite/lib/gcc-simulate-thread.exp b/gcc/testsuite/lib/gcc-simulate-thread.exp
|
||||
index 115b636e603d..dcbcd3dc08ef 100644
|
||||
--- a/gcc/testsuite/lib/gcc-simulate-thread.exp
|
||||
+++ b/gcc/testsuite/lib/gcc-simulate-thread.exp
|
||||
@@ -24,8 +24,6 @@ load_lib timeout.exp
|
||||
# Call 'fail' if a given test printed "FAIL:", otherwise call 'pass'.
|
||||
|
||||
proc simulate-thread { args } {
|
||||
- if { ![isnative] || [is_remote target] } { return }
|
||||
-
|
||||
if { [llength $args] == 1 } {
|
||||
switch [dg-process-target [lindex $args 0]] {
|
||||
"F" { setup_xfail "*-*-*" }
|
||||
@@ -49,10 +47,16 @@ proc simulate-thread { args } {
|
||||
|
||||
set message "thread simulation test"
|
||||
|
||||
- send_log "Spawning: $gdb_name -nx -nw -batch -x $cmd_file ./$exec_file\n"
|
||||
- set res [remote_spawn target "$gdb_name -nx -nw -batch -x $cmd_file ./$exec_file"]
|
||||
+ set cmd_file_remote [remote_download target $cmd_file]
|
||||
+ set exec_file_remote [remote_download target $exec_file]
|
||||
+ send_log "Spawning: $gdb_name -nx -nw -batch -x $cmd_file_remote $exec_file_remote\n"
|
||||
+ set res [remote_spawn target "$gdb_name -nx -nw -batch -x $cmd_file_remote $exec_file_remote"]
|
||||
if { $res < 0 || $res == "" } {
|
||||
unsupported "$testcase $message"
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $exec_file_remote
|
||||
+ }
|
||||
return
|
||||
}
|
||||
|
||||
@@ -62,11 +66,19 @@ proc simulate-thread { args } {
|
||||
# Too old GDB
|
||||
-re "Unhandled dwarf expression|Error in sourced command file" {
|
||||
unsupported "$testcase $message"
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $exec_file_remote
|
||||
+ }
|
||||
remote_close target
|
||||
return
|
||||
}
|
||||
-re "FAIL:" {
|
||||
fail "$testcase $message"
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $exec_file_remote
|
||||
+ }
|
||||
remote_close target
|
||||
return
|
||||
}
|
||||
@@ -79,11 +91,19 @@ proc simulate-thread { args } {
|
||||
}
|
||||
timeout {
|
||||
fail "$testcase $message"
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $exec_file_remote
|
||||
+ }
|
||||
remote_close target
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
+ if { [is_remote target] } {
|
||||
+ remote_file target delete $cmd_file_remote
|
||||
+ remote_file target delete $exec_file_remote
|
||||
+ }
|
||||
remote_close target
|
||||
if {$gdb_worked} {
|
||||
pass "$testcase $message"
|
||||
55
gcc14-tests-ssp-native.patch
Normal file
55
gcc14-tests-ssp-native.patch
Normal file
@ -0,0 +1,55 @@
|
||||
commit 531150b1ac41a6aebfa39dec28730c9f3b10a930
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Tue Jan 6 22:11:20 2026 +0000
|
||||
|
||||
testsuite: Do not restrict stack protector tests to native testing
|
||||
|
||||
Three stack protector tests in gcc.dg use
|
||||
|
||||
/* { dg-do run { target native } } */
|
||||
|
||||
for no apparent reason, since there is nothing in those tests that
|
||||
should care about the difference between native and cross testing.
|
||||
They also have
|
||||
|
||||
/* { dg-require-effective-target fstack_protector } */
|
||||
|
||||
which is the actually relevant condition for such tests. Remove the
|
||||
{ target native } restriction.
|
||||
|
||||
Tested natively for x86_64-pc-linux-gnu, and with cross to
|
||||
aarch64-linux.
|
||||
|
||||
* gcc.dg/ssp-1.c, gcc.dg/ssp-2.c, gcc.dg/stackprotectexplicit1.c:
|
||||
Do not restrict to { target native }.
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.dg/ssp-1.c b/gcc/testsuite/gcc.dg/ssp-1.c
|
||||
index db693327f701..74cdb96049c9 100644
|
||||
--- a/gcc/testsuite/gcc.dg/ssp-1.c
|
||||
+++ b/gcc/testsuite/gcc.dg/ssp-1.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-options "-fstack-protector" } */
|
||||
/* { dg-require-effective-target fstack_protector } */
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.dg/ssp-2.c b/gcc/testsuite/gcc.dg/ssp-2.c
|
||||
index 608ca3000323..22f31d994081 100644
|
||||
--- a/gcc/testsuite/gcc.dg/ssp-2.c
|
||||
+++ b/gcc/testsuite/gcc.dg/ssp-2.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-options "-fstack-protector" } */
|
||||
/* { dg-options "-fstack-protector -Wl,-multiply_defined,suppress" { target *-*-darwin* } } */
|
||||
/* { dg-prune-output "-multiply_defined is obsolete" } */
|
||||
diff --git a/gcc/testsuite/gcc.dg/stackprotectexplicit1.c b/gcc/testsuite/gcc.dg/stackprotectexplicit1.c
|
||||
index 658c297d9f58..bb59b7fadd1f 100644
|
||||
--- a/gcc/testsuite/gcc.dg/stackprotectexplicit1.c
|
||||
+++ b/gcc/testsuite/gcc.dg/stackprotectexplicit1.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* { dg-do run { target native } } */
|
||||
+/* { dg-do run } */
|
||||
/* { dg-options "-fstack-protector-explicit" } */
|
||||
/* { dg-require-effective-target fstack_protector } */
|
||||
|
||||
63
gcc14-tests-tree-prof-native.patch
Normal file
63
gcc14-tests-tree-prof-native.patch
Normal file
@ -0,0 +1,63 @@
|
||||
commit e373a57b07de9290e8e3f6913f4179404f0b886e
|
||||
Author: Joseph Myers <josmyers@redhat.com>
|
||||
Date: Mon Jan 26 16:49:29 2026 +0000
|
||||
|
||||
testsuite: Make profopt-execute also copy profile data for dg-additional-sources
|
||||
|
||||
Most gcc.dg/tree-prof tests work correctly in environments where .gcda
|
||||
files from the first run need to be copied from the target, because
|
||||
there is existing code in profopt-execute to do so. A few tests using
|
||||
dg-additional-sources fail because that code only copies the .gcda
|
||||
file for the main test source file. Add similar code to copy it for
|
||||
any sources listed in dg-additional-sources as well.
|
||||
|
||||
The use of additional_sources_used is consistent with what
|
||||
profopt-target-cleanup does. It turns out to require the added call
|
||||
to cleanup-after-saved-dg-test to avoid additional_sources_used
|
||||
leaking from one test into the next.
|
||||
|
||||
Tested for x86_64-pc-linux-gnu to make sure native testing isn't
|
||||
broken, and with cross to aarch64-linux.
|
||||
|
||||
* lib/profopt.exp (profopt-execute): Also copy profile data from
|
||||
target for additional sources. Call cleanup-after-saved-dg-test
|
||||
before normal return.
|
||||
|
||||
diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp
|
||||
index 3188ba8a5348..c9f5ae53d499 100644
|
||||
--- a/gcc/testsuite/lib/profopt.exp
|
||||
+++ b/gcc/testsuite/lib/profopt.exp
|
||||
@@ -312,6 +312,7 @@ proc profopt-execute { src } {
|
||||
global generate_final_code use_final_code
|
||||
global verbose
|
||||
global testname_with_flags
|
||||
+ global additional_sources_used
|
||||
|
||||
if ![info exists profile_option] {
|
||||
error "No profile option specified for first compile."
|
||||
@@ -474,6 +475,19 @@ proc profopt-execute { src } {
|
||||
set missing_file 1
|
||||
fail "$testcase execution: file $bprefix$base.$ext does not exist, $option $profile_option"
|
||||
}
|
||||
+ if [info exists additional_sources_used] {
|
||||
+ foreach srcfile $additional_sources_used {
|
||||
+ set add_basename [file tail $srcfile]
|
||||
+ set add_base [file rootname $add_basename]
|
||||
+ remote_upload target $tmpdir/$bprefix$add_base.$ext
|
||||
+ set files [glob -nocomplain $bprefix$add_base.$ext]
|
||||
+ if { $files == "" } {
|
||||
+ set status "fail"
|
||||
+ set missing_file 1
|
||||
+ fail "$testcase execution: file $bprefix$add_base.$ext does not exist, $option $profile_option"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
if { $missing_file == 0 } {
|
||||
@@ -606,4 +620,5 @@ proc profopt-execute { src } {
|
||||
}
|
||||
}
|
||||
unset testname_with_flags
|
||||
+ cleanup-after-saved-dg-test
|
||||
}
|
||||
2
sources
2
sources
@ -1,4 +1,4 @@
|
||||
SHA512 (gcc-14.3.1-20250617.tar.xz) = 5b5f35f56e6e3ddcb94a72756af316b6520bd4c3d740553c88f99d91101bd99a6e4d50b7cd677159327b08bc91903939e97f1004f2dfaabd2085501e63dc061e
|
||||
SHA512 (gcc-14.3.1-20251022.tar.xz) = fcd1c6dc02bf8edbac229f582fc6c3550554dba4c00d0521b7c5d9411a2488f4163e598e4c564e445b2b2538d6e2f4436c054852e1b46018e2e74dbae930174e
|
||||
SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
|
||||
SHA512 (newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed.tar.xz) = 31bfc19429797236e268e22b752c5abeabb9c0f39b1058634af8dab329b4f028fc72a35888193c9575f6cee5cf2c069669d79fcb4d4e3a4318f57413452f707d
|
||||
SHA512 (nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz) = 941e763af8601b89f0e4ec48a2d68ae0a8e70ee1e6ba6859394b021ad7bd7d143cc529f3c35c08d7f84e5554980ddcc97cf05b6c4755c2bc36c91161b79e8cea
|
||||
|
||||
Loading…
Reference in New Issue
Block a user