]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
nvptx: Re-enable 'gcc.misc-tests/options.exp'
authorThomas Schwinge <thomas@codesourcery.com>
Mon, 28 Nov 2022 11:59:52 +0000 (12:59 +0100)
committerThomas Schwinge <tschwinge@baylibre.com>
Mon, 7 Oct 2024 08:13:13 +0000 (10:13 +0200)
..., just conditionalize its profiling test (as done elsewhere).  The
re-enabled test cases all PASS.

For the record, for example for GCN target, this causes:

     Running [...]/gcc/testsuite/gcc.misc-tests/options.exp ...
    -PASS: compiler driver --coverage option(s)
     PASS: compiler driver -fdump-ipa-all-address option(s)
     PASS: compiler driver -fdump-ipa-all-alias option(s)
     PASS: compiler driver -fdump-ipa-all-all option(s)

That was:

    Running [...]/gcc/testsuite/gcc.misc-tests/options.exp ...
    Executing on host: [xgcc] [...] --coverage [...]
    [...]
    ld: error: undefined symbol: __gcov_exit
    >>> referenced by /tmp/ccRGdqjA.o:(_sub_D_00100_1)
    >>> referenced by /tmp/ccRGdqjA.o:(_sub_D_00100_1)
    collect2: error: ld returned 1 exit status
    compiler exited with status 1
    output is:
    [...]
    PASS: compiler driver --coverage option(s)

..., so that's nothing to worry about.

gcc/testsuite/
* gcc.misc-tests/options.exp: Re-enable for nvptx.

gcc/testsuite/gcc.misc-tests/options.exp

index 6e6e40c183d5019eb683dce749f41352156643ee..0c2ba6781cd3330c9f7935d1bbf9b17eddc19b84 100644 (file)
 
 load_lib gcc-defs.exp
 
-# disable for non-profile targets explitly, rather than
-# rely on check-effective target.  We're explicitly trying to check
-# profiling works, and if it doesn't check-effective-target will
-# simply skip the tests, rather than have this test shout at us.
-if [ istarget "nvptx-*-*" ] { return 0 }
-
 # These tests don't run runtest_file_p consistently if it
 # doesn't return the same values, so disable parallelization
 # of this *.exp file.  The first parallel runtest to reach
@@ -73,7 +67,9 @@ proc check_for_all_options {language gcc_options compiler_pattern as_pattern ld_
     pass $test
 }
 
-check_for_all_options c {--coverage} {-fprofile-arcs -ftest-coverage} {} {-lgcov}
+if { [check_profiling_available "-fprofile-arcs"] } {
+    check_for_all_options c {--coverage} {-fprofile-arcs -ftest-coverage} {} {-lgcov}
+}
 
 proc get_dump_flags {} {
     set res [list]