Re: [PATCH v3 1/5] arm64: vdso32: Introduce COMPAT_CC_IS_GCC
From: Will Deacon
Date: Tue Oct 01 2019 - 13:08:01 EST
On Tue, Oct 01, 2019 at 09:59:43AM -0700, Nick Desaulniers wrote:
> On Tue, Oct 1, 2019 at 9:47 AM Will Deacon <will@xxxxxxxxxx> wrote:
> >
> > On Tue, Oct 01, 2019 at 04:30:56PM +0100, Catalin Marinas wrote:
> > > In the long run, I wouldn't mandate CROSS_COMPILE_COMPAT to always be
> > > set for the compat vDSO since with clang we could use the same compiler
> > > binary for both native and compat (with different flags). That's once we
> > > cleaned up the headers.
> >
> > But we'll still need it even with clang so that the relevant triple can be
> > passed to the --target option. The top-level Makefile already does this:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile#n544
>
> That's not pulling the cross compiler out of a *config* (as this patch
> is proposing); rather from an env var.
CROSS_COMPILE_COMPAT is the environment variable, right? If not, then I have
my terminology mixed up.
> > so I think we should do the same thing for the compat vdso as well, which
> > would allow us to remove this complexity by requiring that
> > CROSS_COMPILE_COMPAT identifies the cross-compiler to use in exactly the
> > same way as CROSS_COMPILE does.
> >
> > Am I missing something here?
>
> I think the second paragraph you wrote shows we're all in agreement,
> but I suspect you may be conflating *how* the toplevel Makefile knows
> we're doing a cross compile. It doesn't read a config, this patch
> would make it so a cross compiler is specified via config, Catalin
> asked "please no," I agree with Catalin (and I suspect you do too).
Yes, I'm saying let's have an environment variable only and drop the
CONFIG stuff completely. I think this means that the environment variable
must always be specified if you want the compat vDSO, but I don't see that
as a problem.
Will