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: <20323e06-e2f6-4991-8b63-4471b6567932@collabora.com>
Date: Thu, 30 May 2024 10:04:43 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: John Hubbard <jhubbard@...dia.com>, Shuah Khan <shuah@...nel.org>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
 Beau Belgrave <beaub@...ux.microsoft.com>,
 Steven Rostedt <rostedt@...dmis.org>, Mark Brown <broonie@...nel.org>,
 Naresh Kamboju <naresh.kamboju@...aro.org>,
 Nick Desaulniers <ndesaulniers@...gle.com>,
 Justin Stitt <justinstitt@...gle.com>, Bill Wendling <morbo@...gle.com>,
 sunliming <sunliming@...inos.cn>, Masami Hiramatsu <mhiramat@...nel.org>,
 Valentin Obst <kernel@...entinobst.de>, linux-kselftest@...r.kernel.org,
 LKML <linux-kernel@...r.kernel.org>, llvm@...ts.linux.dev,
 Nathan Chancellor <nathan@...nel.org>, Ryan Roberts <ryan.roberts@....com>
Subject: Re: [PATCH 1/2] selftests/lib.mk: handle both LLVM=1 and CC=clang
 builds

On 5/29/24 7:08 AM, John Hubbard wrote:
> The kselftests may be built in a couple different ways:
>     make LLVM=1
>     make CC=clang
> 
> In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest
> of lib.mk, and any Makefiles that include lib.mk, can base decisions
> solely on whether or not LLVM is set.
> 
> Cc: Nathan Chancellor <nathan@...nel.org>
> Cc: Ryan Roberts <ryan.roberts@....com>
> 
> Signed-off-by: John Hubbard <jhubbard@...dia.com>
LGTM

Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>

> ---
>  tools/testing/selftests/lib.mk | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index 429535816dbd..2902787b89b2 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -1,5 +1,17 @@
>  # This mimics the top-level Makefile. We do it explicitly here so that this
>  # Makefile can operate with or without the kbuild infrastructure.
> +
> +# The kselftests may be built in a couple different ways:
> +#     make LLVM=1
> +#     make CC=clang
> +#
> +# In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest of
> +# lib.mk, and any Makefiles that include lib.mk, can base decisions solely on
> +# whether or not LLVM is set.
> +ifeq ($(CC),clang)
> +    LLVM := 1
> +endif
> +
>  ifneq ($(LLVM),)
>  ifneq ($(filter %/,$(LLVM)),)
>  LLVM_PREFIX := $(LLVM)

-- 
BR,
Muhammad Usama Anjum

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ