Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5155794ybl; Tue, 10 Dec 2019 01:14:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyN6ooK5p9zhE/TaqnhvfzVxZmYyi0hbPAJ3Uj3HGK+OTOW8iQ8Zz+LYKv9QXDsdLDjaSQj X-Received: by 2002:a9d:6b06:: with SMTP id g6mr25042389otp.93.1575969273982; Tue, 10 Dec 2019 01:14:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575969273; cv=none; d=google.com; s=arc-20160816; b=SVsF5JciE4ojk2wSGWCWugn3PnnhynfPPyuSRcNI3z9Xy8IDUv1YmsBKhnoNnU902S BhzWsUHvdWVOO+sSp/ex4oJao+ldcq/itrsBBauLaaLG7ysJ+KUK0s7WNy9xUBXQUJ5E 2OfbvzYfnLJwGEKuUjEyRw7HFVHaHF1YQ0kEHQJI6nZzXczZUvDlZTk2pde32p2gC3by Zwxqsfu55m+/16bJ8wvpB2GEbQVuN5KdhADsx/mDCqIE3waRiXCtQsW2n8ZtfEHUhNXH Estxhf1Lpt8IjfpTZ7yMm7asU428sEVc4qpHGZJI7DZfzgJ1YKFaEGmX+BvczTc1CmYZ F9Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=YyyXWwNpHhoJ7BUc36c96SbBtR0eI/2rBTveQt46BNs=; b=emvhIGGiKSlsBgSZNBpofOFEAYqsJMwkRQQilU7rbnQlXJSFxK/KqoEcVDdWIbn6Io kWAWr/YAQqMCSWXAgXn9Cu29sR+cy00hnrm+wcEkV6M6IlNnPcPQJE32WtNqwwUSIzQ2 zDoVc+0OmOVlR4k8j+db6M4JeIQqRisLWaPyF4g9Nb1Dd2E7OF3HeNXrioS00MvK6/Dn +Zz1GUioCR9BY21kpJXREUgoIZfYRoJZUcsrpSwvqqClngRBClt0sRoCyVnSf5MfZWG0 pfFbE/NXWREd9muA5DVfFGHG5dZiSeM0KCYWpoOUnvCYUZD5qLN0ig0iQILyrVRf6Erp hSHA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si1488258otp.6.2019.12.10.01.14.21; Tue, 10 Dec 2019 01:14:33 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbfLJJNr (ORCPT + 99 others); Tue, 10 Dec 2019 04:13:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:49930 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726911AbfLJJNr (ORCPT ); Tue, 10 Dec 2019 04:13:47 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0AFEFB357; Tue, 10 Dec 2019 09:01:09 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id A3E77E00E0; Tue, 10 Dec 2019 10:01:08 +0100 (CET) Date: Tue, 10 Dec 2019 10:01:08 +0100 From: Michal Kubecek To: linux-kernel@vger.kernel.org Cc: Jeremy Cline , Heiko Carstens , Vasily Gorbik , linux-s390@vger.kernel.org Subject: Re: s390 depending on cc-options makes it difficult to configure Message-ID: <20191210090108.GA22512@unicorn.suse.cz> References: <20191209164155.GA78160@dev.jcline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191209164155.GA78160@dev.jcline.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 09, 2019 at 11:41:55AM -0500, Jeremy Cline wrote: > Hi folks, > > Commit 5474080a3a0a ("s390/Kconfig: make use of 'depends on cc-option'") > makes it difficult to produce an s390 configuration for Fedora and Red > Hat kernels. > > The issue is I have the following configurations: > > CONFIG_MARCH_Z13=y > CONFIG_TUNE_Z14=y > # CONFIG_TUNE_DEFAULT is not set > > When the configuration is prepared on a non-s390x host without a > compiler with -march=z* it changes CONFIG_TUNE_DEFAULT to y which, as > far as I can tell, leads to a kernel tuned for z13 instead of z14. > Fedora and Red Hat build processes produce complete configurations from > snippets on any available host in the build infrastructure which very > frequently is *not* s390. We have exactly the same problem. Our developers need to update config files for different architectures and different kernel versions on their machines which are usually x86_64 but that often produces different configs than the real build environment. This is not an issue for upstream development as one usually updates configs on the same system where the build takes place but it's a big problem for distribution maintainers. > I did a quick search and couldn't find any other examples of Kconfigs > depending on march or mtune compiler flags and it seems like it'd > generally problematic for people preparing configurations. There are more issues like this. In general, since 4.17 or 4.18, the resulting config depends on both architecture and compiler version. Earlier, you could simply run "ARCH=... make oldconfig" (or menuconfig) to update configs for all architectures and distribution versions. Today, you need to use the right compiler version (results with e.g. 4.8, 7.4 and 9.2 differ) and architecture. At the moment, I'm working around the issue by using chroot environments with target distributions (e.g. openSUSE Tumbleweed) and set of cross compilers for supported architectures but it's far from perfect and even this way, there are problemantic points, e.g. BPFILTER_UMH which depends on gcc being able to not only compile but also link. IMHO the key problem is that .config mixes configuration with description of build environment. I have an idea of a solution which would consist of - an option to extract "config" options which describe build environment (i.e. their values are determined by running some command, rather than reading from a file or asking user) into a cache file - an option telling "make *config" to use such cache file for these environment "config" options instead of running the test scripts (and probably issue an error if an environment option is missing) This would be perhaps even easier if we also separated the environment descripton into a different file so that we would only need an option telling scripts/kconfig/conf not to update the environment description. I'm not sure if that would be acceptable for upstream, though. Unfortunately I didn't find time to implement this yet. Michal Kubecek