xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Clara Kowalsky <clara.kowalsky@siemens.com>,
	xenomai@lists.linux.dev, rpm@xenomai.org
Subject: Re: [libevl][PATCH v1] build: Add debian multiarch support
Date: Fri, 15 Dec 2023 15:01:42 +0100	[thread overview]
Message-ID: <08b7c3b1-046c-4325-b7eb-446a3ada7386@siemens.com> (raw)
In-Reply-To: <20231215114252.2913765-1-clara.kowalsky@siemens.com>

On 15.12.23 12:42, Clara Kowalsky wrote:
> 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,

I still think we can do that without exposing an option to the users.

How about passing ARCH to setup-uapi.sh...

> 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)

...and then trying to call

dpkg-architecture -q DEB_HOST_MULTIARCH -a $ARCH 2>/dev/null

to obtain DEP_HOST_MULTIARCH automatically? If that call fails and the
string remains empty, we skip setting the link below.

Jan

>  
>  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')

-- 
Siemens AG, Technology
Linux Expert Center


      reply	other threads:[~2023-12-15 14:01 UTC|newest]

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

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=08b7c3b1-046c-4325-b7eb-446a3ada7386@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=clara.kowalsky@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).