Hi Tobias!
On 2023-10-18T11:53:30+0200, Tobias Burnus <[email protected]> wrote:
> On 18.10.23 11:44, Thomas Schwinge wrote:
>> No need to change anything now, but in case that's useful later:
>> [...]
>> ..., just noting that '{ target c }', '{ target c++ }' are trivial to
>> implement; see libgomp OpenACC testing:
>>
>> libgomp/testsuite/libgomp.oacc-c/c.exp:proc check_effective_target_c { } {
>
> Shouldn't we rather do something like the following (untested)?
>
> --- a/libgomp/testsuite/lib/libgomp.exp
> +++ b/libgomp/testsuite/lib/libgomp.exp
> @@ -26,2 +26,3 @@ load_gcc_lib timeout.exp
> load_gcc_lib file-format.exp
> +load_gcc_lib target-supports.exp
> load_gcc_lib target-supports-dg.exp
'gcc/testsuite/lib/target-supports.exp' defines:
# Return 1 if the language for the compiler under test is C.
proc check_effective_target_c { } {
global tool
if [string match $tool "gcc"] {
return 1
}
return 0
}
# Return 1 if the language for the compiler under test is C++.
proc check_effective_target_c++ { } {
global tool
if { [string match $tool "g++"] || [string match $tool "libstdc++"] } {
return 1
}
return 0
}
However, (per my understanding; not verified) 'tool == libgomp' for
libgomp testing, so that doesn't work.
Grüße
Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
München, HRB 106955