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: <CAK7LNATbbHosb7uB53HPo3BpdFH_g5YAKkn1ouL=ymHb5nkEXw@mail.gmail.com>
Date:   Sat, 31 Jul 2021 00:15:22 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Miguel Ojeda <ojeda@...nel.org>,
        Fangrui Song <maskray@...gle.com>,
        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 v3 2/2] Makefile: infer CROSS_COMPILE from SRCARCH for
 CC=clang LLVM_IAS=1

On Fri, Jul 30, 2021 at 9:19 AM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> On Thu, Jul 29, 2021 at 2:00 PM Nathan Chancellor <nathan@...nel.org> wrote:
> >
> > While I understand that the LLVM=1 LLVM_IAS=1 case works perfectly fine
> > with this series, I am of the belief that making it work for CC=clang
> > LLVM_IAS=1 is a mistake because there is no way for that configuration
> > to work for cross compiling without CROSS_COMPILE.
>
> So with v3 of this change, rather than:
>
> $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang -j72
>
> If you wanted to omit CROSS_COMPILE, you'd need:
>
> $ ARCH=arm64 make CC=clang LLVM_IAS=1 LD=ld.lld OBJCOPY=llvm-objcopy
> STRIP=llvm-strip
>
> or
>
> $ ARCH=arm64 make CC=clang LLVM_IAS=1 LD=aarch64-linux-gnu-ld
> OBJCOPY=aarch64-linux-gnu-objcopy STRIP=aarch64-linux-gnu-strip

or

  $ ARCH=arm64 make LLVM=1 LLVM_IAS=1

still works.




> That's straight up worse IMO and defeats the purpose of "shortening
> the command line," which should be the goal.  Not "making CC=clang
> maximally flexible."  We don't want folks generally using CC=clang;
> preferably they'd use LLVM=1.  I need to rewrite our docs to make that
> more explicit and straightforward.  And if folks would prefer to use
> CC=clang for whatever reason, let them explicitly state CROSS_COMPILE
> then.
>
> So I agree with Nathan, and hope Masahiro will reconsider that perhaps
> the v2 variant that required LLVM=1 maybe makes more sense.


We can always infer the target triple from ARCH unless CROSS_COMPILE is given.

Doing this all the time makes nothing wrong.

"Whether CROSS_COMPILE is unneeded" is a different thing.



> Either way, I need to fix the comment in the new script, commit
> message, and docs, so v4 is necessary.
>
> I'm tempted to add a rewrite of our docs to say "just use LLVM=1"
> front and center, then get into finer grain details below, moving this
> second patch to be the third in a series.  Let's see what Masahiro's
> thoughts are though first. (I do appreciate them, even when I
> disagree).


I am not sure about that.

LLVM=1 is a very strong all-or-nothing flag,
but technically there is no reason to force it.

(At least, target-tools and host-tools look
independent to each other to me)


When you send v4, one more request:
Please drop LLVM_IAS=1 check as well.


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ