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 A3825C433DF for ; Thu, 23 Jul 2020 04:57:05 +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 6D2952068F for ; Thu, 23 Jul 2020 04:57:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FmcyaFEz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WGtj4Y5k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D2952068F 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=Qh7DxyxvSsR8zEMSgDQ3cr4V/7CZ1fknTIZanFBT/F4=; b=FmcyaFEzbkb/RyMaSLWZ+VpYr O4jVxpf/f5NZ5elA62HHoa5PZkeeblVaW+JgBZC1BtvSQ/3znFiBpPRCqf/3pF0LxWqWmGV2vaz6n HjAxWxs14if2h7WVc9blKyD2gwH7f51YOOpQmJcxmwK8a3Nzndai/0Ne52UJDWNX3TPbzarkf3rLD Hm2GVCc2TIdONFxAJwoXExt/POAUpGHtlcb8SpSWcUMOsDL8NZS0SlrM9vF7nC+K+UqF+s7KpsDhD KqzrGyWp9EAEvYNcGmgiClvzaJJEQq051ndvY2mgOnI5virfXUb/E1A67T/tQ1KzMjulLqn3CWm9e UDdSOVDkA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyTGg-0005Yw-4X; Thu, 23 Jul 2020 04:55:42 +0000 Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyTGd-0005Xx-3l for linux-arm-kernel@lists.infradead.org; Thu, 23 Jul 2020 04:55:40 +0000 Received: by mail-io1-xd42.google.com with SMTP id i4so4926018iov.11 for ; Wed, 22 Jul 2020 21:55:38 -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=9zEAOSiaWo87pEOphY61gvGs/JjkhFbMIfi5ABUGzWw=; b=WGtj4Y5kJzmpHHK0Iw1hC4SWsQxMJO+kdGfqc2CZ1JXxArziWRfJNjhjIq+s3CqLbm TwQlsoV1+AWikVkaUeCmZtkIKzs4YUuvnwmxQqJRh6An2Lxlw2ujCw5+p0ZrBBgR9R7G kigxyKkpThz9U+WjV/h1T3RDWfJoUNxPmG1blbfjygCwjWe9WhLTY3xXMNrXSkER+CNA R1CabZZjW6jqaEl2L2VGDLCgxKOFYHmKLc0i5wNJSmU1syDl185C8t10IBkJ1WaVxiBi jIoNs7rmlvymgZ4ftpT/3jfYKRuhW3yntGL8fcBsjTLaqEoc0ezOskYt/B1S7o36jeQ9 1LHA== 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=9zEAOSiaWo87pEOphY61gvGs/JjkhFbMIfi5ABUGzWw=; b=Eo3xiHkm6nZ6NQHuMx0kOj18U5KnWYGUATrsCulFmw0VvLWJJ2obmB7tTysLaumj0C ETn3hyYv7MmRuX9W3hC3zfuX4+NQaRyUvwnzCi+VXeC4XrCYUFGYMaP+loBIfCOd1bRh DGt/R6sf9yaPpplK2mlINF+1D+dshZm/SZwTZZcARDo3fNaWLF6GVQJPisVJzVvvGMpq LLWQCyfo4qq8IGD9uE2UKpEhjrLTOekAgldUlDFJZI9nCu7TPGag7HqoSk/yw3tm2hSy wDJKXMXjQqndrowErTiXwGIU0Uyu9FDVK6FQVc0yH/Z4p5x8oWHN1kBNV5V/LSmy7l4r qBDg== X-Gm-Message-State: AOAM5304aE54PR8TfUKPNcFMUqoNZQbj4Uwnfl8qtClujfqXTS0agK7/ LZKVsBpP1ya4GY9jq6IYuZrifiMPLnYOhPzQIEc= X-Google-Smtp-Source: ABdhPJy4z/uC9McqJCIkcLAG9o7Yy0ItmWLFR4Lg5zsXZsHsiNsx3zbjEJBOE5tTKiqpix/UMTHQi4VQl1eAG+bC9aQ= X-Received: by 2002:a6b:b4d1:: with SMTP id d200mr862526iof.70.1595480136862; Wed, 22 Jul 2020 21:55:36 -0700 (PDT) MIME-Version: 1.0 References: <20200723041509.400450-1-natechancellor@gmail.com> <20200723045145.GA448242@ubuntu-n2-xlarge-x86> In-Reply-To: <20200723045145.GA448242@ubuntu-n2-xlarge-x86> From: Sedat Dilek Date: Thu, 23 Jul 2020 06:55:25 +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_005539_163357_6F3EA91A X-CRM114-Status: GOOD ( 28.89 ) 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:51 AM Nathan Chancellor wrote: > > On Thu, Jul 23, 2020 at 06:45:07AM +0200, Sedat Dilek wrote: > > 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 > > Sorry, should have cc'd Masahiro, slipped my mind. > > Note, I kept this separate as the patches have to go back different > distances; only 5.7 has working clang support for vdso32, see > commit a5d442f50a41 ("arm64: vdso32: Enable Clang Compilation") in > Linus' tree, which appeared in 5.7-rc1 so this only needs to go into > linux-5.7.y. The main patch needs to back all the way to 4.4 so we would > need to drop this hunk when backporting, which would be annoying, as the > main patch backports cleanly to 4.9. > Clarify your patch by adding...? Cc: stable@vger.kernel.org # 5.7 > It could be routed via the kbuild tree but the arm64 maintainers are > pretty good at getting these fixes into the hands of Linus so I see no > reason to go around them. > As you and arm64 maintainers prefer. - Sedat - > Cheers, > Nathan > > > > [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