From patchwork Sun Nov 4 23:11:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 150125 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1945705ljp; Sun, 4 Nov 2018 15:12:09 -0800 (PST) X-Google-Smtp-Source: AJdET5cSfO8nL4P9TCn1Fjw5NGxUIiYX7/CSGxyqkDhIyCbdypc51yWCZZN16ghFcNa/JxY8Y9Op X-Received: by 2002:a17:902:bccc:: with SMTP id o12-v6mr15789318pls.281.1541373128951; Sun, 04 Nov 2018 15:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541373128; cv=none; d=google.com; s=arc-20160816; b=GxzsG24IplbhZAVoVRL/UgzH960vpQ1PflFfCTsqreRIn+u77sAvufD4f5mhtu56/P /ty6GXgqAeIPNEPpie9IYE9Jxq5vt6XVx9NcVCaK8loSI8kuptqtVO3OVNYhqBY/M0T5 OVFFzrEsaKp9ppuS6f9tvM9VUlMMdbyZl/rN1QoiieZ6DX0wXepui0RyyVnYkL3UXYey BadBx5xVdc6pvHJTR89Msuixb/fkPuUqH5/PVUMYmldvPXYeSTR6NGMzfZ22xrQSMFlN hokJOx8cIGh1Va0RKaSavwp85g28UntMbf7ik0ioQO9E06WaPhP2KnBmTdHwEbjTlLR3 l0fw== 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 :dkim-signature; bh=FYux4C2W77ompUQVjAbeAh3v7QT2cdZi06vXygmle5U=; b=QsBIxcZolpt+OZx8cxDU4QXawfMZowHuB7+4SByQswQlPMC120pB7P+73vjZtFzpMs AQOTzQD2rYysunlbpZsJkm+nKdYmvaT6+MHbiCRXBi1dm082V6bDJDqsDJLHzBfkHDLg HBE0G1By2xSjUUcU3Y/qLn4S8Lqe7gZ82NjqFGlWYaONUWrchudp0vPg9ummw8GwHTBI rX8kVqhHeu2NUVYMCvtJUXUQstelIH31FZMpDpMDaGcdyRpe+9TJnGRwQ+fjtQLwXPqP XZffBuYAINTwQulhFS+QnEsOaunoXtfydfEGz+baRP8M1W1qkTfidMrX93Il+NfbwvER Sxag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=X6v2TWnz; 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 d123-v6si39433843pgc.393.2018.11.04.15.12.08; Sun, 04 Nov 2018 15:12:08 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=X6v2TWnz; 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 S1730592AbeKEI2o (ORCPT + 32 others); Mon, 5 Nov 2018 03:28:44 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36638 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730484AbeKEI2o (ORCPT ); Mon, 5 Nov 2018 03:28:44 -0500 Received: by mail-pg1-f195.google.com with SMTP id z17-v6so3330895pgv.3; Sun, 04 Nov 2018 15:12:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FYux4C2W77ompUQVjAbeAh3v7QT2cdZi06vXygmle5U=; b=X6v2TWnzkxTvrtjhspedABX3+3IMc2u8jvE7A+YZLOcXW01H7Oh9o7TuZhFoHv0tyE yq/YwK+NniMGr9wnbckTEX0bRAg7Ffu8d29k6PGBgTgPsC0BakRjE9HNBCCNPm/6PF4A F0/2yNXJg2A8ZOHmg25yOb0gJVDz7lxRUwk9nG19M+biDg4mUqgLqit8gegZKCLBijAq hRQzefA7wYdGndb6gMg1AmTsOTUmmjypb+KbNFKo2Xpz100YNfKAXnniR+n1sgKu8xlc omr8KAPjbWlBJuMulPxaFIvLD+YLDjmsktcoRd5RzhQs7JG7Rxsx2DfojgCnOVRhjkmi 9KYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FYux4C2W77ompUQVjAbeAh3v7QT2cdZi06vXygmle5U=; b=MClhQBRB63nOHLVY7r/WCV0SZ1LAGwjqlDnQNYA71dT/Id+AQ8wjKsiBl9/ZqehJGz 7qYS6MD2t0la7vYBWPci/4L7G7eo4VCngqd6LCttvREk2lFjj2pa1W5hTr7lHjZYfxtT XeeagDRERHEDmvRL1LDxMutM4AnBlESbOn1cWFI2pjipo2knuJQW6Tbchl7QTtBUGL+u 67nxGE9WX2tJ4wkKny3D1xyvpiIsKiZwEvMHkEQcipiNDdvNh/T//TJiHn8kZfBwJica BD7YPa6ltuyg/8g+mvC5DxNA04St9uRZlnrkSLO+ULK/AoK71H5CuZ9EhcmE/kcR+BVq l/ng== X-Gm-Message-State: AGRZ1gIYq//lY3tm+u0lVbXLQ5SoWjVhimieQTx/LERhOkTxekZtSpj/ XYlU5t+nSmyGbLa9+khL/EU= X-Received: by 2002:a63:4e18:: with SMTP id c24-v6mr17877627pgb.6.1541373125365; Sun, 04 Nov 2018 15:12:05 -0800 (PST) Received: from aurora.jms.id.au (pa49-178-43-40.pa.nsw.optusnet.com.au. [49.178.43.40]) by smtp.gmail.com with ESMTPSA id v185-v6sm45133255pfv.48.2018.11.04.15.11.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 Nov 2018 15:12:04 -0800 (PST) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Mon, 05 Nov 2018 09:41:53 +1030 From: Joel Stanley To: Michael Ellerman , Nick Desaulniers Cc: Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 1/2] Makefile: Export clang toolchain variables Date: Mon, 5 Nov 2018 09:41:32 +1030 Message-Id: <20181104231133.30848-2-joel@jms.id.au> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181104231133.30848-1-joel@jms.id.au> References: <20181104231133.30848-1-joel@jms.id.au> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The powerpc makefile will use these in it's boot wrapper. Signed-off-by: Joel Stanley --- Makefile | 3 +++ 1 file changed, 3 insertions(+) -- 2.19.1 Tested-by: Daniel Axtens # powerpc 64-bit BE diff --git a/Makefile b/Makefile index 9aa352b38815..a2db3c885b38 100644 --- a/Makefile +++ b/Makefile @@ -495,6 +495,9 @@ endif ifneq ($(GCC_TOOLCHAIN),) CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) endif +export CLANG_TARGET +export CLANG_GCC_TC +export CLANG_PREFIX KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) From patchwork Sun Nov 4 23:11:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 150126 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1945818ljp; Sun, 4 Nov 2018 15:12:19 -0800 (PST) X-Google-Smtp-Source: AJdET5fWG4eSPbQkxTc0PCfNV0d10TTPWu4EDZZoDRCURlkm/aaUg6EUWCMblAyFDEPRNNLodqYP X-Received: by 2002:a17:902:7613:: with SMTP id k19-v6mr19533496pll.98.1541373138933; Sun, 04 Nov 2018 15:12:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541373138; cv=none; d=google.com; s=arc-20160816; b=x44qImocwd8or7kMVGMrfLAgPtrnKVWY82TItwOgCxTwdY9mszfPdH0cqSxofdBrwj CmHep8aIeAwjQr9ZwjKk/r1ja+iHG+Daw9fthwciq/VOLThD3ZocadKxr+5UXNpnJjG8 9Jm4pfMnkjS6QC23zO68xwvV0e1VsSDx+yNGfdYeftXt8X21jH7zdQr6hXikx+6zftNk JaW0wddvyflywRprSM/lI6RzUkvw498b92tlOtMUAdJVo/6RY1pk7Ig9KcZbeakyWfrA JqhUZN7TI3S6hoZxxgUzxqOSKFfDCO9r3vfMm9tMKzgcA84mng4TeaSE2Lj5PKQzaadI 6ASA== 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 :dkim-signature; bh=UpNAPKimz1my7YVFzTj+MgOPaV27toX8fTxUd9TBuTE=; b=L6O1YlDgFaKG4LHvUJL6mqIq2ejms2zgg1KfAaSxt4yLRxPX7OUpwa+Sx8NLKnn9Ku 0Q7vTiPNb/e2nS6+ywYo20R92QQfCpfxz/TDhk65Yva/Vk+KNzk7GsjaX8DjhJpHr8ny Zhg9NJbIdctbbKkOqWW9PDzpz0BJ9rL1qD/eJrQLBqUI8kK3OsnMFc5hrdonlYfQNO4u 2zpGdUljRWt4/mmk7EK+DLkNyXNvCWx/90m9AuGOJ/BGzDxR3kxZzY4ujNF4zzLGtzM0 HyHpk6BPDCmgqMHz7fID3Uwe0/f2cMhHDP8inqGSk9iBXpE+HfSW2s5n3wVpOf1hwLpe NhHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=jzgzJlJX; 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 p17-v6si41806105pgj.416.2018.11.04.15.12.18; Sun, 04 Nov 2018 15:12:18 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=jzgzJlJX; 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 S1730640AbeKEI2z (ORCPT + 32 others); Mon, 5 Nov 2018 03:28:55 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38028 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730484AbeKEI2y (ORCPT ); Mon, 5 Nov 2018 03:28:54 -0500 Received: by mail-pg1-f195.google.com with SMTP id f8-v6so3326487pgq.5; Sun, 04 Nov 2018 15:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UpNAPKimz1my7YVFzTj+MgOPaV27toX8fTxUd9TBuTE=; b=jzgzJlJX/qfXtaRGtaTlkLG1juQ+83tLMdAYz7BTO7biw8rUNMsz/upQxTFL6cuezV l1Uo4i+PkJ/T0q0E4zAdlHuctra15I9aREmowH/dIqqZuhABT7DbEIV9sVLkyJkkjzKY CCHg7zep0+GDimeKRdhPKauysEJh4l7mdI3/X5cUPzw3c1E6/rCey6LHok3pn3b+auS/ D6dAIHtuVJ8CseQe4TmOrGDJmH99ETXjC2kWSmORq4SU/hrR/1qkksBB1BKvjnRYM3+m IAfBnBYjLJVkBqRYF5INWOvut1BMn+tlxnT1wPQmET9GMNT5QA3tS8dTlHiA6npJeGkx kJvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=UpNAPKimz1my7YVFzTj+MgOPaV27toX8fTxUd9TBuTE=; b=hL+7mb8SJj96/haE/DrPFX23qx9VuA0PLpVM4SQt9BVIEDsL4BGhzfnau132MDQZF4 rN2QdlUTMBRms85far4XWKuPEa0GW7E0VDcWoRPGvtyw+/YEUjO8x1hGSx2ayqT6GEw3 MSMa3x45z+//Z+cmPVCV5HEVru8DwHbeLt094l/s3tTBF7PRvSP63ZMHj9MVqcZIsxml BCifoBQ0DRik3paL8GLwSLU0XGqspvEG5o9F7Huq0PYfL+ci1l5+Dwyeo/ulN/QhMAB7 VR3fkaBJ+YUuWar2BLlAwFDmta1GviLzgNIRfICFs5pJIF7fZ9e8rIYHpZhO1af4n8RA sVNg== X-Gm-Message-State: AGRZ1gLz89ULiMrY06OoPGsiHG6++SYCiC+/Yf+MDZLxWK51XHrPNZ0x ExilYh2n5AdrjfNODKZ1FqM= X-Received: by 2002:a62:5d49:: with SMTP id r70-v6mr20112960pfb.123.1541373135917; Sun, 04 Nov 2018 15:12:15 -0800 (PST) Received: from aurora.jms.id.au (pa49-178-43-40.pa.nsw.optusnet.com.au. [49.178.43.40]) by smtp.gmail.com with ESMTPSA id z8sm286467pgz.53.2018.11.04.15.12.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 Nov 2018 15:12:15 -0800 (PST) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Mon, 05 Nov 2018 09:42:04 +1030 From: Joel Stanley To: Michael Ellerman , Nick Desaulniers Cc: Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/2] powerpc/boot: Set target when cross-compiling for clang Date: Mon, 5 Nov 2018 09:41:33 +1030 Message-Id: <20181104231133.30848-3-joel@jms.id.au> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181104231133.30848-1-joel@jms.id.au> References: <20181104231133.30848-1-joel@jms.id.au> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang needs to be told which target it is building for when cross compiling. Link: https://github.com/ClangBuiltLinux/linux/issues/259 Signed-off-by: Joel Stanley --- arch/powerpc/boot/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.19.1 Tested-by: Daniel Axtens # powerpc 64-bit BE diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 39354365f54a..8fdb1890f09a 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -55,6 +55,13 @@ BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc BOOTARFLAGS := -cr$(KBUILD_ARFLAGS) +ifdef CONFIG_CC_IS_CLANG +BOOTCFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) +BOOTAFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) +BOOTCFLAGS += $(call cc-option, -no-integrated-as) +BOOTAFLAGS += $(call cc-option, -no-integrated-as) +endif + ifdef CONFIG_DEBUG_INFO BOOTCFLAGS += -g endif