diff mbox series

[2/7] meson: pass -target and -I to bindgen calls

Message ID 20250412-mesa-25-fixes-v1-2-791840391271@oss.qualcomm.com
State Under Review
Headers show
Series mesa: small improvements after 25.0 merge | expand

Commit Message

Dmitry Baryshkov April 11, 2025, 10:09 p.m. UTC
In order to properly generate Rust bindings for the target systems, we
need to pass '-taget foo-linux-gnueabi' flags and a correct include
target include path (${STAGING_INCDIR}) to the bindgen. Add those
flags to the generated meson target file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 meta/classes-recipe/meson.bbclass | 1 +
 1 file changed, 1 insertion(+)

Comments

Khem Raj April 11, 2025, 10:53 p.m. UTC | #1
On Fri, Apr 11, 2025 at 3:09 PM Dmitry Baryshkov via
lists.openembedded.org
<dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>
> In order to properly generate Rust bindings for the target systems, we
> need to pass '-taget foo-linux-gnueabi' flags and a correct include
> target include path (${STAGING_INCDIR}) to the bindgen. Add those
> flags to the generated meson target file.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
>  meta/classes-recipe/meson.bbclass | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
> index cbfc45b94bbd076735847134a0976b6b30784d50..ef45a034a767e979a45553ba08e46dc90e34f33f 100644
> --- a/meta/classes-recipe/meson.bbclass
> +++ b/meta/classes-recipe/meson.bbclass
> @@ -93,6 +93,7 @@ cpp_link_args = ${@meson_array('LDFLAGS', d)}
>  [properties]
>  needs_exe_wrapper = true
>  sys_root = '${STAGING_DIR_HOST}'
> +bindgen_clang_arguments = ['-target', '${@d.getVar('RUST_HOST_SYS')}', '-I${STAGING_INCDIR}']

I think its better to use ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
--target=${TARGET_SYS}
here

>
>  [host_machine]
>  system = '${@meson_operating_system('HOST_OS', d)}'
>
> --
> 2.39.5
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#214764): https://lists.openembedded.org/g/openembedded-core/message/214764
> Mute This Topic: https://lists.openembedded.org/mt/112219030/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Dmitry Baryshkov April 12, 2025, 3:50 p.m. UTC | #2
On 12/04/2025 01:53, Khem Raj wrote:
> On Fri, Apr 11, 2025 at 3:09 PM Dmitry Baryshkov via
> lists.openembedded.org
> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>>
>> In order to properly generate Rust bindings for the target systems, we
>> need to pass '-taget foo-linux-gnueabi' flags and a correct include
>> target include path (${STAGING_INCDIR}) to the bindgen. Add those
>> flags to the generated meson target file.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> ---
>>   meta/classes-recipe/meson.bbclass | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
>> index cbfc45b94bbd076735847134a0976b6b30784d50..ef45a034a767e979a45553ba08e46dc90e34f33f 100644
>> --- a/meta/classes-recipe/meson.bbclass
>> +++ b/meta/classes-recipe/meson.bbclass
>> @@ -93,6 +93,7 @@ cpp_link_args = ${@meson_array('LDFLAGS', d)}
>>   [properties]
>>   needs_exe_wrapper = true
>>   sys_root = '${STAGING_DIR_HOST}'
>> +bindgen_clang_arguments = ['-target', '${@d.getVar('RUST_HOST_SYS')}', '-I${STAGING_INCDIR}']
> 
> I think its better to use ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
> --target=${TARGET_SYS}

TARGET_SYS doesn't work, as it doesn't include 'hf' on ARM, etc.
For v2 I'll use ${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} 
--target=${RUST_HOST_SYS}

> here
> 
>>
>>   [host_machine]
>>   system = '${@meson_operating_system('HOST_OS', d)}'
>>
>> --
>> 2.39.5
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#214764): https://lists.openembedded.org/g/openembedded-core/message/214764
>> Mute This Topic: https://lists.openembedded.org/mt/112219030/1997914
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Dmitry Baryshkov April 12, 2025, 4:29 p.m. UTC | #3
On 12/04/2025 01:53, Khem Raj wrote:
> On Fri, Apr 11, 2025 at 3:09 PM Dmitry Baryshkov via
> lists.openembedded.org
> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>>
>> In order to properly generate Rust bindings for the target systems, we
>> need to pass '-taget foo-linux-gnueabi' flags and a correct include
>> target include path (${STAGING_INCDIR}) to the bindgen. Add those
>> flags to the generated meson target file.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> ---
>>   meta/classes-recipe/meson.bbclass | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
>> index cbfc45b94bbd076735847134a0976b6b30784d50..ef45a034a767e979a45553ba08e46dc90e34f33f 100644
>> --- a/meta/classes-recipe/meson.bbclass
>> +++ b/meta/classes-recipe/meson.bbclass
>> @@ -93,6 +93,7 @@ cpp_link_args = ${@meson_array('LDFLAGS', d)}
>>   [properties]
>>   needs_exe_wrapper = true
>>   sys_root = '${STAGING_DIR_HOST}'
>> +bindgen_clang_arguments = ['-target', '${@d.getVar('RUST_HOST_SYS')}', '-I${STAGING_INCDIR}']
> 
> I think its better to use ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
> --target=${TARGET_SYS}

Using ${TOOLCHAIN_OPTIONS} breaks x86-64 build with the compiler being 
unable to find headers. I'd rather stick to the patch I have posted.

> here
> 
>>
>>   [host_machine]
>>   system = '${@meson_operating_system('HOST_OS', d)}'
>>
>> --
>> 2.39.5
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#214764): https://lists.openembedded.org/g/openembedded-core/message/214764
>> Mute This Topic: https://lists.openembedded.org/mt/112219030/1997914
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Khem Raj April 12, 2025, 6:02 p.m. UTC | #4
On Sat, Apr 12, 2025 at 9:29 AM Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On 12/04/2025 01:53, Khem Raj wrote:
> > On Fri, Apr 11, 2025 at 3:09 PM Dmitry Baryshkov via
> > lists.openembedded.org
> > <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
> >>
> >> In order to properly generate Rust bindings for the target systems, we
> >> need to pass '-taget foo-linux-gnueabi' flags and a correct include
> >> target include path (${STAGING_INCDIR}) to the bindgen. Add those
> >> flags to the generated meson target file.
> >>
> >> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> >> ---
> >>   meta/classes-recipe/meson.bbclass | 1 +
> >>   1 file changed, 1 insertion(+)
> >>
> >> diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
> >> index cbfc45b94bbd076735847134a0976b6b30784d50..ef45a034a767e979a45553ba08e46dc90e34f33f 100644
> >> --- a/meta/classes-recipe/meson.bbclass
> >> +++ b/meta/classes-recipe/meson.bbclass
> >> @@ -93,6 +93,7 @@ cpp_link_args = ${@meson_array('LDFLAGS', d)}
> >>   [properties]
> >>   needs_exe_wrapper = true
> >>   sys_root = '${STAGING_DIR_HOST}'
> >> +bindgen_clang_arguments = ['-target', '${@d.getVar('RUST_HOST_SYS')}', '-I${STAGING_INCDIR}']
> >
> > I think its better to use ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
> > --target=${TARGET_SYS}
>
> Using ${TOOLCHAIN_OPTIONS} breaks x86-64 build with the compiler being
> unable to find headers. I'd rather stick to the patch I have posted.

You have to use ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} and --target=${TARGET_SYS}
together, OE's compilers do not deal with 'hf' from target tuple but
TOOLCHAIN_OPTIONS decide
the ABI, please try both of them together.
>
> > here
> >
> >>
> >>   [host_machine]
> >>   system = '${@meson_operating_system('HOST_OS', d)}'
> >>
> >> --
> >> 2.39.5
> >>
> >>
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >> Links: You receive all messages sent to this group.
> >> View/Reply Online (#214764): https://lists.openembedded.org/g/openembedded-core/message/214764
> >> Mute This Topic: https://lists.openembedded.org/mt/112219030/1997914
> >> Group Owner: openembedded-core+owner@lists.openembedded.org
> >> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >>
>
>
> --
> With best wishes
> Dmitry
Dmitry Baryshkov April 13, 2025, 11:15 a.m. UTC | #5
On 12/04/2025 21:02, Khem Raj wrote:
> On Sat, Apr 12, 2025 at 9:29 AM Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> wrote:
>>
>> On 12/04/2025 01:53, Khem Raj wrote:
>>> On Fri, Apr 11, 2025 at 3:09 PM Dmitry Baryshkov via
>>> lists.openembedded.org
>>> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>>>>
>>>> In order to properly generate Rust bindings for the target systems, we
>>>> need to pass '-taget foo-linux-gnueabi' flags and a correct include
>>>> target include path (${STAGING_INCDIR}) to the bindgen. Add those
>>>> flags to the generated meson target file.
>>>>
>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>>> ---
>>>>    meta/classes-recipe/meson.bbclass | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
>>>> index cbfc45b94bbd076735847134a0976b6b30784d50..ef45a034a767e979a45553ba08e46dc90e34f33f 100644
>; >>> --- a/meta/classes-recipe/meson.bbclass
>>>> +++ b/meta/classes-recipe/meson.bbclass
>>>> @@ -93,6 +93,7 @@ cpp_link_args = ${@meson_array('LDFLAGS', d)}
>>>>    [properties]
>>>>    needs_exe_wrapper = true
>>>>    sys_root = '${STAGING_DIR_HOST}'
>>>> +bindgen_clang_arguments = ['-target', '${@d.getVar('RUST_HOST_SYS')}', '-I${STAGING_INCDIR}']
>>>
>>> I think its better to use ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
>>> --target=${TARGET_SYS}
>>
>> Using ${TOOLCHAIN_OPTIONS} breaks x86-64 build with the compiler being
>> unable to find headers. I'd rather stick to the patch I have posted.
> 
> You have to use ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} and --target=${TARGET_SYS}
> together, OE's compilers do not deal with 'hf' from target tuple but
> TOOLCHAIN_OPTIONS decide
> the ABI, please try both of them together.

As I wrote earlier, it breaks qemuarm.

BINDGEN_CLANG_ARGS=" -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard 
-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 
--sysroot=/home/lumag/Projects/RPB/build-rpb/tmp-rpb/work/armv7at2hf-neon-linaro-linux-gnueabi/mesa/25.0.2/recipe-sysroot 
--target=arm-linaro-linux-gnueabi"

/../lib/gcc-cross/arm-linux-gnueabi/12/../../../../include/c++/12/cassert:43:10: 
fatal error: 'bits/c++config.h' file not found
Unable to generate bindings: clang diagnosed error: 
/../lib/gcc-cross/arm-linux-gnueabi/12/../../../../include/c++/12/cassert:43:10: 
fatal error: 'bits/c++config.h' file


/home/lumag/Projects/RPB/build-rpb/tmp-rpb/work/armv7at2hf-neon-linaro-linux-gnueabi/mesa/25.0.2/recipe-sysroot-native/usr/bin/bindgen 
../mesa-25.0.2/src/gallium/frontends/rusticl/rusticl_llvm_bindings.hpp 
--output 
/home/lumag/Projects/RPB/build-rpb/tmp-rpb/work/armv7at2hf-neon-linaro-linux-gnueabi/mesa/25.0.2/build/src/gallium/frontends/rusticl/rusticl_llvm_bindings.rs 
--generate constructors,functions,types --opaque-type '.*' 
--allowlist-function clang::getClangFullVersion --allowlist-function 
llvm::LLVMContext::LLVMContext --allowlist-function llvm::writeSpirv 
--rust-target 1.85.1 -- -fno-builtin-malloc -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
'-DPACKAGE_VERSION="25.0.2"' 
'-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' 
-DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 
-DHAVE_SOFTPIPE -DHAVE_ZINK -DHAVE_R300 -DHAVE_NOUVEAU -DHAVE_LLVMPIPE 
-DHAVE_VIRGL -DHAVE_SWRAST -DVIDEO_CODEC_VC1DEC=0 
-DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 
-DVIDEO_CODEC_H265ENC=0 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 
-DVIDEO_CODEC_VP9DEC=1 -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM 
-DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=0 
-DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM 
-DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 
-DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 
-DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ 
-DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL 
-DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL 
-DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P 
-DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN 
-DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE 
-DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT 
-DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT 
-DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL 
-DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN 
-DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_VISIBILITY 
-DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE 
-DUSE_GCC_ATOMIC_BUILTINS -DUSE_ARM_ASM -DMAJOR_IN_SYSMACROS 
-DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H 
-DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_SYS_INOTIFY_H 
-DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE 
-DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM 
-DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_GNU_QSORT_R 
-DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING 
-DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR 
-DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION 
-DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM 
'-DMESA_LLVM_VERSION_STRING="20.1.2"' -DLLVM_IS_SHARED=1 
-DLLVM_AVAILABLE=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 
-DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF 
-DTHREAD_SANITIZER=0 -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 
-DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -march=armv7-a -mthumb 
-mfpu=neon -mfloat-abi=hard -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 
--sysroot=/home/lumag/Projects/RPB/build-rpb/tmp-rpb/work/armv7at2hf-neon-linaro-linux-gnueabi/mesa/25.0.2/recipe-sysroot 
--target=arm-linaro-linux-gnueabi -DNDEBUG -pthread 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
'-DPACKAGE_VERSION="25.0.2"' 
'-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' 
-DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 
-DHAVE_SOFTPIPE -DHAVE_ZINK -DHAVE_R300 -DHAVE_NOUVEAU -DHAVE_LLVMPIPE 
-DHAVE_VIRGL -DHAVE_SWRAST -DVIDEO_CODEC_VC1DEC=0 
-DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 
-DVIDEO_CODEC_H265ENC=0 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 
-DVIDEO_CODEC_VP9DEC=1 -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM 
-DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=0 
-DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM 
-DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 
-DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 
-DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ 
-DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL 
-DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL 
-DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P 
-DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN 
-DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE 
-DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT 
-DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT 
-DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL 
-DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN 
-DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_VISIBILITY 
-DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE 
-DUSE_GCC_ATOMIC_BUILTINS -DUSE_ARM_ASM -DMAJOR_IN_SYSMACROS 
-DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H 
-DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_SYS_INOTIFY_H 
-DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE 
-DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM 
-DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_GNU_QSORT_R 
-DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING 
-DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR 
-DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION 
-DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM 
'-DMESA_LLVM_VERSION_STRING="20.1.2"' -DLLVM_IS_SHARED=1 
-DLLVM_AVAILABLE=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 
-DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF 
-DTHREAD_SANITIZER=0 -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 
-DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -x c++ -std=c++17 -MD -MQ 
../mesa-25.0.2/src/gallium/frontends/rusticl/rusticl_llvm_bindings.hpp 
-MF src/gallium/frontends/rusticl/rusticl_llvm_bindings.hpp.d
/../lib/gcc-cross/arm-linux-gnueabi/12/../../../../include/c++/12/cassert:43:10: 
fatal error: 'bits/c++config.h' file not found
Unable to generate bindings: clang diagnosed error: 
/../lib/gcc-cross/arm-linux-gnueabi/12/../../../../include/c++/12/cassert:43:10: 
fatal error: 'bits/c++config.h' file not found



>>
>>> here
>>>
>>>>
>>>>    [host_machine]
>>>>    system = '${@meson_operating_system('HOST_OS', d)}'
>>>>
>>>> --
>>>> 2.39.5
>>>>
>>>>
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>> Links: You receive all messages sent to this group.
>>>> View/Reply Online (#214764): https://lists.openembedded.org/g/openembedded-core/message/214764
>>>> Mute This Topic: https://lists.openembedded.org/mt/112219030/1997914
>>>> Group Owner: openembedded-core+owner@lists.openembedded.org
>>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>>
>>
>>
>> --
>> With best wishes
>> Dmitry
diff mbox series

Patch

diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
index cbfc45b94bbd076735847134a0976b6b30784d50..ef45a034a767e979a45553ba08e46dc90e34f33f 100644
--- a/meta/classes-recipe/meson.bbclass
+++ b/meta/classes-recipe/meson.bbclass
@@ -93,6 +93,7 @@  cpp_link_args = ${@meson_array('LDFLAGS', d)}
 [properties]
 needs_exe_wrapper = true
 sys_root = '${STAGING_DIR_HOST}'
+bindgen_clang_arguments = ['-target', '${@d.getVar('RUST_HOST_SYS')}', '-I${STAGING_INCDIR}']
 
 [host_machine]
 system = '${@meson_operating_system('HOST_OS', d)}'