xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Clara Kowalsky <clara.kowalsky@siemens.com>
To: xenomai@lists.linux.dev, rpm@xenomai.org
Cc: jan.kiszka@siemens.com, Clara Kowalsky <clara.kowalsky@siemens.com>
Subject: [libevl][PATCH v1] build: Add debian multiarch support
Date: Fri, 15 Dec 2023 12:42:52 +0100	[thread overview]
Message-ID: <20231215114252.2913765-1-clara.kowalsky@siemens.com> (raw)

In view of introducing the possibility to generate evl images with
xenomai-images, multiarch support for Debian is added to libevl.

The multi-arch variable can be specified in xenomai-images in the 
debian rules file, e.g.:

override_dh_auto_configure:
        dh_auto_configure -- \
                -Ddeb_host_multiarch=$(shell dpkg-architecture -q \
                DEB_HOST_MULTIARCH)

Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
---
 include/meson.build | 2 ++
 meson/setup-uapi.sh | 3 ++-
 meson_options.txt   | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/meson.build b/include/meson.build
index c7c4860..0019ae5 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -1,10 +1,12 @@
 # SPDX-License-Identifier: MIT
 
 uapi_opt = get_option('uapi')
+deb_host_multiarch_opt = get_option('deb_host_multiarch')
 o_dir = meson.current_build_dir()
 uapi_env = environment()
 uapi_env.set('ARCH', libevl_arch)
 uapi_env.set('UAPI', uapi_opt)
+uapi_env.set('DEB_HOST_MULTIARCH', deb_host_multiarch_opt)
 uapi_env.set('OUTPUT_DIR', o_dir)
 run_command(libevl_scripts / 'setup-uapi.sh',
     check : true,
diff --git a/meson/setup-uapi.sh b/meson/setup-uapi.sh
index f2d0774..fe37469 100644
--- a/meson/setup-uapi.sh
+++ b/meson/setup-uapi.sh
@@ -2,6 +2,7 @@
 
 # Expand anything in the UAPI path meson did not (e.g. ~).
 UAPI=$(eval echo $UAPI)
+DEB_HOST_MULTIARCH=$(eval echo $DEB_HOST_MULTIARCH)
 
 link_dir() {
     if test \! -d $1; then
@@ -18,6 +19,6 @@ if test -r $UAPI/Kbuild; then
     link_dir $UAPI/include/uapi/asm-generic .
 else
     link_dir $UAPI/evl .
-    link_dir $UAPI/asm/evl asm
+    link_dir $UAPI/$DEB_HOST_MULTIARCH/asm/evl asm
     link_dir $UAPI/asm-generic .
 fi
diff --git a/meson_options.txt b/meson_options.txt
index b4d43eb..4075a31 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1 +1,2 @@
 option('uapi', type : 'string', value : '/usr/include', description : 'path to kernel UAPI headers')
+option('deb_host_multiarch', type : 'string', value : '', description : 'Debian multiarch path')
-- 
2.39.2


             reply	other threads:[~2023-12-15 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 11:42 Clara Kowalsky [this message]
2023-12-15 14:01 ` [libevl][PATCH v1] build: Add debian multiarch support Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231215114252.2913765-1-clara.kowalsky@siemens.com \
    --to=clara.kowalsky@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=rpm@xenomai.org \
    --cc=xenomai@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).