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: <20240312-gcc-plugins-gmp-v1-1-c5e082437b9e@linutronix.de>
Date: Tue, 12 Mar 2024 16:03:29 +0100
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Kees Cook <keescook@...omium.org>, 
 Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org, 
 linux-kbuild@...r.kernel.org, 
 Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH 1/2] kbuild: add host-cc-option helper

This helper works the same as cc-option but for the host compiler.
It will be used by the gcc-plugins configuration to check for the gmp.h
header.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
---
 scripts/Kconfig.include | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include
index 3ee8ecfb8c04..84368e23b072 100644
--- a/scripts/Kconfig.include
+++ b/scripts/Kconfig.include
@@ -27,6 +27,10 @@ failure = $(if-success,$(1),n,y)
 # Return y if the compiler supports <flag>, n otherwise
 cc-option = $(success,trap "rm -rf .tmp_$$" EXIT; mkdir .tmp_$$; $(CC) -Werror $(CLANG_FLAGS) $(1) -c -x c /dev/null -o .tmp_$$/tmp.o)
 
+# $(host-cc-option,<flag>)
+# Return y if the host compiler supports <flag>, n otherwise
+host-cc-option = $(success,trap "rm -rf .tmp_$$" EXIT; mkdir .tmp_$$; $(HOSTCC) -Werror $(HOSTCFLAGS) $(1) -c -x c /dev/null -o .tmp_$$/tmp.o)
+
 # $(ld-option,<flag>)
 # Return y if the linker supports <flag>, n otherwise
 ld-option = $(success,$(LD) -v $(1))

-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ