public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: kreijack@inwind.it, dsterba@suse.cz, Hallo32 <Hallo32@gmx.net>,
	linux-btrfs@vger.kernel.org
Subject: Re: btrfs-progs-v4.12: cross compiling
Date: Tue, 15 Aug 2017 07:39:34 +0800	[thread overview]
Message-ID: <880007a9-4882-e4a6-7411-a262e5296ab0@gmx.com> (raw)
In-Reply-To: <340e3677-4abd-5390-58bb-a64160a31862@libero.it>



On 2017年08月15日 02:57, Goffredo Baroncelli wrote:
> On 08/14/2017 05:10 PM, David Sterba wrote:
>> On Mon, Aug 14, 2017 at 10:14:42PM +0800, Qu Wenruo wrote:
> [...]
>> mktables.c is synced from kernel sources, taking updates from there is
>> easier than porting any changes to the proposed scripted implementation.
>>
>> The workflow is simple:
>> - copy kernel mktables.c changes to btrfs-progs mktables.c
> 
> How the kernel deals with this kind of problem ?
> Looking at the source of btrfs Makefile, it is more simple to replace
> 
>    mktables: kernel-lib/mktables.c
>          @echo "    [CC]     $@"
>          $(Q)$(CC) $(CFLAGS) $< -o $@
> 
> with
> 
> 
>    mktables: kernel-lib/mktables.c
>          @echo "    [HOSTCC] $@"
>          $(Q)$(HOSTCC) $(CFLAGS) $< -o $@
> 
> where HOSTCC is defined as
> 
> HOSTCC=gcc
> 
> 
> (may be the same applied also to CFLAGS <-> HOSTCFLAGS ?)

If using HOSTCC then I'm fine with it.

Thanks,
Qu

> 
>> - compile mktables
>> - run 'make kernel-lib/tables.c'
>> - commit the changes to git
>>
>> All of that happens very rarely, if ever, the raid56 tables and
>> correction algorithms are set in stone. Any extensions need to be done
>> on both sides kernel/userspace.
>>
>>>>> What about using script to generate it?
>>>>
>>>> We do have the mktables utility to generate it and I'll regenerate it
>>>> should there be a change to kernel-lib/mktables.c
>>>
>>> I mean to replace mktables.c with a script.
>>> So no cross compiler problems at all, and even easier Makefile.
>>> No dependence on "mktables" program.
>>
>> Somebody has to implement the script and verify that the output is the
>> same, eventually sync changes. The cross-compilation should be fixed
>> with the pregenerated tables.c . Is Makefile size really a concern? The
>> number of related lines is like 7. I don't see any benefit in what you
>> propose and hopefully explained my viewpoint enough so I don't have to
>> continue.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 
> 

  reply	other threads:[~2017-08-14 23:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14 12:17 btrfs-progs-v4.12: cross compiling Hallo32
2017-08-14 13:06 ` David Sterba
2017-08-14 13:17   ` Qu Wenruo
2017-08-14 14:03     ` David Sterba
2017-08-14 14:14       ` Qu Wenruo
2017-08-14 15:10         ` David Sterba
2017-08-14 18:57           ` Goffredo Baroncelli
2017-08-14 23:39             ` Qu Wenruo [this message]
2017-08-15 12:44               ` Hallo32
2017-08-15 12:48                 ` David Sterba
2017-08-15 17:28                   ` Eric Sandeen
2017-08-15 18:14                     ` Eric Sandeen
2017-08-16  0:13                     ` Qu Wenruo
2017-08-15 19:27           ` Jeff Mahoney
2017-08-14 13:10 ` Qu Wenruo

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=880007a9-4882-e4a6-7411-a262e5296ab0@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=Hallo32@gmx.net \
    --cc=dsterba@suse.cz \
    --cc=kreijack@inwind.it \
    --cc=linux-btrfs@vger.kernel.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