From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF621C433DF for ; Thu, 23 Jul 2020 04:45:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DFE020768 for ; Thu, 23 Jul 2020 04:45:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rT2onajD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726032AbgGWEpU (ORCPT ); Thu, 23 Jul 2020 00:45:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgGWEpU (ORCPT ); Thu, 23 Jul 2020 00:45:20 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5CF0C0619DC; Wed, 22 Jul 2020 21:45:19 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id t131so4948154iod.3; Wed, 22 Jul 2020 21:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=90gci2CYuVeFvRuDOKJ8IZ7wmWfckk95B8pyfbNrP8I=; b=rT2onajDa5xZgllpEdCVeQNMCJ0bPaBbZB+eGVBLuQyicYUG44Bd/yFs0Es37OLPvg 4Yi1DqMudJEawaTnwtHpqcZD/55vtFbxEzOURogn3VR+TGVm80Pt9gZtXmagSfq4yE9Z NgPA4b8nSZRS/bLK0rYPFJ2JFaxR307EvV2WT2zKjpnkOz4MFAENe/5HPWnGgPgGnzqH tlk+nIX9h8DQE/S0BB6Qy5XK35Kg5Y54ure6vRddBPPLAYA1lGiwOOmZSD4nLoeI2X1l tbWgdBpTJq2ugYlGE5SURW2mWptIugxLyzxSgk6WDIPWqCrubfsXsfalZSi5BsTCTSR4 Djqg== 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:reply-to :from:date:message-id:subject:to:cc; bh=90gci2CYuVeFvRuDOKJ8IZ7wmWfckk95B8pyfbNrP8I=; b=eg1PalA3ePqJJ9SniOhda0dlW5noqLfDZxs5AWeL2EoKCqkLAq8rEYGU8woU3yTPs8 meFCOYNrPdAth0nbiR1j9uA5Ui6FsgI5NvXHxb5nWFR2lERJ1vG5HUtZmiuhv5I8I/wd xiSRxC5xjQVfzC6GeBoIEx1jnenL6fnfR5rb4ZMAcnKmankAwCdZFcKHjWIWIWssUeHI 9OUWU/rF5DdLV5sn6yYDPa3JyGGNBxIB4gJEwJB03sKOVXlUW7ekdXtxamn17i32Ay9K XW9WObynTe1+S8Ia2dedMdKx5B42Dqz0Z+66lw14IsfN54tZRlMq7nojtOj96BKmS7ox Q+HQ== X-Gm-Message-State: AOAM531rLOAmBLP4hlMpDii68j6lYK8I/BaK/M0TVImt+bFakwgEmjF7 tbe+Io6lswWYNQl+sgxx3XvUW4X4j4WBhJBKBxQ= X-Google-Smtp-Source: ABdhPJwELqlE6SY7KfgT4pn5Pqo+42cuA1/MPW/qJs0A5ybLi3p+cfBPZSB5yUzWNHekkQfPf6TaBeExb76QXJ/3YBw= X-Received: by 2002:a02:9469:: with SMTP id a96mr4168jai.121.1595479519517; Wed, 22 Jul 2020 21:45:19 -0700 (PDT) MIME-Version: 1.0 References: <20200723041509.400450-1-natechancellor@gmail.com> In-Reply-To: <20200723041509.400450-1-natechancellor@gmail.com> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Thu, 23 Jul 2020 06:45:07 +0200 Message-ID: Subject: Re: [PATCH] arm64: vdso32: Fix '--prefix=' value for newer versions of clang To: Nathan Chancellor Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Clang-Built-Linux ML , stable@vger.kernel.org, Masahiro Yamada 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 Thu, Jul 23, 2020 at 6:15 AM Nathan Chancellor wrote: > > Newer versions of clang only look for $(COMPAT_GCC_TOOLCHAIN_DIR)as [1], > rather than $(COMPAT_GCC_TOOLCHAIN_DIR)$(CROSS_COMPILE_COMPAT)as, > resulting in the following build error: > > $ make -skj"$(nproc)" ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \ > CROSS_COMPILE_COMPAT=arm-linux-gnueabi- LLVM=1 O=out/aarch64 distclean \ > defconfig arch/arm64/kernel/vdso32/ > ... > /home/nathan/cbl/toolchains/llvm-binutils/bin/as: unrecognized option '-EL' > clang-12: error: assembler command failed with exit code 1 (use -v to see invocation) > make[3]: *** [arch/arm64/kernel/vdso32/Makefile:181: arch/arm64/kernel/vdso32/note.o] Error 1 > ... > > Adding the value of CROSS_COMPILE_COMPAT (adding notdir to account for a > full path for CROSS_COMPILE_COMPAT) fixes this issue, which matches the > solution done for the main Makefile [2]. > [ CC Masahiro ] Masahiro added a slightly adapted version of [2] in . Shall this go through kbuild subsystem or folded into [1]? - Sedat - [1] https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=fixes&id=ca9b31f6bb9c6aa9b4e5f0792f39a97bbffb8c51 > [1]: https://github.com/llvm/llvm-project/commit/3452a0d8c17f7166f479706b293caf6ac76ffd90 > [2]: https://lore.kernel.org/lkml/20200721173125.1273884-1-maskray@google.com/ > > Cc: stable@vger.kernel.org > Link: https://github.com/ClangBuiltLinux/linux/issues/1099 > Signed-off-by: Nathan Chancellor > --- > arch/arm64/kernel/vdso32/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile > index d88148bef6b0..5139a5f19256 100644 > --- a/arch/arm64/kernel/vdso32/Makefile > +++ b/arch/arm64/kernel/vdso32/Makefile > @@ -14,7 +14,7 @@ COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit)) > COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..) > > CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%)) > -CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR) > +CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT)) > CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments > ifneq ($(COMPAT_GCC_TOOLCHAIN),) > CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN) > > base-commit: d15be546031cf65a0fc34879beca02fd90fe7ac7 > -- > 2.28.0.rc1 > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200723041509.400450-1-natechancellor%40gmail.com. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.0 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51D6DC433E1 for ; Thu, 23 Jul 2020 04:46:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 22E1920771 for ; Thu, 23 Jul 2020 04:46:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="F+/EG0SS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rT2onajD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22E1920771 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:Reply-To:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uTZyB0RgIpHFhsOCdj5yTWmSeJLy5SJVWQHbLpr5jDY=; b=F+/EG0SS8TfSrpCyW2s9LAQd8 QAuifvWjA5G9OF8CO933Myxkk7QZicwsKsbrYFmZoYDSICvIMutt912neD9ZEFvcm9bCoEkyi+/kO dV2bhrPPsWZokLjcj0LA7XQnY14N/R7kX49Qy3J1jetArM8pN8s5RVujL4C/WXNuPszxLkvrk7RjX z35NNMTucWEk7zqZIiAWXsDi5pmjk8+4sKxyUq6e7cUIYiAWYKg/oF1pAkvy13s6MLISsV1P7Vs7s YY/m5tomug4w6+W6CCBipWEGlcjqS2I05Wzm4XeXxD7Fltvis7ak33n+LWz9v6riD71TPJxMrWqXw poyyOXhRg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyT6j-0004Fv-EJ; Thu, 23 Jul 2020 04:45:25 +0000 Received: from mail-io1-xd44.google.com ([2607:f8b0:4864:20::d44]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyT6h-0004FQ-0c for linux-arm-kernel@lists.infradead.org; Thu, 23 Jul 2020 04:45:23 +0000 Received: by mail-io1-xd44.google.com with SMTP id c16so4936645ioi.9 for ; Wed, 22 Jul 2020 21:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=90gci2CYuVeFvRuDOKJ8IZ7wmWfckk95B8pyfbNrP8I=; b=rT2onajDa5xZgllpEdCVeQNMCJ0bPaBbZB+eGVBLuQyicYUG44Bd/yFs0Es37OLPvg 4Yi1DqMudJEawaTnwtHpqcZD/55vtFbxEzOURogn3VR+TGVm80Pt9gZtXmagSfq4yE9Z NgPA4b8nSZRS/bLK0rYPFJ2JFaxR307EvV2WT2zKjpnkOz4MFAENe/5HPWnGgPgGnzqH tlk+nIX9h8DQE/S0BB6Qy5XK35Kg5Y54ure6vRddBPPLAYA1lGiwOOmZSD4nLoeI2X1l tbWgdBpTJq2ugYlGE5SURW2mWptIugxLyzxSgk6WDIPWqCrubfsXsfalZSi5BsTCTSR4 Djqg== 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:reply-to :from:date:message-id:subject:to:cc; bh=90gci2CYuVeFvRuDOKJ8IZ7wmWfckk95B8pyfbNrP8I=; b=NMagQ78RrD4A1L4E5i5EzwupI2a1HM2r/MWILba6A92YebC/kY5f1Xq5xAP0pl1lVi KG3m6WapXV6pIkLf17gT1uklM11pzhYI3R1h1VtYsBc4UwJqE0+OrHBMz2QE9AlqDL9+ 1tmTgTtIl8C1+2GXvbWTm9g/z3o3c/scrp2I3eDAXAJluJnGdB+wke6UAuisSvlTlYa+ yDB8gywUyUYK3ILxg1yDRi2ImUzCtnPOr5wKTe7NL3twRe1WL+XqvrSdMJj3Fy73NArh bK9uLZK+8hTuey7URZ/qqUwm+H+qDpM8EDQfEx4AIT2RY+j7v1V/V37C2DfYN7ZyOdo2 Jdaw== X-Gm-Message-State: AOAM532rka6ZZkFznyFCL/oj0JO4A/UvDCUdBJfaBDJE/UhheArs1+Sd aRqx0GOk7yXzR1Efj9mUR7W45kt1MpVjIZDJMp0= X-Google-Smtp-Source: ABdhPJwELqlE6SY7KfgT4pn5Pqo+42cuA1/MPW/qJs0A5ybLi3p+cfBPZSB5yUzWNHekkQfPf6TaBeExb76QXJ/3YBw= X-Received: by 2002:a02:9469:: with SMTP id a96mr4168jai.121.1595479519517; Wed, 22 Jul 2020 21:45:19 -0700 (PDT) MIME-Version: 1.0 References: <20200723041509.400450-1-natechancellor@gmail.com> In-Reply-To: <20200723041509.400450-1-natechancellor@gmail.com> From: Sedat Dilek Date: Thu, 23 Jul 2020 06:45:07 +0200 Message-ID: Subject: Re: [PATCH] arm64: vdso32: Fix '--prefix=' value for newer versions of clang To: Nathan Chancellor X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200723_004523_097889_458040AE X-CRM114-Status: GOOD ( 20.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sedat.dilek@gmail.com Cc: Masahiro Yamada , Catalin Marinas , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Clang-Built-Linux ML , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 23, 2020 at 6:15 AM Nathan Chancellor wrote: > > Newer versions of clang only look for $(COMPAT_GCC_TOOLCHAIN_DIR)as [1], > rather than $(COMPAT_GCC_TOOLCHAIN_DIR)$(CROSS_COMPILE_COMPAT)as, > resulting in the following build error: > > $ make -skj"$(nproc)" ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \ > CROSS_COMPILE_COMPAT=arm-linux-gnueabi- LLVM=1 O=out/aarch64 distclean \ > defconfig arch/arm64/kernel/vdso32/ > ... > /home/nathan/cbl/toolchains/llvm-binutils/bin/as: unrecognized option '-EL' > clang-12: error: assembler command failed with exit code 1 (use -v to see invocation) > make[3]: *** [arch/arm64/kernel/vdso32/Makefile:181: arch/arm64/kernel/vdso32/note.o] Error 1 > ... > > Adding the value of CROSS_COMPILE_COMPAT (adding notdir to account for a > full path for CROSS_COMPILE_COMPAT) fixes this issue, which matches the > solution done for the main Makefile [2]. > [ CC Masahiro ] Masahiro added a slightly adapted version of [2] in . Shall this go through kbuild subsystem or folded into [1]? - Sedat - [1] https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=fixes&id=ca9b31f6bb9c6aa9b4e5f0792f39a97bbffb8c51 > [1]: https://github.com/llvm/llvm-project/commit/3452a0d8c17f7166f479706b293caf6ac76ffd90 > [2]: https://lore.kernel.org/lkml/20200721173125.1273884-1-maskray@google.com/ > > Cc: stable@vger.kernel.org > Link: https://github.com/ClangBuiltLinux/linux/issues/1099 > Signed-off-by: Nathan Chancellor > --- > arch/arm64/kernel/vdso32/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile > index d88148bef6b0..5139a5f19256 100644 > --- a/arch/arm64/kernel/vdso32/Makefile > +++ b/arch/arm64/kernel/vdso32/Makefile > @@ -14,7 +14,7 @@ COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit)) > COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..) > > CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%)) > -CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR) > +CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT)) > CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments > ifneq ($(COMPAT_GCC_TOOLCHAIN),) > CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN) > > base-commit: d15be546031cf65a0fc34879beca02fd90fe7ac7 > -- > 2.28.0.rc1 > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200723041509.400450-1-natechancellor%40gmail.com. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel