Patch "lib/raid6/test/Makefile: Use $(pound) instead of \# for Make 4.3" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    lib/raid6/test/Makefile: Use $(pound) instead of \# for Make 4.3

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     lib-raid6-test-makefile-use-pound-instead-of-for-mak.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a53263da104df97a4bc20aeacbb2ef38ba596991
Author: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
Date:   Tue Feb 8 16:21:48 2022 +0100

    lib/raid6/test/Makefile: Use $(pound) instead of \# for Make 4.3
    
    [ 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@xxxxxxxxx>
    Signed-off-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
    Signed-off-by: Song Liu <song@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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 <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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux