From patchwork Mon Nov 12 04:21:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 996263 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42td6W4WyMz9s4s for ; Mon, 12 Nov 2018 15:28:19 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aZmY98PQ"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42td6W338QzF3Bw for ; Mon, 12 Nov 2018 15:28:19 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aZmY98PQ"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::643; helo=mail-pl1-x643.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aZmY98PQ"; dkim-atps=neutral Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42tcz106C3zF3M6 for ; Mon, 12 Nov 2018 15:21:48 +1100 (AEDT) Received: by mail-pl1-x643.google.com with SMTP id n4-v6so3671707plp.2 for ; Sun, 11 Nov 2018 20:21:48 -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=0FWWRUwPZPf5wN0wtSRNRqcACmh2GKG5vi8Tr0gcNfI=; b=aZmY98PQb0RldgHAxuwhL46Le+nD2a1edqbVtacR9vAJSY+597Qfn/7sow4sFzptTh ZBPP5nNUtoa2ysWWmJtI9GdFdbdqYRydRe9SyibGOhkgLO0TPWOEW+jF4fnoaXMeE5DX Ayuape9EUDpCHNu1V2pK50OT6HmuX3Stug84qbCssg27/SJp+aBdMFuEz+y8r2lDt4I+ ge6gkSR/SlDXuIOkjuj+CCdg2tOXD7uKEVWsSzdA0KCpOlMDjF0qBHlDWmKa91p/fws8 fgvg/6GfGKxcGe9mtOV8COQW1qFUhZEfMzbbFmHfw6KRc4tUztnDPq1xJXx9g5ikKQcC eZ6g== 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=0FWWRUwPZPf5wN0wtSRNRqcACmh2GKG5vi8Tr0gcNfI=; b=BLLnO7DpTh8/PbxveaUITvXX8FdLNmLzfbN1c4DHasWlVyBXDckzmJDLJL+Zh8Is+z VmLF3IqpkwXVFQ0rhFvltEL2z22Luyd29s8RzXQTr2ylCPkDqF2eXEl2A4u0RVG2wiql o+8iwXnfG6ZbgXwkeqnQdsFqLnhKBusL3JXrNEDMr5NI4E4Gr2d/e3/qsgrLdX+VxIbV smJ19eZzuS8airnTnt7+sdIC8IqYRuhPHaO6/QOLQsteF84KPUF1JoiI1sdGVdmNYiXC fVbX2AtrDLrBg++YgSRamrcg3lO640QHCwQ/sukVgM4VsNs05mEimUchdPplWGgA6f6Z ++3Q== X-Gm-Message-State: AGRZ1gIq1qxPnrbhZU6Eg+nLYjt4JNccojLilh3rGZrSSAOjV/4yUgEz r7jIq71lkan5AT/RjLhlp6IA3Nav X-Google-Smtp-Source: AJdET5dQVMWY2bcx8C0tiCJpNGgtCnNjIZh+sr9a29jsOegEU3BkMnABYSVtPWP1A0v85Qu9FR6eqA== X-Received: by 2002:a17:902:1744:: with SMTP id i62-v6mr17717218pli.250.1541996506822; Sun, 11 Nov 2018 20:21:46 -0800 (PST) Received: from aurora.jms.id.au ([45.124.203.15]) by smtp.gmail.com with ESMTPSA id g123-v6sm3314835pfc.155.2018.11.11.20.21.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Nov 2018 20:21:46 -0800 (PST) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Mon, 12 Nov 2018 14:51:38 +1030 From: Joel Stanley To: Masahiro Yamada , Michael Ellerman Subject: [PATCH v2 2/2] powerpc/boot: Set target when cross-compiling for clang Date: Mon, 12 Nov 2018 14:51:16 +1030 Message-Id: <20181112042116.5271-3-joel@jms.id.au> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112042116.5271-1-joel@jms.id.au> References: <20181112042116.5271-1-joel@jms.id.au> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Marek , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Daniel Axtens Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 Acked-by: Michael Ellerman Reviewed-by: Nick Desaulniers --- arch/powerpc/boot/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 39354365f54a..111f97b1ccec 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -55,6 +55,11 @@ BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc BOOTARFLAGS := -cr$(KBUILD_ARFLAGS) +ifdef CONFIG_CC_IS_CLANG +BOOTCFLAGS += $(CLANG_FLAGS) +BOOTAFLAGS += $(CLANG_FLAGS) +endif + ifdef CONFIG_DEBUG_INFO BOOTCFLAGS += -g endif