Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3576600yba; Mon, 8 Apr 2019 23:44:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyM+iGNQdn4hz+Id1AfAsAFY/GLqJRlAgnXnwS1f/1XOmYApHobHIqYRwsH5UCOqA1SfXwg X-Received: by 2002:aa7:87c5:: with SMTP id i5mr28631164pfo.20.1554792261434; Mon, 08 Apr 2019 23:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554792261; cv=none; d=google.com; s=arc-20160816; b=QGZ2cKzmIpZ/t/sguwANWl1K9z8X/Ph0BnxD0IkH1P7k9NIcqIBmsfiL4X+7bO66RL y9CII1ah1AyBJLra5oVUFgDMclNttUQeD/I/UdWNbzFUHXWk4NldBzHVBwVmZ9Sy8jNr KgXA26lSK2xgulEllpRrMxzT7FZZaBhY5Tg76CaocZ47TpCoNDTMKtuGkcGgb4NLzc3M oFrTwysMvbyqPiXjhEdpWJeH+4Iroy7cDe77oH+1osP9rtxpj/Ei9TgS+ZLbS3twOl2k jVlncFlhezSxxDbDFbe2O0J2Z7YBzcxsYMAtmm1PTFFhD5EKmmyHeBcJLemHof+xi6dh kYow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=dojvh5C6mz+VIKO3HuOFiWuFHkUl4wLKGs+2Is0aJkE=; b=vUePKC5+m/1H9JAH0sAgoyTQRFT+YMZWiMPbG+MqFV4HU6u5gGm3rspB5lGiDM1uDF lWTtDDoXNq/CZGz1YON+u1Gt6pvEv4LB2QpEUPqRTPsLPD7+fnKIw+gil3fm4Ud+PvvL N+xV/kC0KlE46ntAF11q2Xzi9kJmn/DdcBWCBT5VLXtb9YyjnlDM8oJElMWqQhUdGnaU M/oithP9p9RzEPMd3dG1nsBnf+YhdWbcBd8pYDa20I6fI5pN9SXmQi4OK//ThiQXsKfq v6I8OlV7L0tAYPtgNyoL2FY9UxZSAjojJcLZ9CHapYEKglyoXM3wtBGhgdlDAI5BjZOA C9aQ== 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 k33si29523391pld.27.2019.04.08.23.44.04; Mon, 08 Apr 2019 23:44:21 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbfDIGn2 (ORCPT + 99 others); Tue, 9 Apr 2019 02:43:28 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41160 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbfDIGn1 (ORCPT ); Tue, 9 Apr 2019 02:43:27 -0400 Received: by mail-lj1-f195.google.com with SMTP id k8so13394249lja.8; Mon, 08 Apr 2019 23:43:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dojvh5C6mz+VIKO3HuOFiWuFHkUl4wLKGs+2Is0aJkE=; b=ZoNmUD+BM6Pyy3scpGS/SmxkgHqYfdx7/5py09N1cnYtH9+K/kKXc7Ko1oEBDClnRU vKUYf+1RQZQskR/G8K8ZvEVNpO/JxkEJmRJ1DVEthAyE/u43k7mXCmMR7M9IJM2ujbo8 7EYeXmraojhTlABtxEndIHmvmR6LqSoLVcNarqYqKQzGdSuNlIfOowIgh4sQdWJxdGuH C73DxFAATdfL3MUOKW7VXKgouEGwagIbgBivQJQjx5F4QiC0axTcZCvVUz1HxNC+HIG3 o5cIoUQyOyFMPhDsSGabbBO/4mrvuA1JJ8RidNiYGKn+mgA+d8/DyKiCjXU/7BFH/nWg ACOQ== X-Gm-Message-State: APjAAAWHME+8pFIyaGi5rtuqPlUtQRCjwCMkMjF05kaUnXFBp5k4ahwS z16xDhjF49hbU5mC3QfhEMIq56WSfTF79J4/mxQ= X-Received: by 2002:a2e:9e4d:: with SMTP id g13mr16061952ljk.12.1554792205921; Mon, 08 Apr 2019 23:43:25 -0700 (PDT) MIME-Version: 1.0 References: <20190408212648.2407234-1-arnd@arndb.de> <20190408212648.2407234-3-arnd@arndb.de> <20190408220312.GA18333@archlinux-i9> In-Reply-To: <20190408220312.GA18333@archlinux-i9> From: Arnd Bergmann Date: Tue, 9 Apr 2019 08:43:09 +0200 Message-ID: Subject: Re: [PATCH 03/12] s390: purgatory: pass --target option to clang To: Nathan Chancellor Cc: Martin Schwidefsky , Heiko Carstens , clang-built-linux@googlegroups.com, Nick Desaulniers , linux-s390 , Philipp Rudo , Hendrik Brueckner , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 9, 2019 at 12:03 AM Nathan Chancellor wrote: > > 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)) > > > Would > > ifdef CONFIG_CC_IS_CLANG > KBUILD_CFLAGS += --target=s390x-linux > endif > > be a little clearer (and save a cc-option call)? Fine with me as well. Actually I noticed later that we need the same thing for arch/s390/boot/Makefile and arch/s390/boot/compressed/Makefile in some form, so maybe we should drop this one for now and find a solution that works for all three of them. The boot stuff is the one patch I did not send, since I did not think I had a good solution there, just one that happened to make it build. > Otherwise, makes sense. > > Reviewed-by: Nathan Chancellor Thanks, Arnd