android_kernel_xiaomi_sm7250/lib/raid6
Paul Menzel 36b6b62b69 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 9564a8cf42 ("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>
2022-04-15 14:14:54 +02:00
..
test lib/raid6/test/Makefile: Use $(pound) instead of \# for Make 4.3 2022-04-15 14:14:54 +02:00
.gitignore lib/raid6/altivec: Add vpermxor implementation for raid6 Q syndrome 2018-03-20 16:47:25 +11:00
algos.c powerpc updates for 4.17 2018-04-07 12:08:19 -07:00
altivec.uc lib/raid6: Build proper raid6test files on powerpc 2018-03-20 16:47:52 +11:00
avx2.c lib/raid6: Add AVX2 optimized xor_syndrome functions 2016-11-07 15:08:20 -08:00
avx512.c lib/raid6: align AVX512 constants to 512 bits, not bytes 2017-08-25 10:21:47 -07:00
int.uc md/raid6 algorithms: xor_syndrome() for generic int 2015-04-22 08:00:42 +10:00
Makefile ARM: 8833/1: Ensure that NEON code always compiles with Clang 2019-04-05 22:33:08 +02:00
mktables.c lib/raid6: Add log-of-2 table for RAID6 HW requiring disk position 2017-05-16 10:01:57 +05:30
mmx.c md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
neon.c md/raid6: delta syndrome for ARM NEON 2015-08-31 19:29:05 +02:00
neon.uc lib/raid6: use vdupq_n_u8 to avoid endianness warnings 2020-04-23 10:30:15 +02:00
recov_avx2.c x86/raid6: correctly check for assembler capabilities 2015-02-04 08:35:51 +11:00
recov_avx512.c lib/raid6: Add AVX512 optimized recovery functions 2016-09-21 09:09:44 -07:00
recov_neon_inner.c lib/raid6: use vdupq_n_u8 to avoid endianness warnings 2020-04-23 10:30:15 +02:00
recov_neon.c md/raid6: implement recovery using ARM NEON intrinsics 2017-08-09 18:52:07 +01:00
recov_s390xc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
recov_ssse3.c x86/raid6: correctly check for assembler capabilities 2015-02-04 08:35:51 +11:00
recov.c lib/raid6: fix sparse warnings in recovery functions 2012-05-28 14:10:22 +10:00
s390vx.uc RAID/s390: Remove VLA usage 2018-07-04 08:37:50 +02:00
sse1.c md/raid6 algorithms: delta syndrome functions 2015-04-22 08:00:41 +10:00
sse2.c treewide: Align function definition open/close braces 2018-03-26 11:13:09 +02:00
unroll.awk lib: raid6: fix awk build warnings 2019-12-17 20:34:51 +01:00
vpermxor.uc lib/raid6/altivec: Add vpermxor implementation for raid6 Q syndrome 2018-03-20 16:47:25 +11:00
x86.h lib/raid6: Add AVX512 optimized gen_syndrome functions 2016-09-21 09:09:44 -07:00