Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp291067ybb; Fri, 3 Apr 2020 02:48:56 -0700 (PDT) X-Google-Smtp-Source: APiQypK6F2lkLoFKcskgDKveULlmBZTbfLfsXVQjDry/sTajBciDD80xQaMmmyTkkG6gL+/APnm1 X-Received: by 2002:a05:6830:160a:: with SMTP id g10mr5328257otr.226.1585907336610; Fri, 03 Apr 2020 02:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585907336; cv=none; d=google.com; s=arc-20160816; b=aez9Ab4gdMou1V+zQI3wSYUqN+dIPcCLtoNM+JYAPPvl9X1v9iRtuoIrSs4+vRjAdk nOlmtIBveab+RdWoXOXiBoUEm6HMil5oMnuxIhJVsv1A68do0+Il29PEjGWtL4PoDxLT Bvb8ExTIP4jUhprlM4ly/kirtfW6yTOoAkQEBYvGYop4MDpMT+6nbwPbWe+jpuY2+pNk dQMRT9hTWGSrUH+1ZlAlVtIpJsnEVnDyUqStJSn+Ek1ANMAQMXPdh1aSy3TuPdILSCRd KKWc/16R5nn0xuJ3g+O1VBC50+mCBTtn3Ih7P8x8HCfpSfJfQD1SregY5X8t8NS9gqlA wYHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:organization:references:in-reply-to:subject:cc:to:from :date; bh=NxucnCAamwEauIny9ZPzLzmCJu05vuZ4Gv6Txupy7lg=; b=0nFsIMIkmccWCZgIpfSKTvCYIsFZxQF/Jt9YIa67hYgeXQb6+LnvzvngAqFn1x8nS6 JJakaNF1SFUe+PO0285pe+1OjWE0gDhmqcmaelq+Q7BtYvnM0Jj2ojNXTxRIyuGS0xHS TJY1DMukvLWJUjulIlxh1f+mT0YdXwaKV1KsRhCDJFjcEiqnb9qOhfOomvEmO3BMAmOg hE+17X4CnsTeLERoijrS6U4pY7dt4n9aQ/5UqDud8gB5S0RHHjJrVC475jb+a6YEF9h5 UmZbl8jO2grIeZjHp+RxKkljSn/471ZpLfdnVWaVxDGoLRqWrU0fexq/H+nCWTh/KYf/ bK2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8si3354423ood.64.2020.04.03.02.48.43; Fri, 03 Apr 2020 02:48:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390651AbgDCJq7 (ORCPT + 99 others); Fri, 3 Apr 2020 05:46:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53440 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727912AbgDCJq7 (ORCPT ); Fri, 3 Apr 2020 05:46:59 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0339XrJ1029449 for ; Fri, 3 Apr 2020 05:46:58 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 3043ga7npd-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 03 Apr 2020 05:46:57 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 Apr 2020 10:46:35 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 3 Apr 2020 10:46:32 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0339kpuS57933880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Apr 2020 09:46:51 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3CEAAAE051; Fri, 3 Apr 2020 09:46:51 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DD1B7AE045; Fri, 3 Apr 2020 09:46:50 +0000 (GMT) Received: from laptop2-ibm.local (unknown [9.145.155.48]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 3 Apr 2020 09:46:50 +0000 (GMT) Date: Fri, 3 Apr 2020 11:46:49 +0200 From: Philipp Rudo To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, Jeremy Cline , Heiko Carstens , Vasily Gorbik , linux-s390@vger.kernel.org, Michal Kubecek , linux-kernel@vger.kernel.org Subject: Re: [PATCH] kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig In-Reply-To: <20200403090224.24045-1-masahiroy@kernel.org> References: <20200403090224.24045-1-masahiroy@kernel.org> Organization: IBM X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 20040309-0020-0000-0000-000003C0C410 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20040309-0021-0000-0000-000022197373 Message-Id: <20200403114649.1c1a149f@laptop2-ibm.local> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-03_06:2020-04-02,2020-04-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 malwarescore=0 mlxlogscore=880 impostorscore=0 clxscore=1011 phishscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004030082 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Masahiro, On Fri, 3 Apr 2020 18:02:24 +0900 Masahiro Yamada wrote: > Staring v4.18, Kconfig evaluates compiler capabilities, and hides CONFIG > options your compiler does not support. This works well if you configure > and build the kernel on the same host machine. > > It is inconvenient if you prepare the .config that is carried to a > different build environment (typically this happens when you package > the kernel for distros) because using a different compiler potentially > produces different CONFIG options than the real build environment. > So, you probably want to make as many options visible as possible. > In other words, you need to create a super-set of CONFIG options that > cover any build environment. If some of the CONFIG options turned out > to be unsupported on the build machine, they are automatically disabled > by the nature of Kconfig. > > However, it is not feasible to get a full-featured compiler for every > arch. > > This issue was discussed here: > > https://lkml.org/lkml/2019/12/9/620 > > Other than distros, savedefconfig is also a problem. Some arch subsytems > periodically resync defconfig files. If you use a less-capable compiler > for savedefconfig, options that do not meet 'depends on $(cc-option,...)' > will be forcibly disabled. So, defconfig && savedefconfig may silently > change the behavior. > > This commit adds a set of dummy toolchains that pretend to support any > feature. > > Most of compiler features are tested by cc-option, which simply checks > the exit code of $(CC). The dummy tools are just a shell script that > exits with 0 in most cases. So, $(cc-option, ...) is evaluated as 'y'. > > There are more complicated checks such as: > > scripts/gcc-x86_{32,64}-has-stack-protector.sh > scripts/gcc-plugin.sh > scripts/tools-support-relr.sh > > I tried my best to implement the dummy scripts to pass all checks. > > From the top directory of the source tree, you can do: > > $ make CROSS_COMPILE=scripts/dummy-tools/ oldconfig > > Signed-off-by: Masahiro Yamada look good to me Reviewed-by: Philipp Rudo Thanks a lot Philipp