• Mark Brown's avatar
    selftests/mm: fix cross compilation with LLVM · 0518dbe9
    Mark Brown authored
    Currently the MM selftests attempt to work out the target architecture by
    using CROSS_COMPILE or otherwise querying the host machine, storing the
    target architecture in a variable called MACHINE rather than the usual
    ARCH though as far as I can tell (including for x86_64) the value is the
    same as we would use for architecture.
    
    When cross compiling with LLVM we don't need a CROSS_COMPILE as LLVM can
    support many target architectures in a single build so this logic does not
    work, CROSS_COMPILE is not set and we end up selecting tests for the host
    rather than target architecture.  Fix this by using the more standard ARCH
    to describe the architecture, taking it from the environment if specified.
    
    Link: https://lkml.kernel.org/r/20230614-kselftest-mm-llvm-v1-1-180523f277d3@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Cc: Albert Ou <aou@eecs.berkeley.edu>
    Cc: Nathan Chancellor <nathan@kernel.org>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Cc: Palmer Dabbelt <palmer@dabbelt.com>
    Cc: Paul Walmsley <paul.walmsley@sifive.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Cc: Tom Rix <trix@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    0518dbe9
Makefile 5.52 KB