Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3299972yba; Mon, 8 Apr 2019 15:49:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+vgGgbzGgZHG4D0LqG/68m1o8AeIO7LI4cDLcWRav9smyHkblJT0BzsALEeiddwRWiHoM X-Received: by 2002:a65:5106:: with SMTP id f6mr30455533pgq.253.1554763797273; Mon, 08 Apr 2019 15:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554763797; cv=none; d=google.com; s=arc-20160816; b=IvS4eTXK5SJoTQ5Q3dr/p/8M82RxQmO/uwtVO7bL8E4S5s8ODMqsr5E1BKUSVpgsiJ YPNCTRzeD+Hhzh5Zi6+UDl/awv2N+WovBKXL6IJMA7q+2FgqyzfBpP0mBdzBRMX9GFhj 2BURvmZmnPQRCPazJWONswu8IHguCS7+L3o3cIxN6jzqa3xD1MjAYGUcXzSx6PlSxgek tg5bn8It7O9YtsuyiZ9Cr5vtn5hRhwewmNwBV+zTMlxfaB7FVIP8PaipwgDruVUZn/eP zqTAIf5UhnTIcGyoqh5R5jjjBrPw+VXyqA7/psTcrZZ4r3y//jecEqzVqf5Chi78ZA4V abog== 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:dkim-signature; bh=ZSmvBT5XuDzX43COpYbrgBxQNOyj1ueYz4Ya7JsnWU0=; b=Mll2vlZRUHhxz4ko+vE8G9KRaUyPCaFDXpr0UZIMsnIRDvE2odjFbXJYlr2DbD8suJ jVFqUwIKWfhJKFajupc05kjBCpNHm/SfTF/WCBQ03u2WfOFVRlRf9TsMipLW0hCbbPKV oC8emhQkIcSkTbg44+DUd6FbcFFFMoZOvI6gb/3GIVJ0pwBEc/K+jM3xWftdopc9xsPt NxIuouKd1WsSsZTA7xYrL0DTzZxMAYEMZTxgYkYwSruwWGlxMmclcQGHCuuqXv02F3PU 9TCl0rv3VyVE8uUqneQfNdR5flo2qYTB37QiYmw6S2iS1f0/LqoD+wqMj/s33xrlCgeC x0YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HUlOgWV8; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j25si14836436pga.22.2019.04.08.15.49.42; Mon, 08 Apr 2019 15:49:57 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HUlOgWV8; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727196AbfDHWDT (ORCPT + 99 others); Mon, 8 Apr 2019 18:03:19 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:46054 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727115AbfDHWDR (ORCPT ); Mon, 8 Apr 2019 18:03:17 -0400 Received: by mail-ed1-f67.google.com with SMTP id f19so6074372edw.12; Mon, 08 Apr 2019 15:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZSmvBT5XuDzX43COpYbrgBxQNOyj1ueYz4Ya7JsnWU0=; b=HUlOgWV8OH+Ty/erteazIeXlckg5jcwMSC4kQtlq+08+hK6jCOp7ppsW2ojPm9R+lk xfhkbexo6EXkBDTKWmRyRWgjfbyBGz7qcBqE6k5UwCMkpsArMwPqBFpbjeyTF1+8OOqo KhJhT5a9itOJmrO/9svZO2O07gl+IMrmZ70xuiem3GdFCbb7/3va18EXEvax6dcZrW+y PMY6Bat2E+5qvkGh6bd4b0kmNoD4t3J4I8EYejAuMEl3NUcRxFZVh7p1hrNpzH+Vk6BJ z74f/GNFkat5fpytk0UNUjMlfpyXJayC20bFtInA1cC0NjtTQyaS4tHvckNW2SiZPQpR vMeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZSmvBT5XuDzX43COpYbrgBxQNOyj1ueYz4Ya7JsnWU0=; b=ej6MJ4JiOxamZNUR/Ef6PUD0fKBerFHOop3vA49peDjTYeDSRhwrZJwddJ+DGjciTn EnMt6sY1pyOayUQF43tyAG6gR9yb8DY/FxAoJ71YVDmb7vrUvwfsUABFpfSKj9fXxVz4 zXHjds6QVCZdWmVeGVpGmY4T7UG1frF92XPx2HNFTtFGTk6jo/PPie06v4hoA7bUGnZW q/gMQ+DFobp7NmX7tHXUjGIwugW+tSMmeXUSUmAl5NCQ9o08dQF8Odglps+gfr5LTR8P HXn9KCoHmt9ij3avBQvFK1CB+9ZEnbyiD0dSUbS0Yod7fflzjE4UMEIZKfl7iW61t3nV b5zw== X-Gm-Message-State: APjAAAWLno9ZyTgYUVrW2KMXRGLBMeBTzIh897iR3VFDykITx9Llkk9S SMEEnDQfS3ShpusXLCA2dd4= X-Received: by 2002:a17:906:f91:: with SMTP id q17mr17786595ejj.63.1554760995548; Mon, 08 Apr 2019 15:03:15 -0700 (PDT) Received: from archlinux-i9 ([2a01:4f9:2b:2b84::2]) by smtp.gmail.com with ESMTPSA id k18sm1327892eds.65.2019.04.08.15.03.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 08 Apr 2019 15:03:14 -0700 (PDT) Date: Mon, 8 Apr 2019 15:03:12 -0700 From: Nathan Chancellor To: Arnd Bergmann Cc: Martin Schwidefsky , Heiko Carstens , clang-built-linux@googlegroups.com, Nick Desaulniers , linux-s390@vger.kernel.org, Philipp Rudo , Hendrik Brueckner , linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/12] s390: purgatory: pass --target option to clang Message-ID: <20190408220312.GA18333@archlinux-i9> References: <20190408212648.2407234-1-arnd@arndb.de> <20190408212648.2407234-3-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190408212648.2407234-3-arnd@arndb.de> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 08, 2019 at 11:26:16PM +0200, Arnd Bergmann wrote: > The purgatory Makefile does not inherit the original cflags, > so clang falls back to the default target architecture when > building it, typically this would be x86 when cross-compiling. > > Pass --target=s390x-linux to all compilers that understand > this option. > > Signed-off-by: Arnd Bergmann > --- > arch/s390/purgatory/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile > index ce6a3f75065b..3a14b968cec3 100644 > --- a/arch/s390/purgatory/Makefile > +++ b/arch/s390/purgatory/Makefile > @@ -22,6 +22,7 @@ KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes > KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare > KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding > KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common > +KBUILD_CFLAGS += $(call cc-option,--target=s390x-linux) > KBUILD_CFLAGS += $(call cc-option,-fno-PIE) > KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS)) > > -- > 2.20.0 > Would ifdef CONFIG_CC_IS_CLANG KBUILD_CFLAGS += --target=s390x-linux endif be a little clearer (and save a cc-option call)? Otherwise, makes sense. Reviewed-by: Nathan Chancellor