Re: Arm compilation error in tools/test-runner.c error: impossible constraint in 'asm'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi John,

> Building bluez out of git within OpenEmbedded for ARM results in the
> following compilation "error impossible constraint in 'asm'"
> 
> arm-poky-linux-gnueabi-gcc  -march=armv7-a -marm -mthumb-interwork
> -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8
> --sysroot=/home/johnc/tt/ViciaHeinox/build/tmp/sysroots/trex
> -DHAVE_CONFIG_H -I.  -I./lib
> -I/home/johnc/tt/ViciaHeinox/build/tmp/sysroots/trex/usr/include/dbus-1.0
> -I/home/johnc/tt/ViciaHeinox/build/tmp/sysroots/trex/usr/lib/dbus-1.0/include
> -I/home/johnc/tt/ViciaHeinox/build/tmp/sysroots/trex/usr/include/glib-2.0
> -I/home/johnc/tt/ViciaHeinox/build/tmp/sysroots/trex/usr/lib/glib-2.0/include
>  -O2 -pipe -g -feliminate-unused-debug-types -c -o
> tools/test-runner.o tools/test-runner.c
> 
> 
> | tools/test-runner.c: In function 'start_qemu':
> | tools/test-runner.c:224:2: error: impossible constraint in 'asm'
> |   __asm__ __volatile__("cpuid" : "=c" (ecx) : "a" (1) : "memory");
> |   ^
> 
> 
> I believe this was introduced with this commit....
> 
> commit a0a03828fbc49db9f0926cee87d53d627d69bac2
> Author: Marcel Holtmann <marcel@xxxxxxxxxxxx>
> Date:   Mon Apr 6 20:45:39 2015 -0700
> 
>    tools: Add fallback if KVM support is not available
> 
> diff --git a/tools/test-runner.c b/tools/test-runner.c
> index 407a985..163b610 100644
> --- a/tools/test-runner.c
> +++ b/tools/test-runner.c
> @@ -195,7 +195,7 @@ static char *const qemu_argv[] = {
>        "-no-user-config",
>        "-monitor", "none",
>        "-display", "none",
> -       "-machine", "type=q35,accel=kvm",
> +       "-machine", "type=q35,accel=kvm:tcg",
>        "-m", "192M",
>        "-nographic",
>        "-vga", "none",
> @@ -215,6 +215,16 @@ static char *const qemu_envp[] = {
>        NULL
> };
> 
> +static void check_virtualization(void)
> +{
> +       uint32_t ecx;
> +
> +       __asm__ __volatile__("cpuid" : "=c" (ecx) : "a" (1) : "memory");
> +
> +       if (!!(ecx & (1 << 5)))
> +               printf("Found support for Virtual Machine eXtensions\n");
> +}
> +

just make this check IA specific so that on ARM architectures it compiles to nothing.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux