Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach via buildroot <buildroot@buildroot.org>
To: Francois Perrad <francois.perrad.86@gmail.com>
Cc: buildroot@busybox.net,  Francois Perrad <francois.perrad@gadz.org>
Subject: Re: [Buildroot] [PATCH v2 4/8] package/hare: new host package
Date: Mon, 20 Jul 2026 19:02:40 +0300	[thread overview]
Message-ID: <877bmpps2n.fsf@tarshish> (raw)
In-Reply-To: <20260720150236.243961-5-francois.perrad@gadz.org> (Francois Perrad's message of "Mon, 20 Jul 2026 17:02:31 +0200")

Hi Francois,

On Mon, Jul 20 2026, Francois Perrad wrote:
> +ifeq ($(BR2_aarch64),y)
> +HOST_HARE_CONF_OPTS += \
> +	AARCH64_AS=$(TARGET_AS) \
> +	AARCH64_CC=$(TARGET_CC) \
> +	AARCH64_LD=$(TARGET_LD)
> +endif
> +
> +ifeq ($(BR2_RISCV_64),y)
> +HOST_HARE_CONF_OPTS += \
> +	RISCV64_AS=$(TARGET_AS) \
> +	RISCV64_CC=$(TARGET_CC) \
> +	RISCV64_LD=$(TARGET_LD)
> +endif
> +
> +ifeq ($(BR2_x86_64),y)
> +HOST_HARE_CONF_OPTS += \
> +	X86_64_AS=$(TARGET_AS) \
> +	X86_64_CC=$(TARGET_CC) \
> +	X86_64_LD=$(TARGET_LD)
> +endif

I think you can reduce code duplication with something like this
(untested):

ifeq ($(BR2_aarch64),y)
HOST_HARE_TARGET_ARCH = AARCH64
else ifeq ($(BR2_RISCV_64),y)
HOST_HARE_TARGET_ARCH = RISCV64
else ifeq ($(BR2_x86_64),y)
HOST_HARE_TARGET_ARCH = X86_64
endif

HOST_HARE_CONF_OPTS += \
	$(HOST_HARE_TARGET_ARCH)_AS=$(TARGET_AS) \
	$(HOST_HARE_TARGET_ARCH)_CC=$(TARGET_CC) \
	$(HOST_HARE_TARGET_ARCH)_LD=$(TARGET_LD)

Alternatively, instead of HOST_HARE_TARGET_ARCH, you can use a blind
config symbol similar to BR2_PACKAGE_FLUENT_BIT_WASM_ARCH.

baruch

> +
> +define HOST_HARE_CONFIGURE_CMDS
> +	cp $(@D)/configs/linux.mk $(@D)/config.mk
> +endef
> +
> +define HOST_HARE_BUILD_CMDS
> +	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_HARE_CONF_OPTS) all
> +endef
> +
> +define HOST_HARE_INSTALL_CMDS
> +	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_HARE_CONF_OPTS) install
> +endef
> +
> +$(eval $(host-generic-package))

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-07-20 16:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 15:02 [Buildroot] [PATCH v2 0/8] support Hare language Francois Perrad
2026-07-20 15:02 ` [Buildroot] [PATCH v2 1/8] package/qbe: new host package Francois Perrad
2026-07-20 16:06   ` Baruch Siach via buildroot
2026-07-20 20:43     ` François PERRAD
2026-07-20 15:02 ` [Buildroot] [PATCH v2 2/8] package/scdoc: " Francois Perrad
2026-07-20 15:02 ` [Buildroot] [PATCH v2 3/8] package/harec: " Francois Perrad
2026-07-20 15:02 ` [Buildroot] [PATCH v2 4/8] package/hare: " Francois Perrad
2026-07-20 16:02   ` Baruch Siach via buildroot [this message]
2026-07-20 15:02 ` [Buildroot] [PATCH v2 5/8] package/pkg-hare.mk: new infrastructure Francois Perrad
2026-07-20 15:02 ` [Buildroot] [PATCH v2 6/8] package/hare-ev: new package Francois Perrad
2026-07-20 15:02 ` [Buildroot] [PATCH v2 7/8] package/hare-xml: " Francois Perrad
2026-07-20 15:02 ` [Buildroot] [PATCH v2 8/8] package/hare-dbus: " Francois Perrad

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=877bmpps2n.fsf@tarshish \
    --to=buildroot@buildroot.org \
    --cc=baruch@tkos.co.il \
    --cc=buildroot@busybox.net \
    --cc=francois.perrad.86@gmail.com \
    --cc=francois.perrad@gadz.org \
    /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