Skip to contentSkip to conversation

meson: setup-uapi: Take Debian multiarch into account

PATCH Applied Jan Kiszka 2 participants 2 messages Jan 2, 2024 Arm/Amlogic Meson SoC support

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH v2 1/1 meson: setup-uapi: Take Debian multiarch into account

From: Jan Kiszka <[email protected]>

Check also the Debian multiarch include path for the chosen architecture so that we can support (self-built) linux-libc-dev packages that contain the evl headers.

---

Changes in v2:
- fix typo in DEB_HOST_ARCH spotted by Clara

 meson/setup-uapi.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
meson/setup-uapi.sh +11 -1
index f2d0774..633c5ed 100644
@@ -17,7 +17,17 @@ if test -r $UAPI/Kbuild; then
     link_dir $UAPI/arch/$ARCH/include/uapi/asm/evl asm
     link_dir $UAPI/include/uapi/asm-generic .
 else
+    DEB_HOST_ARCH=$ARCH
+    if [ "$DEB_HOST_ARCH" = "x86" ]; then
+        DEB_HOST_ARCH=amd64
+    fi
+    DEB_HOST_MULTIARCH=$( \
+        dpkg-architecture -q DEB_HOST_MULTIARCH -a $DEB_HOST_ARCH 2>/dev/null)
     link_dir $UAPI/evl .
-    link_dir $UAPI/asm/evl asm
+    if [ -d $UAPI/$DEB_HOST_MULTIARCH/asm/evl ]; then
+        link_dir $UAPI/$DEB_HOST_MULTIARCH/asm/evl asm
+    else
+        link_dir $UAPI/asm/evl asm
+    fi
     link_dir $UAPI/asm-generic .
 fi
Signature · 1 line
2.35.3
#1 lore raw
Quoted 28 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Check also the Debian multiarch include path for the chosen architecture so that we can support (self-built) linux-libc-dev packages that contain the evl headers.

---

Changes in v2:
- fix typo in DEB_HOST_ARCH spotted by Clara

 meson/setup-uapi.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
meson/setup-uapi.sh +5 -0
index f2d0774..633c5ed 100644
@@ -17,7 +17,17 @@ if test -r $UAPI/Kbuild; then
     link_dir $UAPI/arch/$ARCH/include/uapi/asm/evl asm
     link_dir $UAPI/include/uapi/asm-generic .
 else
+    DEB_HOST_ARCH=$ARCH
+    if [ "$DEB_HOST_ARCH" = "x86" ]; then
+        DEB_HOST_ARCH=amd64
+    fi
+    DEB_HOST_MULTIARCH=$( \

meson/setup-uapi.sh if test -r $UAPI/Kbuild; then · line 33

Quoted 10 lines
meson/setup-uapi.sh +6 -1
+        dpkg-architecture -q DEB_HOST_MULTIARCH -a $DEB_HOST_ARCH 2>/dev/null)
     link_dir $UAPI/evl .
-    link_dir $UAPI/asm/evl asm
+    if [ -d $UAPI/$DEB_HOST_MULTIARCH/asm/evl ]; then
+        link_dir $UAPI/$DEB_HOST_MULTIARCH/asm/evl asm
+    else
+        link_dir $UAPI/asm/evl asm
+    fi
     link_dir $UAPI/asm-generic .
 fi

Merged, thanks.

Signature · 1 line
Philippe.