On Thu, 2026-08-27 at 14:39 +0930, Joel Stanley wrote: > The CFLAGS are added to prerequisites, so if memory-sve causes a > build > of printf.o and boot.o, they will be compiled with -march=armv8.1- > a+sve > -O3, and the executables that link printf.o and boot.o after that > will > also get SVE instructions. > > https://www.gnu.org/software/make/manual/html_node/Suppressing-Inheritance.html > > By marking the rule 'private' printf.o and boot.o won't be built with > SVE, which avoids SVE for other binaries, and is okay for the memory- > sve > case. > > Signed-off-by: Joel Stanley <[email protected]>
Acked-by: Alistair Francis <[email protected]> Alistair > --- > tests/tcg/aarch64/Makefile.softmmu-target | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/tcg/aarch64/Makefile.softmmu-target > b/tests/tcg/aarch64/Makefile.softmmu-target > index 3f30be6c5d63..196a2afa50ee 100644 > --- a/tests/tcg/aarch64/Makefile.softmmu-target > +++ b/tests/tcg/aarch64/Makefile.softmmu-target > @@ -51,7 +51,7 @@ memory: CFLAGS+=-DCHECK_UNALIGNED=1 > memory-sve: memory.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) > $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) boot.o > > -memory-sve: CFLAGS+=-DCHECK_UNALIGNED=1 -march=armv8.1-a+sve -O3 > +memory-sve: private CFLAGS+=-DCHECK_UNALIGNED=1 -march=armv8.1-a+sve > -O3 > > gpc-test: gpc-test.c $(LINK_SCRIPT) vector_log_boot.o > $(MINILIB_OBJS) > $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) > vector_log_boot.o
