Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4482835ybx; Mon, 4 Nov 2019 14:10:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzZqarhheabvnha327Ixsu7SMEGISz0wDsVRQ0bxlWpywBCm1B9s6I/Pmd4IFMXmO58aNhY X-Received: by 2002:aa7:db55:: with SMTP id n21mr23555622edt.113.1572905424016; Mon, 04 Nov 2019 14:10:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905424; cv=none; d=google.com; s=arc-20160816; b=SDs4qAWUWpy4wjuTqFCSmDYY5BlvP+JoxMWG320n2MGp6oP0NQyLWg6Er4duI83An1 IRYR+5eN1iU7fkuk4rTV3oUotkiRZNEIdcle+GZvTno8Uv6hHRRgE/tc4vGaSVZ/YGyF tbHcCrcfxQapDUNmqIBBrsB218CNaYw2CNYQlKrFXhcuxKgFWHYbGmnFOvKM3lFF73ZL XyBjbGZ3MAyHeaneuOrT3EYDr7QDuo3izdz10j5AGpvM7jh5gfaw+sD/kBHcXYzMLXsE gZQ+ThIAGQdKbzGeLj105rUiwxIbvf/K0QY5c755aGjPRUbzhMbG/KDKLwK2FPwtNzwu jLLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8Yka7JaRQUbTAXnpSgm3UPhKNougOdD1fVpIBju5P1Q=; b=lZo9CNhm+3zGDcyZlLpDglJc69uv6O/kOKmXXTeSVNE6cTafNmtd1B93MHu5LPU6kS 6nQT2Dhq/w8aNRSqUxyrYKRY2bDQxXyqkdcItd8Ov6HSeY/As4hLCNYIFkH6pEHiV+Eb Mmugkeaa6bvIbCrp5neLmWmmbk520LokS83LaXqtBW7AQa3/l8kxbCKaRse88q2VVDNB 26AUdku63g7aq91D53+trOwUUoH9UCXP3vmcx894Cn9l3pC2MJu9iv2JWJMPMOL3db/L gVr9whmY6ceOLZ24WhdjK7n2zF08Zt9tT3jmYHYT/1Q8QM2igavVK6W43lovima1CUJL nCKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HT1HHbKH; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ca22si5131035ejb.22.2019.11.04.14.10.01; Mon, 04 Nov 2019 14:10:24 -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=@kernel.org header.s=default header.b=HT1HHbKH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389759AbfKDWHz (ORCPT + 99 others); Mon, 4 Nov 2019 17:07:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:40554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390036AbfKDWHt (ORCPT ); Mon, 4 Nov 2019 17:07:49 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6DE4921929; Mon, 4 Nov 2019 22:07:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905268; bh=BlP8IYozOevQrxXlH5TJfSbvPd0H39Pymk/5eaQJdRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HT1HHbKHjAeC2pj7qU71OhokKDPEZcrr3qnTZyxMuIZFbtfi35UqaZuwD79HS8H5v 6KUwDPsIFIwBh6Y1iDkdfxFqG80vFmTxtG451AECGuErrYphzcrdz++jD72ZG7+JdQ rUzcjU8xySYCffLBC+pdy2GRwBlVOhvcT/cnUpRY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Catalin Marinas , Will Deacon , Sasha Levin Subject: [PATCH 5.3 050/163] arm64: vdso32: Dont use KBUILD_CPPFLAGS unconditionally Date: Mon, 4 Nov 2019 22:44:00 +0100 Message-Id: <20191104212143.810507927@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon [ Upstream commit c71e88c437962c1ec43d4d23a0ebf4c9cf9bee0d ] KBUILD_CPPFLAGS is defined differently depending on whether the main compiler is clang or not. This means that it is not possible to build the compat vDSO with GCC if the rest of the kernel is built with clang. Define VDSO_CPPFLAGS directly to break this dependency and allow a clang kernel to build a compat vDSO with GCC: $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \ CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- CC=clang \ COMPATCC=arm-linux-gnueabihf-gcc Acked-by: Catalin Marinas Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/vdso32/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 77aa613403747..aa171b043287b 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -25,11 +25,9 @@ cc32-as-instr = $(call try-run,\ # arm64 one. # As a result we set our own flags here. -# From top-level Makefile -# NOSTDINC_FLAGS -VDSO_CPPFLAGS := -nostdinc -isystem $(shell $(COMPATCC) -print-file-name=include) +# KBUILD_CPPFLAGS and NOSTDINC_FLAGS from top-level Makefile +VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc -isystem $(shell $(COMPATCC) -print-file-name=include) VDSO_CPPFLAGS += $(LINUXINCLUDE) -VDSO_CPPFLAGS += $(KBUILD_CPPFLAGS) # Common C and assembly flags # From top-level Makefile -- 2.20.1