Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5602824pxb; Mon, 28 Mar 2022 14:50:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUSlO0Haimvu0qNmqA2O7w3wLsZrEn4VwHHkIkYiXD1xctal5bJIXRZu1fBISLKySogcn7 X-Received: by 2002:a05:6102:366d:b0:320:dc46:bbaf with SMTP id bg13-20020a056102366d00b00320dc46bbafmr13466697vsb.1.1648504219074; Mon, 28 Mar 2022 14:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648504219; cv=none; d=google.com; s=arc-20160816; b=EcGgHT4n4w+aDTOXZwrcjb9jfVxFbDUSI/Sdx2N+kFlL5ewGS+2KB+CTuVBzeEYC7q a5/8LNCfKoTPn8cij1fm89Etu5gEhRiGuH4KXBRBCaADMHs1tKPhRH5zVAKdBRQD/5KK f2yyPb+r3rJBHL53WSuQBVu5QUXR+WQoXiG/SsYKcZ37EeJF3jeloZLVcVakeRk5mqp6 K8/qey6R4D/59qdK5bVyV3ezkCRAJZ8qDruGXDceXfcEntXbFkMVj7GZjV+fw1n4WjOd Y6S79FMkDpTy0lUZg+1ADWG9nb9zW756wKOw0CR5d9g9wjcAQJlw/ytz/b0aJ0VL7+/J OBaA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6w1eizfuQBFsk9xHtpWzJPN3Ms69TjrM1sL+k8GjCKs=; b=0id6rCEyF/0+Itifo9nMvowKvoS9VqFpf/Oz37accsP7zg63p6twBQLHEawWRM0s3y 3DnpOgL8SztV4LsN06XHn+fS9gtnkR+pOzagjTNQl8ShVbCMy1HudH+urdb4F574qdSv BNYHpcNNmrLvtGgjfvaLyHny35M944DExEzG6D5zXDp26EAiubEcQPlOMflT9peUQchv zmnOA6h8Zhjj6Cwx31juP8WzRsPiy89FqqsSibteUKnfM3C5vqt/Sh2vHEoo5HUYXnK7 s+3JzbjKka26EReeKFB5g+o/tD0r0INb6c+ZXr5Xd6GAInmWu10s4t2dZQnqE5IrH0OP jkCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Edo29wWs; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d10-20020ab030ea000000b0034c07a93af2si3161274uam.141.2022.03.28.14.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 14:50:19 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Edo29wWs; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 976EA12BF8E; Mon, 28 Mar 2022 14:21:58 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240787AbiC1LY3 (ORCPT + 99 others); Mon, 28 Mar 2022 07:24:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240918AbiC1LW5 (ORCPT ); Mon, 28 Mar 2022 07:22:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ADF5574AA; Mon, 28 Mar 2022 04:19:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 73599B8105D; Mon, 28 Mar 2022 11:19:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E64F0C340EC; Mon, 28 Mar 2022 11:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648466385; bh=A/hAMMRh3XJNdD9x1AAtbacK618VtXEYBp3Ix1ZXMfo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Edo29wWshR3KIyG3MHiaT9hq8u6O3DBpv/SYtATd1mk8R2XOcyi6iQt5A6j2PvZkq zDUzt2Fz8lsor01zpijauVFc/hDPhcM6Vf8XA4QJvzuUUpWxtBnix5TBkSnyXa7Q1r 1wbJ22ecN3qeUDVn6+JZxFyQei1/Dh4BfhcBRiZFfKFnjmgkgbAT9k0YMTyMYQuurP 2scWxsBXHoUnupiQMki8w5eRjzeFwj076JVrq7q2Me5Hd4POoD5wSoVSZtjNTOMZnr V5YhcgjhURCZPvPNuG+Rg2gp9F1WcEMtF+6RAYfwErDVZw4Lp0M9aY0zsphNgNSxOv Id7BHy24xyUDg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Paul Menzel , Matt Brown , Song Liu , Sasha Levin , ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH AUTOSEL 5.17 34/43] lib/raid6/test/Makefile: Use $(pound) instead of \# for Make 4.3 Date: Mon, 28 Mar 2022 07:18:18 -0400 Message-Id: <20220328111828.1554086-34-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220328111828.1554086-1-sashal@kernel.org> References: <20220328111828.1554086-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Menzel [ Upstream commit 633174a7046ec3b4572bec24ef98e6ee89bce14b ] Buidling raid6test on Ubuntu 21.10 (ppc64le) with GNU Make 4.3 shows the errors below: $ cd lib/raid6/test/ $ make :1:1: error: stray ‘\’ in program :1:2: error: stray ‘#’ in program :1:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ \ before ‘<’ token [...] The errors come from the HAS_ALTIVEC test, which fails, and the POWER optimized versions are not built. That’s also reason nobody noticed on the other architectures. GNU Make 4.3 does not remove the backslash anymore. From the 4.3 release announcment: > * WARNING: Backward-incompatibility! > Number signs (#) appearing inside a macro reference or function invocation > no longer introduce comments and should not be escaped with backslashes: > thus a call such as: > foo := $(shell echo '#') > is legal. Previously the number sign needed to be escaped, for example: > foo := $(shell echo '\#') > Now this latter will resolve to "\#". If you want to write makefiles > portable to both versions, assign the number sign to a variable: > H := \# > foo := $(shell echo '$H') > This was claimed to be fixed in 3.81, but wasn't, for some reason. > To detect this change search for 'nocomment' in the .FEATURES variable. So, do the same as commit 9564a8cf422d ("Kbuild: fix # escaping in .cmd files for future Make") and commit 929bef467771 ("bpf: Use $(pound) instead of \# in Makefiles") and define and use a $(pound) variable. Reference for the change in make: https://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b57 Cc: Matt Brown Signed-off-by: Paul Menzel Signed-off-by: Song Liu Signed-off-by: Sasha Levin --- lib/raid6/test/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile index a4c7cd74cff5..4fb7700a741b 100644 --- a/lib/raid6/test/Makefile +++ b/lib/raid6/test/Makefile @@ -4,6 +4,8 @@ # from userspace. # +pound := \# + CC = gcc OPTFLAGS = -O2 # Adjust as desired CFLAGS = -I.. -I ../../../include -g $(OPTFLAGS) @@ -42,7 +44,7 @@ else ifeq ($(HAS_NEON),yes) OBJS += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1 else - HAS_ALTIVEC := $(shell printf '\#include \nvector int a;\n' |\ + HAS_ALTIVEC := $(shell printf '$(pound)include \nvector int a;\n' |\ gcc -c -x c - >/dev/null && rm ./-.o && echo yes) ifeq ($(HAS_ALTIVEC),yes) CFLAGS += -I../../../arch/powerpc/include -- 2.34.1