lkml.org 
[lkml]   [2019]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/5] arm64: vdso32: Introduce COMPAT_CC_IS_GCC
On Tue, Oct 01, 2019 at 04:30:56PM +0100, Catalin Marinas wrote:
> On Tue, Oct 01, 2019 at 03:43:54PM +0100, Will Deacon wrote:
> > > >>>> On Thu, Sep 26, 2019 at 10:43:38PM +0100, Vincenzo Frascino wrote:
> > > >>>>> +config COMPATCC_IS_ARM_GCC
> > > >>>>> + def_bool $(success,$(COMPATCC) --version | head -n 1 | grep -q "arm-.*-gcc")
> [...]
> > My point was that we don't attempt to sanitise the compiler passed via
> > CROSS_COMPILE, so I don't think we should do anything special for COMPATCC
> > either.
>
> What I really want from kbuild with this patch is:
>
> 1. Not to warn me that I don't have a CROSS_COMPILE_COMPAT set
>
> 2. Not to give me a compilation error if the makefile made up a COMPATCC
> that doesn't work
>
> Since we dropped the Kconfig option for the compat gcc prefix (which I
> didn't like anyway), COMPATCC is now initialised to
> (CROSS_COMPILE_COMPAT)gcc. This means that it is valid compiler (and
> it's an aarch64 compiler on my machine). The COMPATCC_IS_ARM_GCC
> silently disables the compat vDSO for this case rather than giving me a
> build error if we don't have such checks.
>
> 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

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?

Will

\
 
 \ /
  Last update: 2019-10-01 18:48    [W:0.166 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site