On 7/10/2026 3:43 PM, Philippe Mathieu-Daudé wrote:
> On 10/7/26 23:42, Pierrick Bouvier wrote:
>> On Fedora, cross compilers are provided without runtime or header files.
>> Thus, even if program is present, it can't be used to compile files
>> directly. Check this, and fallback on docker if not working.
>>
>> Signed-off-by: Pierrick Bouvier <[email protected]>
>> ---
>>   tests/tcg/meson.build | 13 +++++++++++++
>>   tests/tcg/test_cc.c   |  7 +++++++
>>   2 files changed, 20 insertions(+)
>>   create mode 100644 tests/tcg/test_cc.c
> 
> 
>> diff --git a/tests/tcg/test_cc.c b/tests/tcg/test_cc.c
>> new file mode 100644
>> index 00000000000..b8a0dae6c8a
>> --- /dev/null
>> +++ b/tests/tcg/test_cc.c
>> @@ -0,0 +1,7 @@
>> +/* SPDX-License-Identifier: GPL-2.0-or-later */
>> +
>> +#include <stdint.h>
> 
> Why include this header?
>

On fedora distro, aarch64-linux-gnu-gcc will compile this example if no
header is required. By adding an explicit header, we make sure it
provides them, which is not the case.

>> +
>> +int main(void)
>> +{
> 
>      return 69;
> 
>> +}
> 
> Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
> 


Reply via email to