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] [day] [month] [year] [list]
Message-ID: <CAKwvOdnUOAAkWBcwSB2+0swJdkxSja+6QBorqdqD++6q8DY7Kg@mail.gmail.com>
Date:   Mon, 2 Aug 2021 11:30:16 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Fangrui Song <maskray@...gle.com>, Miguel Ojeda <ojeda@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Arnd Bergmann <arnd@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Christoph Hellwig <hch@...radead.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v5 3/3] Documentation/llvm: update CROSS_COMPILE inferencing

On Fri, Jul 30, 2021 at 5:05 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> On Sat, Jul 31, 2021 at 8:12 AM Fangrui Song <maskray@...gle.com> wrote:
> >
> > On 2021-07-30, Nick Desaulniers wrote:
> > >+For example, to cross-compile the arm64 kernel::
> > >+
> > >+      ARCH=arm64 make LLVM=1 LLVM_IAS=1
> >
> > Is  ARCH=arm64 make LLVM=1 LLVM_IAS=1
> >
> > preferred over
> >
> >    make ARCH=arm64 LLVM=1 LLVM_IAS=1
> >
> > ?
>
>
> I do not think so.
>
> For consistency,
>
>    make ARCH=arm64 LLVM=1 LLVM_IAS=1
>
> or
>
>    ARCH=arm64 LLVM=1 LLVM_IAS=1 make
>
> might be preferred.
>
>
>
> But, in the same doc, I see an example, which
> mixes up the env variables and a make variable.
>
>      ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang

Perhaps it's just muscle memory from when I started working on Nexus
phone kernels ~5 years ago; that's how our build scripts invoked make
(with ARCH and CROSS_COMPILE as env vars).

IIRC, GNU make has the notion of `origin` for variables.
https://www.gnu.org/software/make/manual/html_node/Origin-Function.html
So "before `make`" would be "environment" and "after `make`" would be
"command line."

I'm rereading the section on assignment to see if one of the
assignment operators was affected by origin.
https://www.gnu.org/software/make/manual/html_node/Setting.html
https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors

I could have sworn that due to one of the assignment operators
(perhaps `?=`) that the orderings weren't commutative.
$ make ARCH=arm64 LLVM=1 LLVM_IAS=1 -j72
works
$ ARCH=arm64 LLVM=1 LLVM_IAS=1 make -j72
also works.  Hmm...maybe I misremembered the issue then.

Ok, I will reorder all instances to use the command line rather than
env vars in v6.
-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ