Hi,

On Tue, Oct 17, 2023 at 11:35:13AM +0000, Dave Hitchman wrote:
<snip>
> |     /usr/bin/g++   -O2 -pipe -g -feliminate-unused-debug-types 
> -fmacro-prefix-map=/home/dave/Documents/Kymati/yocto/build/tmp/work/cortexa53-crypto-phytec-linux/libkymati/1.0-r0=/usr/src/debug/libkymati/1.0-r0
>                       
> -fdebug-prefix-map=/home/dave/Documents/Kymati/yocto/build/tmp/work/cortexa53-crypto-phytec-linux/libkymati/1.0-r0=/usr/src/debug/libkymati/1.0-r0
>                       
> -fdebug-prefix-map=/home/dave/Documents/Kymati/yocto/build/tmp/work/cortexa53-crypto-phytec-linux/libkymati/1.0-r0/recipe-sysroot=
>                       
> -fdebug-prefix-map=/home/dave/Documents/Kymati/yocto/build/tmp/work/cortexa53-crypto-phytec-linux/libkymati/1.0-r0/recipe-sysroot-native=
>   -fvisibility-inlines-hidden  -mcpu=cortex-a53 -march=armv8-a+crc+crypto 
> -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security 
> -Werror=format-security  
> --sysroot=/home/dave/Documents/Kymati/yocto/build/tmp/work/cortexa53-crypto-phytec-linux/libkymati/1.0-r0/recipe-sysroot
>  -o CMakeFiles/cmTC_e06e9.dir/testCXXCompiler.cxx.o -c testCXXCompiler.cxx
> |     g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
> |     cc1plus: error: bad value (‘armv8-a+crc+crypto’) for ‘-march=’ switch
> |     cc1plus: note: valid arguments to ‘-march=’ switch are: nocona core2 
> nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell 
> core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client 
> icelake-server cascadelake tigerlake bonnell atom silvermont slm goldmont 
> goldmont-plus tremont knl knm x86-64 eden-x2 nano nano-1000 nano-2000 
> nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 
> athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 
> znver2 btver1 btver2 native

For example here the "/usr/bin/g++" compiler will not understand 
-mcpu=cortex-a53 flags
since the compiler is on the Linux build machine and compiling natively for 
x86_64 target
architecture, this is not the yocto/bitbake cross compiler. The correct 
compiler binary
is set via CMAKE_CXX_COMPILER variable in the toolchain file and path to it is 
somewhere
in the recipe specific native sysroot path. CMake build scripts of libkymati 
must use those
variables from the toolchain file. They must not overwrite them with their own 
guesses
like /usr/bin/g++.

Further details depends on what kind of CMake build scripts libkymati has.

Cheers,

-Mikko
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61373): https://lists.yoctoproject.org/g/yocto/message/61373
Mute This Topic: https://lists.yoctoproject.org/mt/101998042/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to