Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: Romain Naour <romain.naour@gmail.com>,
	"Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: "José Luis Salvador Rufo" <salvador.joseluis@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCHv2] package/zfs: Fix cross-platform-compilations
Date: Sat, 28 Aug 2021 13:27:48 +0200	[thread overview]
Message-ID: <1433accf-3050-0f2e-9701-3da87c8c7c12@mind.be> (raw)
In-Reply-To: <75eb3db4-01a4-a335-f997-6ef81456682d@gmail.com>



On 27/08/2021 23:27, Romain Naour wrote:
> Hello Yann,
> 
> Le 27/08/2021 à 22:48, Yann E. MORIN a écrit :
>> Romain, José, All,
>>
>> On 2021-08-27 11:17 +0200, Romain Naour spake thusly:
>>> From: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
>>>
>>> This patch fixes the `make` executed from the `kernel.m4` in
>>> cross-platform-compilations environments:
>>> https://github.com/openzfs/zfs/blob/zfs-2.0.5/config/kernel.m4#L588
>>>
>>> Fixes:
>>> https://gitlab.com/kubu93/buildroot/-/jobs/1522848483
>>>
>>> Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
>>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>>> ---
>>> v2: add a patch to remove DESTDIR used with INSTALL_MOD_PATH
>>>     Use LINUX_MAKE_FLAGS for ZFS_MAKE_ENV and ZFS_CONF_ENV
>>>     http://lists.busybox.net/pipermail/buildroot/2021-August/621350.html
>> I've only had a cursory look at the previous discussion, sorry...
>>
>> However, I believe this is incorrect to pass $(LINUX_MAKE_FLAGS) in the
>> environment for configure and make.
>>
>> Indeed, $(LINUX_MAKE_FLAGS) should really only be used when actually
>> building kernel modules, not userland stuff, because it contains
>> variables that are not valid otherwise.
>>
>> For example, it overrides HOSTCC with a value that is not correct
>> outside of bulding the kernel. It also conditionally contains the
>> unscoped variable LOADADDR, which name is too generic.
>>
>> Also, I don't understand why we need these at configure time, because we
>> are using the kernel-module infra to build the kernel module... And
>> basically, the two are mostly mutually exclusive...
> The configure script is trying to build a kernel module to check if its able to
> build zfs modules. Without LINUX_MAKE_FLAGS, it try to build the module for the
> host machine that fail to build with old compiler/distribution.
> 
> I haven't looked deeply to the buildsystem...

 I took a quick look. I think you can set KERNEL_MAKE in the environment
(ZFS_CONF_ENV) and use the linux flags there:

ZFS_CONF_ENV += KERNEL_MAKE="$(LINUX_MAKE_FLAGS)"

 When doing that, the linux flags shouldn't be passed to make at all any more
either.

 Untested, obviously :-)

 Regards,
 Arnout

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

      reply	other threads:[~2021-08-28 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  9:17 [Buildroot] [PATCHv2] package/zfs: Fix cross-platform-compilations Romain Naour
2021-08-27 20:48 ` Yann E. MORIN
2021-08-27 21:27   ` Romain Naour
2021-08-28 11:27     ` Arnout Vandecappelle [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=1433accf-3050-0f2e-9701-3da87c8c7c12@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@gmail.com \
    --cc=salvador.joseluis@gmail.com \
    --cc=yann.morin.1998@free.fr \
    /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