Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1980626pxb; Fri, 5 Mar 2021 04:41:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhSKyvg/9NolaY52MFyfdfs0ZHxauZ4bvkkJci15pKTLcE+wX0SyJLHUXN1wAb+dgXmjAE X-Received: by 2002:a17:906:3883:: with SMTP id q3mr2036169ejd.160.1614948101455; Fri, 05 Mar 2021 04:41:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614948101; cv=none; d=google.com; s=arc-20160816; b=0gK1a8jcGrz/pimkN2cNqDsBiSoR/7E1vJb1gtGjXhZEGjhYxlUmGANTHvQJYtrk2E xroREWZtJOg4VZWYZbqJeNX6gdZ8jgSjvcU/sTD4MSNIwuIEXR2dYsuXEqqaem6hSlPi G+/tVTDvGQlzmGRSotVCYsBRscjWFxk6ga6wNKRuDlBwwnZuS3ELLPx50LkoKpAq0fE8 GpZ/OMfTSXvLfYD2GmqWL5Q8qYb+JhVuKlYV1EkosRDvMpzvrQicbbwjqgA5Spvkbz7Q 9rCLuf9y2nEWBO7lzsgS7AStNVmbWxBpFSomJFGmanBT6409V1om4Ic70qiDvb+IlGkd u7DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sXUJs2QlP4yxbPfDzjDU8IFnOyuj8zE4D25p6sW+r+8=; b=ODbZSuoK/C7dmLzMLLjehPoI33GgKTQR4uGZ5U8usbYBCSQuqtKrAEltum+xbZkP2G hvk79Opstw0gPPO73v7FVFRdRIw5T1yKIirFZ6qiSqUX7/ZZeDpjZ3HslbTmqxGGn2pT lMjFl5QePesFWgLRgBBtztF1ONORCDSOh9Ga0sXcFB5QkKGHLHJZXNRrQg3yYNMKi1+q 9VNP0lsTL9vp6VJMeXT6O+ewUC3/pxTCGpc0qXeuPeBEr9i3VJlsdwoftGiHCS02/RqH WplMmwVQyfnvG+GVEKrRP0zYndaOGzgtOGysd7W2hkKcrehHnw/R818Brnn6Jjgqr/xt X1Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U7Df47di; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si1252800ejk.360.2021.03.05.04.41.18; Fri, 05 Mar 2021 04:41:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U7Df47di; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232956AbhCEMiX (ORCPT + 99 others); Fri, 5 Mar 2021 07:38:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:50370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233295AbhCEMh2 (ORCPT ); Fri, 5 Mar 2021 07:37:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C79CC64FF0; Fri, 5 Mar 2021 12:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614947848; bh=REp7H5p8IRHVqCJCTfbqYcUv2c+CstGSyLCle3paWm8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U7Df47diid+ZXWQMSjXUaxPH06YLSXDmlcy+2PFEVjPM1Z/1XGkTKM8d8xVXj2XCJ e7UIAEH62AoSYgp8ukjcVz6xS2sBawVIKNM+vGC2gKjMlcP0GtPBsghwRgnPpehTtK 2IYYgIzRCd0bL86uCzpwzJUossQgBHjhU4CCHwSE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anders Roxell , Nathan Chancellor , Thomas Bogendoerfer , Nathan Chancellor Subject: [PATCH 4.19 09/52] MIPS: VDSO: Use CLANG_FLAGS instead of filtering out --target= Date: Fri, 5 Mar 2021 13:21:40 +0100 Message-Id: <20210305120854.117213156@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305120853.659441428@linuxfoundation.org> References: <20210305120853.659441428@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor commit 76d7fff22be3e4185ee5f9da2eecbd8188e76b2c upstream. Commit ee67855ecd9d ("MIPS: vdso: Allow clang's --target flag in VDSO cflags") allowed the '--target=' flag from the main Makefile to filter through to the vDSO. However, it did not bring any of the other clang specific flags for controlling the integrated assembler and the GNU tools locations (--prefix=, --gcc-toolchain=, and -no-integrated-as). Without these, we will get a warning (visible with tinyconfig): arch/mips/vdso/elf.S:14:1: warning: DWARF2 only supports one section per compilation unit .pushsection .note.Linux, "a",@note ; .balign 4 ; .long 2f - 1f ; .long 4484f - 3f ; .long 0 ; 1:.asciz "Linux" ; 2:.balign 4 ; 3: ^ arch/mips/vdso/elf.S:34:2: warning: DWARF2 only supports one section per compilation unit .section .mips_abiflags, "a" ^ All of these flags are bundled up under CLANG_FLAGS in the main Makefile and exported so that they can be added to Makefiles that set their own CFLAGS. Use this value instead of filtering out '--target=' so there is no warning and all of the tools are properly used. Cc: stable@vger.kernel.org Fixes: ee67855ecd9d ("MIPS: vdso: Allow clang's --target flag in VDSO cflags") Link: https://github.com/ClangBuiltLinux/linux/issues/1256 Reported-by: Anders Roxell Signed-off-by: Nathan Chancellor Tested-by: Anders Roxell Signed-off-by: Thomas Bogendoerfer [nc: Fix conflict due to lack of 99570c3da96a and 076f421da5d4 in 4.19] Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- arch/mips/vdso/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -10,12 +10,9 @@ ccflags-vdso := \ $(filter -march=%,$(KBUILD_CFLAGS)) \ $(filter -m%-float,$(KBUILD_CFLAGS)) \ $(filter -mno-loongson-%,$(KBUILD_CFLAGS)) \ + $(CLANG_FLAGS) \ -D__VDSO__ -ifeq ($(cc-name),clang) -ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS)) -endif - cflags-vdso := $(ccflags-vdso) \ $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \ -O2 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \