Received: by 10.223.185.116 with SMTP id b49csp1442488wrg; Wed, 21 Feb 2018 19:23:59 -0800 (PST) X-Google-Smtp-Source: AH8x226Frr7fmde0LQwx2Zi5BWuhtHPf5+/I+6x4rRcUBsJcHsg1arAyVYlGxDegxGCvFXmB4XGx X-Received: by 10.99.111.196 with SMTP id k187mr4393932pgc.360.1519269838991; Wed, 21 Feb 2018 19:23:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519269838; cv=none; d=google.com; s=arc-20160816; b=dTd3B63Dc3OdF/7qfamfzqf9ZEmzdABT/IbaTvd4IsL4zW5dvnwwpQVtq9Np7LMT7C MWRmugDSJ2E9vwUwYVI+lY3Ctl7NJRdeOE/0xgdhL9l9DFl68eWUbbaEhsyJf+w5IDfu CkHMwBbsKxIxJecMGhSDa9FdWXA5R8fJx5osu6NfGSjXdG4vUpWBipH15mendT4WE4lT RIDQ9clmcqOSV1dIvjUcclJVH/huBCldEqhOdO346imTsGdjJJHBqPAaFDf+J4L0gF1b igou00w0NJ21jo6k2KkIM8aNkgP+z+DIm23fHFU4Rm8CacF7CR/2/FQingF0OdUk85OK cglg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=Uf6TwmzigFLVPZbm0XEWy7U0t1FJAQ0t3LrqmEytrUQ=; b=wz1+GkcGVzCCB/Tfmvb+3002OEHccJTEVsEGcgrmbocD0zly6vq/bQNeotpYweLdTr wfjX6hGEb3YpBcq/thEI3XE7OeJXOXcXukHcZ8+7SSJcwXToH1uohIVaasUp53xlMabE NRBJYaqzQN9YkZvzS/vAoMB/D1QYLoHxO11jf5du0dNA6fDZFHeeTaN5WTFKc6Mey2S8 Xo5+c9nryULvAmHh7QUT44Qyq0/oL6fDHURNRfcKYdECXsgXTDAQ7D+T7qvoTj6s16Xd VIlGVLF52lc9+MNWhi/PMf5G3zxwowu8VKwkzaBFiDwQFmajeQ5xEYHTDIghmzOp4Gkh 7EFg== 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 18si680492pfh.118.2018.02.21.19.23.44; Wed, 21 Feb 2018 19:23:58 -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 S1752179AbeBVDWH (ORCPT + 99 others); Wed, 21 Feb 2018 22:22:07 -0500 Received: from ozlabs.org ([103.22.144.67]:56197 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810AbeBVDWE (ORCPT ); Wed, 21 Feb 2018 22:22:04 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3zn05Q3Kcfz9sW2; Thu, 22 Feb 2018 14:22:02 +1100 (AEDT) From: Michael Ellerman To: Masahiro Yamada , Arnd Bergmann Cc: Rich Felker , Kernel Hardening , X86 ML , Paul Mackerras , "H. Peter Anvin" , sparclinux , Sam Ravnborg , Yoshinori Sato , Jonathan Corbet , Richard Weinberger , Linux-sh list , Linus Torvalds , Ingo Molnar , Emese Revfy , Kees Cook , uml-devel , Linux Kbuild mailing list , Peter Oberparleiter , Jeff Dike , user-mode-linux-user@lists.sourceforge.net, Thomas Gleixner , Michal Marek , Ulf Magnusson , Greg Kroah-Hartman , Randy Dunlap , "open list\:DOCUMENTATION" , Linux Kernel Mailing List , linuxppc-dev , "David S. Miller" Subject: Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig In-Reply-To: References: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> <20180218221352.GA6651@ravnborg.org> Date: Thu, 22 Feb 2018 14:22:02 +1100 Message-ID: <87efldr9np.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Masahiro Yamada writes: > > > (Case 3) > Compiler flag -foo is sensitive to endian-ness. > > > config CC_NEEDS_BIG_ENDIAN > def_bool $(cc-option -mbig-endian) && CPU_BIG_ENDIAN > > config CC_NEEDS_LITTLE_ENDIAN > def_bool $(cc-option -mlittle-endian) && CPU_LITTLE_ENDIAN > > config CC_HAS_FOO > bool > default $(cc-option -mbig-endian -foo) if CC_NEEDS_BIG_ENDIAN > default $(cc-option -mlittle-endian -foo) if CC_NEEDS_LITTLE_ENDIAN > default $(cc-option -foo) We may do something like this on powerpc, where we have 32/64-bit and big/little endian (on 64-bit) and then some ABI options that we set/unset depending on endian. The above looks like it could work though. cheers