* [PATCH] tests/tcg: Don't #include <inttypes.h> in aarch64/system/vtimer.c
@ 2024-01-08 12:50 Ilya Leoshkevich
2024-01-08 12:56 ` Philippe Mathieu-Daudé
2024-01-08 17:37 ` Paolo Bonzini
0 siblings, 2 replies; 4+ messages in thread
From: Ilya Leoshkevich @ 2024-01-08 12:50 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-arm, qemu-devel, Ilya Leoshkevich
make check-tcg fails on Fedora with:
vtimer.c:9:10: fatal error: inttypes.h: No such file or directory
Fedora has a minimal aarch64 cross-compiler, which satisfies the
configure checks, so it's chosen instead of the dockerized one.
There is no cross-version of inttypes.h, however.
Fix by using stdint.h instead. The test does not require anything
from inttypes.h anyway.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
tests/tcg/aarch64/system/vtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/tcg/aarch64/system/vtimer.c b/tests/tcg/aarch64/system/vtimer.c
index 42f2f7796c7..7d725eced34 100644
--- a/tests/tcg/aarch64/system/vtimer.c
+++ b/tests/tcg/aarch64/system/vtimer.c
@@ -6,7 +6,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
-#include <inttypes.h>
+#include <stdint.h>
#include <minilib.h>
/* grabbed from Linux */
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/tcg: Don't #include <inttypes.h> in aarch64/system/vtimer.c
2024-01-08 12:50 [PATCH] tests/tcg: Don't #include <inttypes.h> in aarch64/system/vtimer.c Ilya Leoshkevich
@ 2024-01-08 12:56 ` Philippe Mathieu-Daudé
2024-01-08 13:07 ` Ilya Leoshkevich
2024-01-08 17:37 ` Paolo Bonzini
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-08 12:56 UTC (permalink / raw)
To: Ilya Leoshkevich, Peter Maydell; +Cc: qemu-arm, qemu-devel
Hi Ilya,
On 8/1/24 13:50, Ilya Leoshkevich wrote:
> make check-tcg fails on Fedora with:
>
> vtimer.c:9:10: fatal error: inttypes.h: No such file or directory
>
> Fedora has a minimal aarch64 cross-compiler, which satisfies the
> configure checks, so it's chosen instead of the dockerized one.
> There is no cross-version of inttypes.h, however.
Presumably this isn't specific to aarch64 target, so what about
the other uses, shouldn't we clean all similar uses at once?
$ git grep inttypes.h tests/tcg | wc -l
26
> Fix by using stdint.h instead. The test does not require anything
> from inttypes.h anyway.
>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
> tests/tcg/aarch64/system/vtimer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/tcg/aarch64/system/vtimer.c b/tests/tcg/aarch64/system/vtimer.c
> index 42f2f7796c7..7d725eced34 100644
> --- a/tests/tcg/aarch64/system/vtimer.c
> +++ b/tests/tcg/aarch64/system/vtimer.c
> @@ -6,7 +6,7 @@
> * SPDX-License-Identifier: GPL-2.0-or-later
> */
>
> -#include <inttypes.h>
> +#include <stdint.h>
> #include <minilib.h>
>
> /* grabbed from Linux */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/tcg: Don't #include <inttypes.h> in aarch64/system/vtimer.c
2024-01-08 12:56 ` Philippe Mathieu-Daudé
@ 2024-01-08 13:07 ` Ilya Leoshkevich
0 siblings, 0 replies; 4+ messages in thread
From: Ilya Leoshkevich @ 2024-01-08 13:07 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Peter Maydell; +Cc: qemu-arm, qemu-devel
On Mon, 2024-01-08 at 13:56 +0100, Philippe Mathieu-Daudé wrote:
> Hi Ilya,
>
> On 8/1/24 13:50, Ilya Leoshkevich wrote:
> > make check-tcg fails on Fedora with:
> >
> > vtimer.c:9:10: fatal error: inttypes.h: No such file or
> > directory
> >
> > Fedora has a minimal aarch64 cross-compiler, which satisfies the
> > configure checks, so it's chosen instead of the dockerized one.
> > There is no cross-version of inttypes.h, however.
>
> Presumably this isn't specific to aarch64 target, so what about
> the other uses, shouldn't we clean all similar uses at once?
>
> $ git grep inttypes.h tests/tcg | wc -l
> 26
As far as I can see, these 26 occurrences are for user tests.
These work fine; I assume this is because the user cross-compiler is
chosen using a stricter configure check:
write_c_skeleton
case $1 in
*-softmmu)
if do_compiler "$target_cc" $target_cflags -o $TMPO -c $TMPC &&
do_compiler "$target_cc" $target_cflags -r -nostdlib -o
"${TMPDIR1}/${TMPB}2.o" "$TMPO" -lgcc; then
got_cross_cc=yes
break
fi
;;
*)
if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC -
static ; then
build_static=y
got_cross_cc=yes
break
fi
if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC ;
then
build_static=
got_cross_cc=yes
break
fi
;;
esac
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/tcg: Don't #include <inttypes.h> in aarch64/system/vtimer.c
2024-01-08 12:50 [PATCH] tests/tcg: Don't #include <inttypes.h> in aarch64/system/vtimer.c Ilya Leoshkevich
2024-01-08 12:56 ` Philippe Mathieu-Daudé
@ 2024-01-08 17:37 ` Paolo Bonzini
1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2024-01-08 17:37 UTC (permalink / raw)
To: Ilya Leoshkevich; +Cc: Peter Maydell, qemu-arm, qemu-devel
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-08 17:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-08 12:50 [PATCH] tests/tcg: Don't #include <inttypes.h> in aarch64/system/vtimer.c Ilya Leoshkevich
2024-01-08 12:56 ` Philippe Mathieu-Daudé
2024-01-08 13:07 ` Ilya Leoshkevich
2024-01-08 17:37 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).