stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	Matt Brown <matthew.brown.dev@gmail.com>,
	Song Liu <song@kernel.org>, Sasha Levin <sashal@kernel.org>,
	ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 12/16] lib/raid6/test/Makefile: Use $(pound) instead of \# for Make 4.3
Date: Mon, 28 Mar 2022 07:23:41 -0400	[thread overview]
Message-ID: <20220328112345.1556601-12-sashal@kernel.org> (raw)
In-Reply-To: <20220328112345.1556601-1-sashal@kernel.org>

From: Paul Menzel <pmenzel@molgen.mpg.de>

[ Upstream commit 633174a7046ec3b4572bec24ef98e6ee89bce14b ]

Buidling raid6test on Ubuntu 21.10 (ppc64le) with GNU Make 4.3 shows the
errors below:

    $ cd lib/raid6/test/
    $ make
    <stdin>:1:1: error: stray ‘\’ in program
    <stdin>:1:2: error: stray ‘#’ in program
    <stdin>: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 <matthew.brown.dev@gmail.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 b9e6c3648be1..98b9fd0354dd 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)
@@ -47,7 +49,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 <altivec.h>\nvector int a;\n' |\
+        HAS_ALTIVEC := $(shell printf '$(pound)include <altivec.h>\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


  parent reply	other threads:[~2022-03-28 11:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 11:23 [PATCH AUTOSEL 5.4 01/16] LSM: general protection fault in legacy_parse_param Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 02/16] gcc-plugins/stackleak: Exactly match strings instead of prefixes Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 03/16] pinctrl: npcm: Fix broken references to chip->parent_device Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 04/16] block, bfq: don't move oom_bfqq Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 05/16] selinux: use correct type for context length Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 06/16] loop: use sysfs_emit() in the sysfs xxx show() Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 07/16] Fix incorrect type in assignment of ipv6 port for audit Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 08/16] irqchip/qcom-pdc: Fix broken locking Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 09/16] irqchip/nvic: Release nvic_base upon failure Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 10/16] bfq: fix use-after-free in bfq_dispatch_request Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 11/16] ACPICA: Avoid walking the ACPI Namespace if it is not there Sasha Levin
2022-03-28 11:23 ` Sasha Levin [this message]
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 13/16] Revert "Revert "block, bfq: honor already-setup queue merges"" Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 14/16] ACPI/APEI: Limit printable size of BERT table data Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 15/16] PM: core: keep irq flags in device_pm_check_callbacks() Sasha Levin
2022-03-28 11:23 ` [PATCH AUTOSEL 5.4 16/16] spi: tegra20: Use of_device_get_match_data() Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220328112345.1556601-12-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.brown.dev@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=song@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).