From patchwork Mon Apr 15 08:35:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 162177 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2648984jan; Mon, 15 Apr 2019 01:36:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQxoy2WjijIqT/8JwJw5dWAqvttckOYNd/t5x0D3z6QIAnueCXLlWDJx81FwGaYyfMdOPo X-Received: by 2002:a63:330e:: with SMTP id z14mr67206773pgz.4.1555317397240; Mon, 15 Apr 2019 01:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555317397; cv=none; d=google.com; s=arc-20160816; b=rU8x1NbXqTzeJIAof5H84hE3oU7OgfN4Pp1eP8OBv/1K+vqbSzQA/9KIo7e3ABR+qi Ae+pIP7i+jdS+cXEmNb1R+MZpEtQx5jsLJ8XdMYQasiaDq6s5QOS5ESNh/Du8gcK6r7V izOPXgOKZs0SBfZ4sliU1p8bPMcrLTFDIIEDU8fAyTsrTrpsQcNeYjT4Msp23aWN72vv RcdgQv15eARbzNYVOlem7BdZRx6wngI3H8MZpIWCIumP5RUb8qc7A0dzFRB5i/Rp2mSP ICNykPwi6NqM69cvpu97x/LM0Nq8xSm9uaKSNVtoNMnCS0wIbZikv3rqAJJ+MA54bXCD jbzQ== 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=FpCYWXlhiw+cuLHQkKmdmJPP28LeoNurbq/wXpatOlE=; b=cOlcVhZSDeojKINde8X69wEEEr/6equOqrShr+sIoLYfNIEaXdi93FtNydpDsaIt3c 88zSiRwAe+djKGx/iK+JX6EUfXYhE23ftx1eVvSvqosEMEyDHt6njyuTbwgafZnDCUC6 7qdIlc4eiVPFmp3VVxxXho1xzLnSruH/kJn0nHZdQOnI33Pu0MQOu+S67ez91uBPqc9e vlwuqvedn/hjDmLwdS7q5uxVULem4F2Zw7DwfYfIa2jT1ZZqlcmVBAbJ1QPB/xfu0IKA k+gqkC6QOUTyJM/F7JgwWXfmrCVKqAeZEA41yr3zRqHxW+2UzIZIpvRREsmbPcmiros3 q3ig== 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 f66si43580190pgc.400.2019.04.15.01.36.36; Mon, 15 Apr 2019 01:36:37 -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 S1726884AbfDOIgg (ORCPT + 30 others); Mon, 15 Apr 2019 04:36:36 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:43489 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfDOIgf (ORCPT ); Mon, 15 Apr 2019 04:36:35 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N3KkM-1gqCkt3REg-010P4b; Mon, 15 Apr 2019 10:36:25 +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 , Luc Van Oostenryck , Philipp Rudo , linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] s390: boot, purgatory: pass $(CLANG_FLAGS) where needed Date: Mon, 15 Apr 2019 10:35:52 +0200 Message-Id: <20190415083605.2560074-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190415083605.2560074-1-arnd@arndb.de> References: <20190415083605.2560074-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:DUi2IPPFGOns/G1VORQzsxkHqRzczPaTbKYAoZ7o/OXakm44zXP eaKkpkShSuEc7LVI69cqoE14avZgLTxGjwNUdvWZL0aK0BAJ/qv2kJosD3AVSO70/ESBwRB k8o+f3shUA/4DzJBj1gWTQgYO80Cfb6H5eOxdE2k1zEv7/WrPGJJJxgTVHMZrPn6EBu99PF ohQvRstqXApuk3gQc8DwQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:kAK0dNPU2So=:nuqkLmpBl3l/g/k3g7SmAx Pn9BWauQrxYbqCgfdqKjV8Wpaydz35/4Bm1qRyczvwDYQO7YnwmtLQgicp2oY9dWOFecrI3Ie BmexKQPttU3pE5R9HRglG12IdaOjB5HjY2yZFFc0f+7tjUbMiObayc8EOtdtI8OZKTXqYx3gd YDR43qwQ1Xoio0oEzJ+A47qaGxOxL+rJ5TLrW3JFRlDb4tqgumQ8ZtNUyhdGhq7g6Dzj9KSAg YdwtBuOCPXe4mtP2ew/e/gBUf856BaAJrwLKdY2degBLzsSnajKZK5o6VT1k/eQgXyrz41Z6+ Puqn0+q372nB/9hhvwzDYfo+PjMg7Al+WZzXmXWuC+gZzesrss1eDla3OwFCy/yjOb6WFUHys UrhhWDmtYRqKAg0GDMCWuFXLWQDlfXIpbJIhgzy6FdE1ySGGVq+rfJegxY19D3qGq7QPlVWpC SUC0zthRjzU01EOaFBVaAjYcVdcrpO+oMk1sG8rq04h6Xy2421uFonPj4z30j0yB36nXJF+6f nVecKDmiueLWOhozaVP1/47Io50EX7EcbzqqId03ectcY5yn3cgzpJw+ap0mvkIx9icGpbW2R ofXnjct91o9Lgc1Nnga6hKymIaGg6wqA0p3CO+6wfDTJEFH37pzpcf/8JQKbjAFdJCFR8TbKn 9Tz4Nh0e61kduoAmTbnpR3kVIaH0ZIQp4CXF8WdY23avUSCrxQQQB++vZe+8MDUAeOfqGANV5 yH/NKK4113sI+MteHmNc2C73HHd6AW61QquKsA== 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 | 4 ++-- arch/s390/purgatory/Makefile | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.20.0 Reviewed-by: Nathan Chancellor diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 9c079a506325..9a228786e34f 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -17,9 +17,9 @@ 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 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))