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: <CAKwvOdnAbU8gpPAba9g1ptZxSdOOTe7edT1OV_n1f=zAwp9y_g@mail.gmail.com>
Date:   Thu, 10 Mar 2022 12:59:26 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Sedat Dilek <sedat.dilek@...il.com>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Ian Rogers <irogers@...gle.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Fangrui Song <maskray@...gle.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Michael Petlan <mpetlan@...hat.com>,
        Leo Yan <leo.yan@...aro.org>, John Keeping <john@...anate.com>,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        Jiri Olsa <olsajiri@...il.com>,
        Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Subject: Re: [PATCH] tools: feature/test-libperl.c: Sync PERL_EMBED_CCOPTS
 with perf

On Wed, Mar 9, 2022 at 10:19 PM Sedat Dilek <sedat.dilek@...il.com> wrote:
>
> When trying to build perf with a LLVM/Clang toolchain people see errors
> when testing for libperl feature.
>
> Jiri reports:
>
> > I'm getting some other lto related error:
> >
> >         $ cat test-libperl.make.output
> >         clang-13: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
> >
>
> The reason is PERL_EMBED_CCOPTS is defined in two places:
>
> tools/build/feature/Makefile
> tools/perf/Makefile.config
>
> As an result FLAGS_PERL_EMBED is set differently.

s/an/a/

>
> For building perf '-ffat-lto-objects' is filtered-out:
>
> $ git grep ffat-lto-objects tools/perf/
> tools/perf/Makefile.config:  PERL_EMBED_CCOPTS := $(filter-out -flto=auto -ffat-lto-objects, $(PERL_EMBED_CCOPTS))
>
> Sync PERL_EMBED_CCOPTS in tools/build/feature/Makefile to fix this.
>
> For a minimal fix for Linux v5.17 this here was preferred by Arnaldo.
>
> Link: https://marc.info/?t=164646683300002&r=1&w=2

Hey Sedat, we prefer lore links now to external mirrors!

Link: https://lore.kernel.org/lkml/CA+icZUWHd4VTKNwBtuxt9-fHoiYV+Q7tQ809Cn83k8sbQ_uNHw@mail.gmail.com/

> Reported-by: Jiri Olsa <olsajiri@...il.com>
> Reported-by: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
> Tested-by: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
> Suggested-by: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
> Signed-off-by: Sedat Dilek <sedat.dilek@...il.com>

Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

> ---
>  tools/build/feature/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index 1480910c792e..869073cf8449 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -218,6 +218,7 @@ PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
>  PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
>  PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
>  PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
> +PERL_EMBED_CCOPTS := $(filter-out -ffat-lto-objects, $(PERL_EMBED_CCOPTS))
>  FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
>
>  $(OUTPUT)test-libperl.bin:
> --
> 2.35.1
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ