From patchwork Wed Sep 18 06:19:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 11149685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C70D1745 for ; Wed, 18 Sep 2019 06:20:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4AFE621A4C for ; Wed, 18 Sep 2019 06:20:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568787649; bh=ZhWGJHviykGXm5MHeLykQX57ZeW2tUGgrjClAnw/y6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mS2WlmqS2P4WlKZRXyWHLKHqSnU3zeubHhA3wNuFqZkN2hq52xRr61nNahnC0ABcz qk+d9wsPO68u5LuPTHShEk00amJeelPYGX6stE9dwDsZfvqT9iY7A829fvn/2NT2NK BnqUVl62e0SHXQ/Y6gYU/Vrg4yMrMvacTvA4QZhg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728802AbfIRGUs (ORCPT ); Wed, 18 Sep 2019 02:20:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:39778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728795AbfIRGUq (ORCPT ); Wed, 18 Sep 2019 02:20:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 BB6BB21925; Wed, 18 Sep 2019 06:20:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568787646; bh=ZhWGJHviykGXm5MHeLykQX57ZeW2tUGgrjClAnw/y6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TgWHw7Ed40LU1mIIgskX8eDF9gDXvx3W/oyY6OMOyIec0PYgHntCqjOjVaoopZL2u I9WzNNL5FhxgfvdJwVH1gSvuasBr4bPeBu6IPdfjr3GvCD90pXWLee2g5HLgrUdj8J L3ccRKrbkGd8co/pKGk3ZM3x6A/pDarob3A0bmxc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Burton , Kevin Hilman , Guenter Roeck , "Maciej W. Rozycki" , linux-mips@vger.kernel.org Subject: [PATCH 4.14 26/45] MIPS: VDSO: Use same -m%-float cflag as the kernel proper Date: Wed, 18 Sep 2019 08:19:04 +0200 Message-Id: <20190918061225.706824258@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190918061222.854132812@linuxfoundation.org> References: <20190918061222.854132812@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org From: Paul Burton commit 0648e50e548d881d025b9419a1a168753c8e2bf7 upstream. The MIPS VDSO build currently doesn't provide the -msoft-float flag to the compiler as the kernel proper does. This results in an attempt to use the compiler's default floating point configuration, which can be problematic in cases where this is incompatible with the target CPU's -march= flag. For example decstation_defconfig fails to build using toolchains in which gcc was configured --with-fp-32=xx with the following error: LDS arch/mips/vdso/vdso.lds cc1: error: '-march=r3000' requires '-mfp32' make[2]: *** [scripts/Makefile.build:379: arch/mips/vdso/vdso.lds] Error 1 The kernel proper avoids this error because we build with the -msoft-float compiler flag, rather than using the compiler's default. Pass this flag through to the VDSO build so that it too becomes agnostic to the toolchain's floating point configuration. Note that this is filtered out from KBUILD_CFLAGS rather than simply always using -msoft-float such that if we switch the kernel to use -mno-float in the future the VDSO will automatically inherit the change. The VDSO doesn't actually include any floating point code, and its .MIPS.abiflags section is already manually generated to specify that it's compatible with any floating point ABI. As such this change should have no effect on the resulting VDSO, apart from fixing the build failure for affected toolchains. Signed-off-by: Paul Burton Reported-by: Kevin Hilman Reported-by: Guenter Roeck Tested-by: Kevin Hilman Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Cc: Maciej W. Rozycki Cc: linux-mips@vger.kernel.org Cc: stable@vger.kernel.org # v4.4+ Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- arch/mips/vdso/Makefile | 1 + 1 file changed, 1 insertion(+) --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -8,6 +8,7 @@ ccflags-vdso := \ $(filter -E%,$(KBUILD_CFLAGS)) \ $(filter -mmicromips,$(KBUILD_CFLAGS)) \ $(filter -march=%,$(KBUILD_CFLAGS)) \ + $(filter -m%-float,$(KBUILD_CFLAGS)) \ -D__VDSO__ cflags-vdso := $(ccflags-vdso) \ $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \