Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5201359ybv; Mon, 17 Feb 2020 14:40:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwUOCAbhzJOcCA0DumbRQclFOB3I4VPbfS3/7iiZs9t5jo4ESJMvi5EEg9O7jiD5Q11t+dm X-Received: by 2002:a9d:69ce:: with SMTP id v14mr13936355oto.248.1581979231296; Mon, 17 Feb 2020 14:40:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581979231; cv=none; d=google.com; s=arc-20160816; b=vrvuW1QvFMu73Hz8+cn6biZ2bagbH3Bm9bCiggqr3GmNVdIwwdh/yqx36l2hPJMI5W c535JHaemjlEqC1etBM6K4VtotvcTKI647Vw86fsIOWeBLp/ja3ZgQpH4lQ9lUyOGQme jBW6SDjBF7WZZCr1CKK3PlTOQLHi84+0CemKdvv24xaxwGpcLelWPduhTSp2OmdNUjwH qQnNyfcRMEZk8P4lUnTo5Z3OOJZTNBvYSZ5lb9wrqEJPLHl/1ETlFhB6aUcM9PZxqIfs OSzZLrgmQMvrwEbSYm1HgRZ09FhqeH7bp5p0ESdIYq2+DmAxjPIqSAMAp/yR3lxVc2hi YVyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=76Z6CK20GgcJDSbhtaVsIFc+JofKd4d7bU36INZrWq8=; b=KARszFsYUASsVtIEjyUn4LbyvgZJFWkySReU+sYxDI0z3Yhfk1omtGeDiNkOMEQL4C q2MASHJmhE2x+ywfPZObcwpc6elrxudxnxmNhV4BSn9ajpvAqtH6wNe+L7B74I/4ENGx 2Wnj0+XO02+cAArern2k3YMkL0HLn8YRW+px612KiSNCMj5y+cD27dLth1b9u7IheXDj DazWOfTqLZUiocrECccuxN7QJPHikV8Yh8gmZtn2aXIdpnFFxPBIhdDLSFiscNi7sNHm pUnHP2LWnyDPksoycFTIkkgu3q8IdWnV+6vY8XVaAL6aKPEET8Gb0ifPT85CWus+a1pF SwyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kxzPl+66; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si6805482oie.22.2020.02.17.14.40.18; Mon, 17 Feb 2020 14:40:31 -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=pass header.i=@linaro.org header.s=google header.b=kxzPl+66; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726054AbgBQWkG (ORCPT + 99 others); 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-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?