diff mbox series

llvm: multilib-header fix for llvm-config.h

Message ID 20250422064651.824-1-liuyd.fnst@fujitsu.com
State New
Headers show
Series llvm: multilib-header fix for llvm-config.h | expand

Commit Message

Liu Yiding April 22, 2025, 6:46 a.m. UTC
fix the issue that:
| file /usr/include/llvm/Config/llvm-config.h conflicts between attempted installs of lib32-llvm-dev-20.1.2-r0.core2_32 and llvm-dev-20.1.2-r0.core2_64

reproduce steps:
1. Add in local.conf the following lines:

  MACHINE ?= "qemux86-64"

  require conf/multilib.conf

  MULTILIBS ?= "multilib:lib32"

  DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32"

2. add lib32-llvm-dev llvm-dev to core-image-minimal.bb

  IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL} lib32-llvm-dev llvm-dev"

3. $ bitbake core-image-minimal

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
---
 meta/recipes-devtools/llvm/llvm_20.1.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Khem Raj April 28, 2025, 4:15 p.m. UTC | #1
Hi Yiding,

Can you show the diff between the two llvm-config.h files please ?
This can be problematic if we compile 32bit binaries which uses this
file. So it will be
good to try to build a 32bit binary using this headers on target.

On Mon, Apr 21, 2025 at 11:47 PM Liu Yiding <liuyd.fnst@fujitsu.com> wrote:
>
> fix the issue that:
> | file /usr/include/llvm/Config/llvm-config.h conflicts between attempted installs of lib32-llvm-dev-20.1.2-r0.core2_32 and llvm-dev-20.1.2-r0.core2_64
>
> reproduce steps:
> 1. Add in local.conf the following lines:
>
>   MACHINE ?= "qemux86-64"
>
>   require conf/multilib.conf
>
>   MULTILIBS ?= "multilib:lib32"
>
>   DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32"
>
> 2. add lib32-llvm-dev llvm-dev to core-image-minimal.bb
>
>   IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL} lib32-llvm-dev llvm-dev"
>
> 3. $ bitbake core-image-minimal
>
> Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
> ---
>  meta/recipes-devtools/llvm/llvm_20.1.2.bb | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/llvm/llvm_20.1.2.bb b/meta/recipes-devtools/llvm/llvm_20.1.2.bb
> index 98855fa4c1..5e2c0e0300 100644
> --- a/meta/recipes-devtools/llvm/llvm_20.1.2.bb
> +++ b/meta/recipes-devtools/llvm/llvm_20.1.2.bb
> @@ -12,7 +12,7 @@ DEPENDS = "libffi libxml2 zlib zstd libedit ninja-native llvm-native"
>
>  RDEPENDS:${PN}:append:class-target = " ncurses-terminfo"
>
> -inherit cmake pkgconfig
> +inherit cmake pkgconfig multilib_header
>  # could be 'rcX' or 'git' or empty ( for release )
>  VER_SUFFIX = ""
>
> @@ -155,6 +155,8 @@ do_install() {
>      # Try to clean up datadir if it is empty, but don't fail if there are
>      # libclc files there
>      rmdir ${D}${datadir} || true
> +
> +    oe_multilib_header llvm/Config/llvm-config.h
>  }
>
>  do_install:append:class-native() {
> --
> 2.43.0
>
diff mbox series

Patch

diff --git a/meta/recipes-devtools/llvm/llvm_20.1.2.bb b/meta/recipes-devtools/llvm/llvm_20.1.2.bb
index 98855fa4c1..5e2c0e0300 100644
--- a/meta/recipes-devtools/llvm/llvm_20.1.2.bb
+++ b/meta/recipes-devtools/llvm/llvm_20.1.2.bb
@@ -12,7 +12,7 @@  DEPENDS = "libffi libxml2 zlib zstd libedit ninja-native llvm-native"
 
 RDEPENDS:${PN}:append:class-target = " ncurses-terminfo"
 
-inherit cmake pkgconfig
+inherit cmake pkgconfig multilib_header
 # could be 'rcX' or 'git' or empty ( for release )
 VER_SUFFIX = ""
 
@@ -155,6 +155,8 @@  do_install() {
     # Try to clean up datadir if it is empty, but don't fail if there are
     # libclc files there
     rmdir ${D}${datadir} || true
+
+    oe_multilib_header llvm/Config/llvm-config.h
 }
 
 do_install:append:class-native() {