[yocto] error: impossible constraint in 'asm'

philippe gislard philippe.gislard at gmail.com
Thu Feb 1 01:09:41 PST 2018


2018-02-01 9:32 GMT+01:00 dhkoo <dhkoo at m2i.co.kr>:
> Hi.
>
>
>
> Recently, I'm work on mplayer that media player for my custom system.
>
> My Kernel version is 3.8, and mplayer version is 1.3.0.
>
>
>
> And when I perform bitbake, there's error on do_compile process. The
> messages says like below.
>
> [...]
>
> | arm-poky-linux-gnueabi-gcc  -march=armv7-a -marm -mfpu=vfp
> -mfloat-abi=hard
> --sysroot=/home/ku/yocto/build/tmp/work/armv7ahf-vfp-poky-linux-gnueabi/mplayer/1.3.0-r0/recipe-sysroot
> -MMD -MP -Wundef  -Wstrict-prototypes -Wmissing-prototypes
> -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement
> -std=gnu99  -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE
> -I. -Iffmpeg  -fexpensive-optimizations -fomit-frame-pointer
> -frename-registers -O4 -ffast-math -fno-tree-vectorize
> -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE64_SOURCE -mcpu=cortex-a9 -mfpu=neon   -D_REENTRANT -DZLIB_CONST
> -c -o m_config.o m_config.c
>
> | m_config.c: In function 'm_config_add_option':
>
> | m_config.c:326:14: warning: assignment discards 'const' qualifier from
> pointer target type [-Wdiscarded-qualifiers]
>
> |      co->name = arg->name;
>
> |               ^
>
> | cpudetect.c: In function 'do_cpuid':
>
> | cpudetect.c:258:5: error: impossible constraint in 'asm'
>
> |      __asm__ volatile
>
> |      ^~~~~~~
>
> [...]
>

Hi dhkoo,

I'm not sure, but the cpudetect.c file from the official website
should be preprocessed so that all it's content is not compile when
using ARCH_ARM.
All the code from the file is included in a
#if ARCH_X86
preprocessor statement

Regarding the line 258:
It's using embedded assembly code which I understand is specific for
the X86 architecture.

Hope this helps.


-- 
Philippe GISLARD



More information about the yocto mailing list