From: Nick Desaulniers <ndesaulniers@google.com>
To: Elliot Berman <quic_eberman@quicinc.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nathan Chancellor <nathan@kernel.org>,
Matthias Maennich <maennich@google.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Fangrui Song <maskray@google.com>
Subject: Re: [PATCH v2] kbuild: Add environment variables for userprogs flags
Date: Fri, 28 Jan 2022 14:49:15 -0800 [thread overview]
Message-ID: <CAKwvOd=Ab+GWNzSC6eaDWTVDF6gJQ9fDDMT3hep-DzhrEA6DpQ@mail.gmail.com> (raw)
In-Reply-To: <20220128224528.f7ejzw55t6kfefmm@google.com>
On Fri, Jan 28, 2022 at 2:45 PM Fangrui Song <maskray@google.com> wrote:
>
> On 2022-01-28, Elliot Berman wrote:
> >Allow additional arguments be passed to userprogs compilation.
> >Reproducible clang builds need to provide a sysroot and gcc path to
> >ensure same toolchain is used across hosts. KCFLAGS is not currently
> >used for any user programs compilation, so add new USERCFLAGS and
> >USERLDFLAGS which serves similar purpose as HOSTCFLAGS/HOSTLDFLAGS.
> >
> >Specifically, I'm trying to force CC_CAN_LINK to consistently fail in
> >an environment where a user sysroot is not specifically available.
> >Currently, Clang might automatically detect GCC installation on hosts
> >which have it installed to a default location in /. With addition of
> >these environment variables, you can specify flags such as:
> >
> >$ make USERCFLAGS=--sysroot=/dev/null USERLDFLAGS=-Wl,--sysroot=/dev/null
> >
> >to force sysroot detection to fail.
>
> -Wl,--sysroot=/dev/null => --sysroot
>
> As I mentioned in
> https://lore.kernel.org/all/20220128031549.w5a4bilxbkppagfu@google.com/
> -Wl,--sysroot=/dev/null does not suppress search paths like -L/lib .
In that case, Elliot, can you please test whether USERLDFLAGS is
necessary to be specified AT ALL? Maybe we can drop that addition from
this patch if so?
--
Thanks,
~Nick Desaulniers
next prev parent reply other threads:[~2022-01-28 22:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 22:43 [PATCH] kbuild: Add environment variables for userprogs flags Elliot Berman
2022-01-26 18:21 ` Nick Desaulniers
2022-01-27 11:25 ` Masahiro Yamada
2022-01-28 3:15 ` Fangrui Song
2022-01-28 19:40 ` Elliot Berman
2022-01-28 20:10 ` Fangrui Song
2022-01-28 20:06 ` Elliot Berman
2022-01-28 2:40 ` Masahiro Yamada
2022-01-28 22:08 ` [PATCH v2] " Elliot Berman
2022-01-28 22:45 ` Fangrui Song
2022-01-28 22:49 ` Nick Desaulniers [this message]
2022-01-28 23:26 ` Elliot Berman
2022-01-28 23:29 ` Nick Desaulniers
2022-01-28 22:48 ` Nick Desaulniers
2022-02-01 21:35 ` [PATCH v3] " Elliot Berman
2022-02-01 21:38 ` Nick Desaulniers
2022-02-01 22:03 ` Fāng-ruì Sòng
2022-02-08 22:53 ` Nick Desaulniers
2022-02-10 0:29 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKwvOd=Ab+GWNzSC6eaDWTVDF6gJQ9fDDMT3hep-DzhrEA6DpQ@mail.gmail.com' \
--to=ndesaulniers@google.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=maennich@google.com \
--cc=masahiroy@kernel.org \
--cc=maskray@google.com \
--cc=michal.lkml@markovi.net \
--cc=nathan@kernel.org \
--cc=quic_eberman@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).