[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW5zwFQsOHLOQ9b9eCC6Lh+frtB_c6vTP2yjg=nrAUpSEQ@mail.gmail.com>
Date: Tue, 8 Feb 2022 09:58:18 -0800
From: Song Liu <song@...nel.org>
To: Paul Menzel <pmenzel@...gen.mpg.de>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Michael Ellerman <mpe@...erman.id.au>,
linuxppc-dev@...ts.ozlabs.org,
linux-raid <linux-raid@...r.kernel.org>,
Matt Brown <matthew.brown.dev@...il.com>,
open list <linux-kernel@...r.kernel.org>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] lib/raid6/test/Makefile: Use `$(pound)` instead of
`\#` for Make 4.3
On Tue, Feb 8, 2022 at 7:22 AM Paul Menzel <pmenzel@...gen.mpg.de> wrote:
>
> 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
> cp -f ../int.uc int.uc
> awk -f ../unroll.awk -vN=1 < int.uc > int1.c
> gcc -I.. -I ../../../include -g -O2 -c -o int1.o int1.c
> awk -f ../unroll.awk -vN=2 < int.uc > int2.c
> gcc -I.. -I ../../../include -g -O2 -c -o int2.o int2.c
> awk -f ../unroll.awk -vN=4 < int.uc > int4.c
> gcc -I.. -I ../../../include -g -O2 -c -o int4.o int4.c
> awk -f ../unroll.awk -vN=8 < int.uc > int8.c
> gcc -I.. -I ../../../include -g -O2 -c -o int8.o int8.c
> awk -f ../unroll.awk -vN=16 < int.uc > int16.c
> gcc -I.. -I ../../../include -g -O2 -c -o int16.o int16.c
> awk -f ../unroll.awk -vN=32 < int.uc > int32.c
> gcc -I.. -I ../../../include -g -O2 -c -o int32.o int32.c
> rm -f raid6.a
> ar cq raid6.a int1.o int2.o int4.o int8.o int16.o int32.o recov.o algos.o tables.o
> ranlib raid6.a
> gcc -I.. -I ../../../include -g -O2 -o raid6test test.c raid6.a
> /usr/bin/ld: raid6.a(algos.o):/dev/shm/linux/lib/raid6/test/algos.c:28: multiple definition of `raid6_call'; /scratch/local/ccIJjN8s.o:/dev/shm/linux/lib/raid6/test/test.c:22: first defined here
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:72: raid6test] Error 1
>
> 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@...il.com>
> Signed-off-by: Paul Menzel <pmenzel@...gen.mpg.de>
I removed all the "`", fixed some unwrapped commit log, shortened some lines
and applied the set to md-next. Please review that version and let me know if
anything need to change.
Thanks,
Song
Powered by blists - more mailing lists