lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y35i9osc.fsf@concordia.ellerman.id.au>
Date:   Thu, 14 Mar 2019 13:24:03 +1100
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Mathieu Malaterre <malat@...ian.org>
Cc:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        Paul Mackerras <paulus@...ba.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

Mathieu Malaterre <malat@...ian.org> writes:
> On Sat, Feb 16, 2019 at 3:26 AM Masahiro Yamada
> <yamada.masahiro@...ionext.com> wrote:
>>
>> On Sat, Feb 16, 2019 at 1:11 AM Mathieu Malaterre <malat@...ian.org> wrote:
>> >
>> > On Fri, Feb 15, 2019 at 10:41 AM Masahiro Yamada
>> > <yamada.masahiro@...ionext.com> wrote:
>> > >
>> > > I often test all Kconfig commands for all architectures. To ease my
>> > > workflow, I want 'make defconfig' at least working without any cross
>> > > compiler.
>> > >
>> > > Currently, arch/powerpc/Makefile checks CROSS_COMPILE to decide the
>> > > default defconfig source.
>> > >
>> > > If CROSS_COMPILE is unset, it is likely to be the native build, so
>> > > 'uname -m' is useful to choose the defconfig. If CROSS_COMPILE is set,
>> > > the user is cross-building (i.e. 'uname -m' is probably x86_64), so
>> > > it falls back to ppc64_defconfig. Yup, make sense.
>> > >
>> > > However, I want to run 'make ARCH=* defconfig' without setting
>> > > CROSS_COMPILE for each architecture.
>> > >
>> > > My suggestion is to check $(origin ARCH).
>> > >
>> > > When you cross-compile the kernel, you need to set ARCH from your
>> > > environment or from the command line.
>> > >
>> > > For the native build, you do not need to set ARCH. The default in
>> > > the top Makefile is used:
>> > >
>> > >   ARCH            ?= $(SUBARCH)
>> > >
>> > > Hence, $(origin ARCH) returns 'file'.
>> > >
>> > > Before this commit, 'make ARCH=powerpc defconfig' failed:
>> >
>> > In case you have not seen it, please check:
>> >
>> > http://patchwork.ozlabs.org/patch/1037835/
>>
>> I did not know that because I do not subscribe to ppc ML.
>>
>> Michael's patch looks good to me.
>
> OK
>
>>
>> If you mimic x86, the following will work:
>>
>
> Nice! Michael do you have a preference ?

Yeah I don't like playing games with ARCH. Doing so means auto builders
and other build scripts need to learn about the special rules for ARCH,
which is a pain.

So I'll merge my patch, which I think will also work for Masahiro's
case.

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ