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: <YXqyHhWGJfDkuxjP@hirez.programming.kicks-ass.net>
Date:   Thu, 28 Oct 2021 16:22:22 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        X86 ML <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        llvm@...ts.linux.dev
Subject: Re: [PATCH] kbuild: Support clang-$ver builds

On Thu, Oct 28, 2021 at 04:15:02PM +0200, Peter Zijlstra wrote:
> On Thu, Oct 28, 2021 at 11:07:40PM +0900, Masahiro Yamada wrote:
> > On Thu, Oct 28, 2021 at 10:44 PM Peter Zijlstra <peterz@...radead.org> wrote:
> > >
> > > Hi,
> > >
> > > Debian (and derived) distros ship their compilers as -$ver suffixed
> > > binaries. For gcc it is sufficent to use:
> > >
> > >  $ make CC=gcc-12
> > >
> > > However, clang builds (esp. clang-lto) need a whole array of tools to be
> > > exactly right, leading to unweildy stuff like:
> > >
> > >  $ make CC=clang-13 LD=ld.lld=14 AR=llvm-ar-13 NM=llvm-nm-13 OBJCOPY=llvm-objcopy-13 OBJDUMP=llvm-objdump-13 READELF=llvm-readelf-13 STRIP=llvm-strip-13 LLVM=1
> > >
> > > which is, quite franktly, totally insane and unusable. Instead use the
> > > already mandatory LLVM variable to convey this, enabling one such as
> > > myself to use:
> > >
> > >  $ make LLVM=-13
> > >
> > > This also lets one quickly test different clang versions.
> > 
> > 
> > Please read the commit log of
> > a0d1c951ef08ed24f35129267e3595d86f57f5d3
> 
> That's yuck, I like LLVM=-13 or LLVM=-12 much better to select between
> compilers. Means I don't have to remember wth they live and or wreck
> PATH.

Even better, why not do something like:

if test "${CC:0:5}" == "clang"
then
	LLVM=1
	LLVM_SFX=${CC:5}
fi

Then we can simply use: make CC=clang-12 and have it all just work.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ