Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp713968lqb; Wed, 17 Apr 2024 08:43:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV0UhAkiETPbMF+qmAvx1RZEHSBaezfWNFev/WXF++BxvABKxvIDo9RxeTIbJ1vCx6eK4bFJ9Njsl4pd4BFGWiWbVwKI8KHZo0zTRY2bA== X-Google-Smtp-Source: AGHT+IGgQxFe+XozUBd7kWHTrj0v86L2vu4aiYhNmrjpUmtEaGbhOn4XXgn8Ji5EbVU2+N66zhUM X-Received: by 2002:a17:903:230b:b0:1e2:9676:c326 with SMTP id d11-20020a170903230b00b001e29676c326mr23242972plh.29.1713368635735; Wed, 17 Apr 2024 08:43:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713368635; cv=pass; d=google.com; s=arc-20160816; b=AWFrnUYLWZwLFaKZsc1J4oHqs3h6Mg1Dw+IxAYfgyP4xFp4M2/cB5MbNItarvjKyCy LCfqdSDYiS0GbR77sBOvhjsu1W5nJlPXU9NhcS1/N3Ti+iUIRhKMNomglYgIKmbvTw21 LtNAOFlciSnjgnrUJpLKSv9YRHqNYSW70yFim05CvY1CD5jBEXKQOFdXNGD/yZR8MzWZ 6UlsI6BZNeWCr7LKMCPBfhkXeYQTWyWQxGlzyL53ox4AxwDitb4Bvu2SyJA4W/UTbVl8 IrS5FonieYERlA83LekBfibTPafUjuO6gMR6Os9OmINP3Pq1fCnU323i3UYl/Q0mazXd JcaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=glbLQI16xkGfNWJMZSibCWp76MpxWEXe4pp1qP1DFG8=; fh=5HHgQDcR9oh3hFOqjstSBVWMv/4O3013nmTCqAu8L0Y=; b=zK34ELGN1bVIWr+pLp/1BZM54NuXLKMXoKJ4x7U/6LujVmtVQySYQRl1x9KLHwFEx5 0WHZRB79FGbeHdHcoTSyTq78DxT7j/F7RsMF5lppyoH+pMHJ/gdhktaEBCi85fVkMAbM CLmuje9jwo4sRP0ZlXqiaYGMVd8ShzPGthHkPCLN0F1ML/x55Zlk9Yh2BEc/r0MujYgw B0uOitUQ2ApX6EYdPRE1OIIxv2uvg0Nq633Bkpy7R6yABYM5z4EqS6QS71wZheNlz/Tk sCL4ExLuCXjlxNmWjJoerX43Hr241uLl4Dg+KK3nUUQa3AaMF/HUq50U4kp9WFIiagXC +bzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=NV2uyAog; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=VRn1Nbo9; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-148790-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148790-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l7-20020a170903120700b001e2b56c8cc5si11747022plh.509.2024.04.17.08.43.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 08:43:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148790-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=NV2uyAog; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=VRn1Nbo9; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-148790-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148790-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C8E2EB24988 for ; Wed, 17 Apr 2024 15:24:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B9EF1474AE; Wed, 17 Apr 2024 15:24:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="NV2uyAog"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VRn1Nbo9" Received: from fhigh7-smtp.messagingengine.com (fhigh7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEA0B146D7F for ; Wed, 17 Apr 2024 15:24:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713367451; cv=none; b=CQJb+WgkIpi6tKeguCao4X6w82uwAJQyU8l7wNW+XIJiTxFvT6TueyibCiBHiHfq4p4jB5FXXQW8BA8BshR5w9mDqvXnLDYQnGvvMaeC+2+2IPeUn6g4VtH2mCBGAc0Zx9VgKC7wAwt7gR30qcaPGgjPGuy4YAShWxYSM7C5TPk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713367451; c=relaxed/simple; bh=dBpaf0LdjkMsh0JtjJlm/DSn8jHNFrkYbQ4msFH2NTI=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=V5x9lxVF1VXnG/bJ5CcmRXXqsV0dHxgz57cJ82V+mZzEFY0TSTCs7orsCAcU176VSQ7A07yj3Wc0HlxBmn5e0tzQ09642t3kTDhOle5x2eqqxeIlRjMFg1ZZCqiLfK22R57Q9v6Saui3jySzaeH02BamZY6bxr6kDGssOjKDUe0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=NV2uyAog; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=VRn1Nbo9; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id D69051140141; Wed, 17 Apr 2024 11:24:08 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Wed, 17 Apr 2024 11:24:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1713367448; x=1713453848; bh=glbLQI16xk GfNWJMZSibCWp76MpxWEXe4pp1qP1DFG8=; b=NV2uyAogy0VEIB/buZECVpOkFj clawIWQsU22GdyqvHSWkp3QXCEjH5NKEtGbffAAUNvim6QB/fp6vAVKSoDh9D/rD Eh0X10NcEL2vm75TFswthx69RdVLAFUSr8MXQ7J5BV3REgGQBDtnGY6H1eCnE/Tk uuAatkMwbF2HVVPSqwDyuSgQ+bvOB//WmF9tRyy5/WpjZLkhuxdnQ1ASkAWKzojW FHZU1qelP9xG6IAaMjEWTikKYHbAsiA9SE6nJh9Sf2MlVygHUl9U1asT7aJ0hvkX 5OC3NLpjEDfbYpT/bY7wrG5IfaOsjdRtf1I9gsqv9FHfjjsJAPF1gK3j/crg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1713367448; x=1713453848; bh=glbLQI16xkGfNWJMZSibCWp76Mpx WEXe4pp1qP1DFG8=; b=VRn1Nbo9siLDyEAdYXhVFRT4jCfCLLB0mVg4miS+kI8G bKXT6IjcI62H7tGBIoGIYWnYmsY0RjiYtPcRqlBUl6+f55ZqHz2+3/y2BWjMfVRI lgBULGU50220tuj9IAi3hlKLvFiTVxSmcarVqONI/ybtto0N+8o1YP+XcVCDctdE Ym+7RmoxPzI09FPSmyW8he31S/edGlBlcx0u9Tp7bAodocsg3/grxt68w0dmZWw5 GCvdMeBxSALYGvL/SJNZPPEXU1aAuRdmFE/H4cZCkcheJxyphfBn8TBsEWQC8LL9 FpCn/gnPi5ya9yiAhTICBOKwuX5rd6QqiBzW64Q1/Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejkedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 59617B6008F; Wed, 17 Apr 2024 11:24:08 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-379-gabd37849b7-fm-20240408.001-gabd37849 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <1f384d41-4c65-4efb-a171-26b54dacfb30@arm.com> References: <202404141807.LgsqXPY5-lkp@intel.com> <31b4e05d-62c6-44cd-8038-7ac8d21320c3@arm.com> <1f384d41-4c65-4efb-a171-26b54dacfb30@arm.com> Date: Wed, 17 Apr 2024 17:23:47 +0200 From: "Arnd Bergmann" To: "Ryan Roberts" , "kernel test robot" Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, "Andrew Morton" , llvm@lists.linux.dev, "Linux Memory Management List" Subject: Re: clang: error: unknown argument '-static-libasan'; did you mean '-static-libsan'? Content-Type: text/plain On Wed, Apr 17, 2024, at 17:11, Ryan Roberts wrote: > On 16/04/2024 15:42, Arnd Bergmann wrote: >> On Tue, Apr 16, 2024, at 16:33, Ryan Roberts wrote: >> >> I'm not entirely sure how much of the Kbuild infrastructure we >> can rely on here. If the .config file gets included, this should >> work: > > Thanks for the pointers. Unfortunately neither don't works as we don't have any > of the Kbuild infrastructure. > > I'm not really sure what to do here. The best I've come up with so far is to > just remove asan from these binaries. They are pretty simple selftests. I'm not > sure its adding a whole lot of value anyway. > > Does anyone have any advice? > >> Alternatively, if the cc-option macro is available, you could >> try this one >> >> CFLAGS += $(call cc-option, -static-libasan) $(call cc-option, -static-libsan) I had another look at this and found example code in tools/thermal/tmon/Makefile that you should be able to adapt. Apparently the cc-option macro is not provided by default, but there is a copy you can include: # We need this for the "cc-option" macro. include ../../build/Build.include WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int override CFLAGS+= $(call cc-option,-O3,-O1) ${WARNFLAGS} # Add "-fstack-protector" only if toolchain supports it. override CFLAGS+= $(call cc-option,-fstack-protector-strong)