Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp7643323pxu; Fri, 25 Dec 2020 23:37:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuz3Ccq9wzD/USHvd0HvhPGP0TQpwqKUOLgIlWC56E6Q+WnNKWK/G6JyP0CEgt2g/hqsoN X-Received: by 2002:a17:907:36a:: with SMTP id rs10mr33413426ejb.411.1608968257467; Fri, 25 Dec 2020 23:37:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608968257; cv=none; d=google.com; s=arc-20160816; b=XauGBgutWqetx8gBMfsyj3c5+xF1TrvN/dZ6EaHrtOPK6LnwTWaaegI1dZpkVZjiKH WIudYUVtNFwY+OSk8qdAbiVybd/4qOcLfiE5zzWgYYxfZGsGYTZq7qh5zoS7OT1MHHVO C7Av7YjSDvK2fmrnmqB9zJbajCoNSlLqplV/Ly2t6I1Pzk+4Pv6Xhngij1AGUAx7ZzwX nYd8CpdEOR77JX8KShh/pYGqM15ukfFYYV0h1SjjNjlsMFMxefSJmfoK/xv+xWJzMRER NgXRSdm+c5KHLZngct8UByHQJsH4kj5Y5YEZYPX9XmJzdczmONlUYpGQLgkblLjXmDI5 OJ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature:dkim-filter; bh=ThqNBZY49YARTr9BrAiKVbq1UzyshrhkR+ie4Ruo14s=; b=HOb1y8DHvZJxZoctlbciO0ovyhtTiftl920cFx2ldxjGDfH4GfakguhFrywWx7trjh ZJYJWKX83LsToJSp+K3f5VP/2f7ctMz25I5GBcBnDoP8OkXpcL431MioOu+p4zTU2EXR xCnPF/BA99Ot2h2BKtNMC12jlZgQQHXTitNQrLBqJz8HO+0u3a0hPAjiA4LuNU20LbTa XPvHA8t+B+8SspRxAYaXZO0Cpr65hnWBWUFQ9UZjEUVRqWCv7+hgnXBH0zkWNfWBfNZL ZKcHAZNWVpPG43S/neWfomYofg6otBMMlW0WGRe3UQTWTAz/3jfHG/jOl9EvVHzvBb8H +MRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@zytor.com header.s=2020112401 header.b="T4GiYWZ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si17920475edn.43.2020.12.25.23.37.14; Fri, 25 Dec 2020 23:37:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@zytor.com header.s=2020112401 header.b="T4GiYWZ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726417AbgLZHgs (ORCPT + 99 others); Sat, 26 Dec 2020 02:36:48 -0500 Received: from terminus.zytor.com ([198.137.202.136]:45243 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725979AbgLZHgs (ORCPT ); Sat, 26 Dec 2020 02:36:48 -0500 Received: from [IPv6:2601:646:8680:a581:d14d:32a7:89c6:43d1] ([IPv6:2601:646:8680:a581:d14d:32a7:89c6:43d1]) (authenticated bits=0) by mail.zytor.com (8.16.1/8.15.2) with ESMTPSA id 0BQ7ZZEF1648151 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Fri, 25 Dec 2020 23:35:38 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 0BQ7ZZEF1648151 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2020112401; t=1608968138; bh=ThqNBZY49YARTr9BrAiKVbq1UzyshrhkR+ie4Ruo14s=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=T4GiYWZ/lReUVj4BdOLSEAtIuqptLtOIrnVFzGvJuPfAQPX4tNBBadVML9mFIotsA u0d6SktLL4VpAZ5Qrpb7UA/eSOyS0nCWL5M8d8gFM4ndCNBsWasyUQrJn596NqsO90 St39JeBwI/jAXaS9rYFRJEkgHuyeXZ9twQm2M8ANzWWtzL5iFlRW8ufcg4KsANjl1d SnU39CmDjhuDDMNvXHGvCnXISZHFj4Z3v5ow5f4GH8dXHe/VUlCefeV9lAu2MwKBpm ghINNq+92Q+dF/ItgyuaXIbYedEK8DSjXFpqtSi0yjwykkyIeGS4R8bf0DCTs4nYHY Ks9Vs8/coc6WQ== Date: Fri, 25 Dec 2020 23:35:28 -0800 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] arch/x86: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS) To: John Millikin , x86@kernel.org, linux-kernel@vger.kernel.org CC: clang-built-linux@googlegroups.com, Thomas Gleixner , Ingo Molnar , Borislav Petkov , John Millikin From: hpa@zytor.com Message-ID: <37DE7046-5096-4C0C-A96D-FD168A849DFD@zytor.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On December 25, 2020 11:29:30 PM PST, John Millikin = wrote: >When compiling with Clang, the `$(CLANG_FLAGS)' variable contains >additional flags needed to cross-compile C and Assembly sources: > >* `-no-integrated-as' tells clang to assemble with GNU Assembler >=C2=A0 instead of its built-in LLVM assembler=2E This flag is set by defa= ult >=C2=A0 unless `LLVM_IAS=3D1' is set, because the LLVM assembler can't yet >=C2=A0 parse certain GNU extensions=2E > >* `--target' sets the target architecture when cross-compiling=2E This >=C2=A0 flag must be set for both compilation and assembly (`KBUILD_AFLAGS= ') >=C2=A0 to support architecture-specific assembler directives=2E > >Signed-off-by: John Millikin >--- >=C2=A0arch/x86/Makefile | 5 +++++ >=C2=A01 file changed, 5 insertions(+) > >diff --git a/arch/x86/Makefile b/arch/x86/Makefile >index 7116da3980be=2E=2E725c65532482 100644 >--- a/arch/x86/Makefile >+++ b/arch/x86/Makefile >@@ -33,6 +33,11 @@ REALMODE_CFLAGS +=3D -ffreestanding >=C2=A0REALMODE_CFLAGS +=3D -fno-stack-protector >=C2=A0REALMODE_CFLAGS +=3D $(call __cc-option, $(CC), $(REALMODE_CFLAGS), >-Wno-address-of-packed-member) >=C2=A0REALMODE_CFLAGS +=3D $(call __cc-option, $(CC), $(REALMODE_CFLAGS), >$(cc_stack_align4)) >+ >+ifdef CONFIG_CC_IS_CLANG >+REALMODE_CFLAGS +=3D $(CLANG_FLAGS) >+endif >+ >=C2=A0export REALMODE_CFLAGS >=C2=A0 >=C2=A0# BITS is used as extension for files which are available in a 32 b= it Why is CLANG_FLAGS non-null when unused? It would be better to centralize = that=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E