Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5183622yba; Wed, 10 Apr 2019 13:16:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzs4FHnrwxtmu5C0ZqZXNHxrDWqUmWrQhoubWX3DgMq69RCFF56uQHXSW0JNsRMO2jZBeSZ X-Received: by 2002:a63:6f0a:: with SMTP id k10mr42049202pgc.78.1554927388121; Wed, 10 Apr 2019 13:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554927388; cv=none; d=google.com; s=arc-20160816; b=OT9/FIn9kLTrwdOz7kq0JQ3I32JEIlP2U5hKk0y31t9w6IEjF9uqP5bkWqjKEalIUM GibioqM+0BF659uC2TvIUaBRjUhmqN9GGynL60GAsBvrUIthgposBn7P7atdaAy38TgR 4x4dAnmmPovhO/rbBxIzDVPGBeoNxAjVLrKKHRLPilm4GEup89hmW9+Ug8yfW/hxzUyM QMka/RsApAkc40zqSOTgnSHc3vnQ8dMvp8MV0NUT8zSa4L0HUbwFT0eioS6jwKj1n5p8 A+iVkO9sXHI4lD0NRtbey4aEnauxDJewbHeOJaVZ+dlImO2+aTL+SCnfGs+Dx+80z7W1 5Psg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5g1DWVatnW4H0J2yTD/NSWN3K/rlJUgtqkzzvYpZHgg=; b=nEZeBliL7Wd8dv1vtOAo1+71yWOt/6FnV2EWS6L3ZvODxxYprwRRFXAIt2XMtGbbF7 9NLKup8NPQvlHNPU+Nw3FY3x2XYNWD3zvQaUH/UJwnCxUlYrlBKXI7YCw1niJZcm9oXO 6y+RRNDcxRI2T8ciWlKYaPSq4ZFj3/cIcc2f4B3syBcH958H8cbGYLe6/7U082UhYRQF EV5RgXALuIyxdGICUQKJgAyVvNNuyFnzA20WrSNYvsjmDCJMQKR854Jxtwf9Bm37bX0q AilIgu7WPNXD0agi/nBQUfdja0q4SJypqKOooHJ+9s8lFkHZwkwyT2aPE9j3vyCEaBQ0 1IVQ== 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 x13si32694941pll.96.2019.04.10.13.16.12; Wed, 10 Apr 2019 13:16:28 -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 S1726664AbfDJUNt (ORCPT + 99 others); Wed, 10 Apr 2019 16:13:49 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:45625 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbfDJUNt (ORCPT ); Wed, 10 Apr 2019 16:13:49 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N5VXu-1gpg003t0s-016zjP; Wed, 10 Apr 2019 22:13:31 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , Vasily Gorbik , Masahiro Yamada , Philipp Rudo , Hendrik Brueckner , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] s390: boot, purgatory: pass $(CLANG_FLAGS) where needed Date: Wed, 10 Apr 2019 22:12:41 +0200 Message-Id: <20190410201300.3528984-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190410201300.3528984-1-arnd@arndb.de> References: <20190410201300.3528984-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:4kHQTeoWEX/56QzZgzt6tTms3ph0CUQzW12FyBpIJ84Jni675FW mkF2HJNWcb3v4VnA4F4MbSMOq+NKxTPxXKT0vsTiAjes3gXvv+p8AQYf/Zj914inJsaBWow yREn8pFQ02wO0h47ZB1jQWXjQ4YpXpkJmiXvbdmO9MG44t7uPrGZy5XwomUCCXIAhfgw6dZ a1632lEmWnIptJ67ouu/g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:7aGoQfQ823Y=:jfhcrSH+xbvajbrWaPWoEY pXJIfaeXHxA9yJGCDGLzJ+826OU8w2sM4h6Ak9A3o+aTZa+t1l+vlr++jLbADMBmeVxAK5W/k biFpWKa6RyBLarlfct8txKj+tdFQfFx2OI4iFDD1Os0bEEHsM8tBCZQijaDel7++B79zXt5Et jxlB8Kfn87+CbQR0KVe2kabP/RflSAhOBSNhlSXN1CuChkSaa4dyt256WSBhreINVwRWMhF05 J4fEhXDntkeNlNoNGUjtye9/IwBiIe3LkQzG2ZsfruiB2Q+lvQsiDaC478ETH1reFyFFBX2ZX x6mmWjThpacJxJmbqSiR6xXK8krFraKcJgZuCO2Zz/BE86X7r4YkZQnnhcvTN14X0YpBTz1Gg XmT+SwBtU6x2jEU75lA1TUvkBvit1Ahpimm/WgH37R99L/c6nj6BM3ED/cp3zgnx+3zQ6TXjd SAL8wy85c5o7vTl+9RdMYvkWeZqjOFIb6bTsGhpdzfHOsauBTH8M7pMK8UuRAqY+XoLQ7JN6D YW8JXdHoSx91sR+D40UodZ169kLNGYiOdFHm4AQmyfnGuSqwSiiMonavaaIwSBcD50b5h11tB 2cRUoh+bfcyCkKyM/gtr6UCnPBgnqAXgAe24YP9cNQHLbHvaXmaDEiN5ptg42A6QdXkB29AbP F+mmCBkbCNOU9JIF2pkX8WrExBYjtGl3sfT4JlAsHMZ7+Ml5tWedAjS4IyHvk+Ac2lg0fN+jm JqWdkW1OX/jkAI9tuANctyTMBn05n4PP1v9Q4g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The purgatory and boot Makefiles do 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. Add $(CLANG_FLAGS) everywhere so we pass the correct --target=s390x-linux option when cross-compiling. Signed-off-by: Arnd Bergmann --- arch/s390/Makefile | 5 +++-- arch/s390/purgatory/Makefile | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 9c079a506325..443990791099 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -17,12 +17,13 @@ KBUILD_CFLAGS_MODULE += -fPIC KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 aflags_dwarf := -Wa,-gdwarf-2 -KBUILD_AFLAGS_DECOMPRESSOR := -m64 -D__ASSEMBLY__ +KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) -KBUILD_CFLAGS_DECOMPRESSOR := -m64 -O2 +KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables +KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning,pointer-sign) KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-option,-ffreestanding) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,)) diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile index ce6a3f75065b..ecd0b3847fef 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 += $(CLANG_FLAGS) KBUILD_CFLAGS += $(call cc-option,-fno-PIE) KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS)) -- 2.20.0