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=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 72591C34022 for ; Mon, 17 Feb 2020 22:40:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4530920718 for ; Mon, 17 Feb 2020 22:40:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kxzPl+66" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726091AbgBQWkG (ORCPT ); Mon, 17 Feb 2020 17:40:06 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:35386 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbgBQWkF (ORCPT ); Mon, 17 Feb 2020 17:40:05 -0500 Received: by mail-wr1-f65.google.com with SMTP id w12so21630048wrt.2 for ; Mon, 17 Feb 2020 14:40:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=76Z6CK20GgcJDSbhtaVsIFc+JofKd4d7bU36INZrWq8=; b=kxzPl+66GzU0tsmDlLsFrMwRER4GjmMjrCsQ8WBsJpK7WvBK66WgF+Za2d5YquYg0F 56RJP+B7UnTuynnPArjOIS1mmcoVxNYTlc14JckbL5FQk3LgaTbIghYssIHIN6EAxt+U t8iJ5dQuIFhTYJQhYFKFKc0tUg1isJ4xiyna6ZbcvPum0pst/kjre1zEdMQWE4DGB6Qx ywSlGjIKeXfeyfQuvaTNBYECdGcYQGdrc6GKo7gxv7XmTTW/Vv6OhAGMH8kp9Z+ytHGc 86TWTERacFcFKshU+EVa4AX9mCL/p8VC4HwrbpCPGflRZljZRLqzoRQLprmBJyPhQaMl 9QWQ== 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:from:date :message-id:subject:to:cc; bh=76Z6CK20GgcJDSbhtaVsIFc+JofKd4d7bU36INZrWq8=; b=pB20RDVAzF0Zg2wzyzyoZDKSbVyerJdbRb35+aj/mIMsMd+hkw+ggBBuCX2/QD8ce1 oZkNbXglYnbED2eizYB/SRYX/haEfruiH6dq2x8SM+vzwG/KSoJuKzNtWVgBtE/JxmgH cKA+dP3vT6oOgygLTrR1jJYwv3Dt8gAUFMfzMFRHIqXlfdqLuBJSuZK4mYo+dnZXgaqA eXw9WCh2eSf6WwFIPt8qTzFdOmTdt9WFK3D6MSr6A7AhEQqyD+2nGl6KmC8vnAaw37NH AcGsIFcERRKc0Vo1+LvhKi1hxorvlL0A5FUobXCucxCrx2ZbR9kzW7htmli9dh77tU7F KgWw== X-Gm-Message-State: APjAAAUhh7Du+2p/fOquDlvSze7/aOgqEndv1v1uEoNUooMVXgLFGt6L sJIlgCl8FwI9X4Btl+gZcNxuYaY/NUDqEmuSr4IfsQ== X-Google-Smtp-Source: APXvYqwNZrDDXyuSSAFRXCKsy/wiMe0qfoB8DAfRSRnoO8OLRY0g8yoVJOVwgE7xeIdVzjRpZGxBZ5gLv8/0K5cJ2j4= X-Received: by 2002:a5d:6a4b:: with SMTP id t11mr24090235wrw.262.1581979204034; Mon, 17 Feb 2020 14:40:04 -0800 (PST) MIME-Version: 1.0 References: <20200213161614.23246-1-vincenzo.frascino@arm.com> <20200213161614.23246-20-vincenzo.frascino@arm.com> <20200213184454.GA4663@ubuntu-m2-xlarge-x86> <0cee3707-d526-3766-3dde-543c8dbd8e68@arm.com> <20200217164608.GA2708@willie-the-truck> In-Reply-To: <20200217164608.GA2708@willie-the-truck> From: Ard Biesheuvel Date: Mon, 17 Feb 2020 23:39:53 +0100 Message-ID: Subject: Re: [PATCH 19/19] arm64: vdso32: Enable Clang Compilation To: Will Deacon Cc: Vincenzo Frascino , Catalin Marinas , 0x7f454c46@gmail.com, linux-mips@vger.kernel.org, Thomas Gleixner , linux-arch , "the arch/x86 maintainers" , Russell King , clang-built-linux , Ingo Molnar , Arnd Bergmann , Will Deacon , Borislav Petkov , Andy Lutomirski , Nathan Chancellor , pcc@google.com, linux-arm-kernel , avagin@openvz.org, Stephen Boyd , Nick Desaulniers , Linux Kernel Mailing List , salyzyn@android.com, Paul Burton 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 Mon, 17 Feb 2020 at 17:46, Will Deacon wrote: > > On Mon, Feb 17, 2020 at 12:26:16PM +0000, Vincenzo Frascino wrote: > > On 13/02/2020 18:44, Nathan Chancellor wrote: > > > On Thu, Feb 13, 2020 at 04:16:14PM +0000, Vincenzo Frascino wrote: > > >> Enable Clang Compilation for the vdso32 library. > > > > [...] > > > > >> +LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc > > > > > > Well this is unfortunate :/ > > > > > > It looks like adding the --target flag to VDSO_LDFLAGS allows > > > clang to link the vDSO just fine although it does warn that -nostdinc > > > is unused: > > > > > > clang-11: warning: argument unused during compilation: '-nostdinc' > > > [-Wunused-command-line-argument] > > > > > > > This is why ended up in this "unfortunate" situation :) I wanted to avoid the > > warning. > > > > > It would be nice if the logic of commit fe00e50b2db8 ("ARM: 8858/1: > > > vdso: use $(LD) instead of $(CC) to link VDSO") could be adopted here > > > but I get that this Makefile is its own beast :) at the very least, I > > > think that the --target flag should be added to VDSO_LDFLAGS so that gcc > > > is not a requirement for this but I am curious if you tried that already > > > and noticed any issues with it. > > > > > > > --target is my preferred way as well, I can try to play another little bit with > > the flags and see what I can come up with in the next version. > > Yes, please. I'd even prefer the warning rather than silently assuming that > a cross gcc is kicking around on the path. > Doesn't Clang have -Qunused-arguments for that?