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: <CACPK8XdkLBT0LWpo=5UZPcfmbrry4941wTULLs8KM4B_-UWPPQ@mail.gmail.com>
Date:   Mon, 12 Nov 2018 14:52:37 +1030
From:   Joel Stanley <joel@....id.au>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Michael Ellerman <mpe@...erman.id.au>, ghackmann@...gle.com,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kbuild@...r.kernel.org, stefan@...er.ch, mka@...omium.org,
        linuxppc-dev@...ts.ozlabs.org,
        Michal Marek <michal.lkml@...kovi.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        natechancellor@...il.com
Subject: Re: [PATCH v2 2/2] kbuild: consolidate Clang compiler flags

On Mon, 12 Nov 2018 at 13:59, Masahiro Yamada
<yamada.masahiro@...ionext.com> wrote:
>
> On Mon, Nov 12, 2018 at 10:05 AM Michael Ellerman <mpe@...erman.id.au> wrote:
> >
> > Masahiro Yamada <yamada.masahiro@...ionext.com> writes:
> > > On Sat, Nov 10, 2018 at 3:35 AM Greg Hackmann <ghackmann@...gle.com> wrote:
> > >>
> > >> On 11/09/2018 10:29 AM, Nick Desaulniers wrote:
> > >> > On Mon, Nov 5, 2018 at 7:05 PM Masahiro Yamada
> > >> > <yamada.masahiro@...ionext.com> wrote:
> > >> >>
> > >> >> Collect basic Clang options such as --target, --prefix, --gcc-toolchain,
> > >> >> -no-integrated-as into a single variable CLANG_FLAGS so that it can be
> > >> >> easily reused in other parts of Makefile.
> > >> >>
> > >> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> > >> >> ---
> > >> >>
> > >> >> Changes in v2:
> > >> >>   - Use := flavor instead of = because $(CLANG_FLAGS) is expanded soon anyway
> > >> >>
> > >> >>   Makefile | 13 ++++++-------
> > >> >>   1 file changed, 6 insertions(+), 7 deletions(-)
> > >> >>
> > >> >> diff --git a/Makefile b/Makefile
> > >> >> index da11700..e173a73 100644
> > >> >> --- a/Makefile
> > >> >> +++ b/Makefile
> > >> >> @@ -487,18 +487,17 @@ endif
> > >> >>
> > >> >>   ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
> > >> >>   ifneq ($(CROSS_COMPILE),)
> > >> >> -CLANG_TARGET   := --target=$(notdir $(CROSS_COMPILE:%-=%))
> > >> >> +CLANG_FLAGS    := --target=$(notdir $(CROSS_COMPILE:%-=%))
> > >> >>   GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
> > >> >> -CLANG_PREFIX   := --prefix=$(GCC_TOOLCHAIN_DIR)
> > >> >> +CLANG_FLAGS    += --prefix=$(GCC_TOOLCHAIN_DIR)
> > >> >>   GCC_TOOLCHAIN  := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
> > >> >>   endif
> > >> >>   ifneq ($(GCC_TOOLCHAIN),)
> > >> >> -CLANG_GCC_TC   := --gcc-toolchain=$(GCC_TOOLCHAIN)
> > >> >> +CLANG_FLAGS    += --gcc-toolchain=$(GCC_TOOLCHAIN)
> > >> >>   endif
> > >> >> -KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
> > >> >> -KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
> > >> >> -KBUILD_CFLAGS += -no-integrated-as
> > >> >> -KBUILD_AFLAGS += -no-integrated-as
> > >> >> +CLANG_FLAGS    += -no-integrated-as
> > >> >> +KBUILD_CFLAGS  += $(CLANG_FLAGS)
> > >> >> +KBUILD_AFLAGS  += $(CLANG_FLAGS)
> > >> >>   endif
> > >> >>
> > >> >>   RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
> > >> >> --
> > >> >> 2.7.4
> > >> >>
> > >> >
> > >> > Thanks for this patch, Masahiro, it's a good simplification.
> > >> > Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
> > >> > Tested-by: Nick Desaulniers <ndesaulniers@...gle.com>
> > >> >
> > >> > Would you mind waiting for a tested-by from Stefan, and maybe an ack
> > >> > from Greg (added to cc)?
> > >> >
> > >>
> > >> Acked-by: Greg Hackmann <ghackmann@...gle.com>
> > >
> > >
> > > Thanks for your review!
> > >
> > >
> > > So, how to organize this series, and Joel's one together?
> > >
> > > I'd like Joel to use this series as a base for his work.
> > > (https://lore.kernel.org/patchwork/patch/1006696/)
> > >
> > > It will be much cleaner.
> > >
> > >
> > > Shall I merge all the patches to kbuild tree, or
> > > maybe will they go through powerpc tree?
> >
> > Joel's changes are fairly small so you may as well merge them along with
> > the rest of the series, if that's OK with you and Joel.
>
>
> OK, I will.
>
>
> Joel,
> If you send v2, I will merge it to kbuild tree.

Thanks, I've done that now.

Cheers,

Joel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ