mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
Commitb2d35fa5fc
("selftests: add headers_install to lib.mk") introduced a requirement that Makefiles more than one level below the selftests directory need to define top_srcdir, but it didn't update any of the powerpc Makefiles. This broke building all the powerpc selftests with eg: make[1]: Entering directory '/src/linux/tools/testing/selftests/powerpc' BUILD_TARGET=/src/linux/tools/testing/selftests/powerpc/alignment; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C alignment all make[2]: Entering directory '/src/linux/tools/testing/selftests/powerpc/alignment' ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory make[2]: *** No rule to make target '../../../../scripts/subarch.include'. make[2]: Failed to remake makefile '../../../../scripts/subarch.include'. Makefile:38: recipe for target 'alignment' failed Fix it by setting top_srcdir in the affected Makefiles. Fixes:b2d35fa5fc
("selftests: add headers_install to lib.mk") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
53 lines
1.7 KiB
Makefile
53 lines
1.7 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# The loops are all 64-bit code
|
|
CFLAGS += -m64
|
|
CFLAGS += -I$(CURDIR)
|
|
CFLAGS += -D SELFTEST
|
|
CFLAGS += -maltivec
|
|
CFLAGS += -mcpu=power4
|
|
|
|
# Use our CFLAGS for the implicit .S rule & set the asm machine type
|
|
ASFLAGS = $(CFLAGS) -Wa,-mpower4
|
|
|
|
TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \
|
|
copyuser_p7_t0 copyuser_p7_t1 \
|
|
memcpy_64_t0 memcpy_64_t1 memcpy_64_t2 \
|
|
memcpy_p7_t0 memcpy_p7_t1 \
|
|
copyuser_64_exc_t0 copyuser_64_exc_t1 copyuser_64_exc_t2
|
|
|
|
EXTRA_SOURCES := validate.c ../harness.c stubs.S
|
|
|
|
top_srcdir = ../../../../..
|
|
include ../../lib.mk
|
|
|
|
$(OUTPUT)/copyuser_64_t%: copyuser_64.S $(EXTRA_SOURCES)
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
|
-D COPY_LOOP=test___copy_tofrom_user_base \
|
|
-D SELFTEST_CASE=$(subst copyuser_64_t,,$(notdir $@)) \
|
|
-o $@ $^
|
|
|
|
$(OUTPUT)/copyuser_p7_t%: copyuser_power7.S $(EXTRA_SOURCES)
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
|
-D COPY_LOOP=test___copy_tofrom_user_power7 \
|
|
-D SELFTEST_CASE=$(subst copyuser_p7_t,,$(notdir $@)) \
|
|
-o $@ $^
|
|
|
|
# Strictly speaking, we only need the memcpy_64 test cases for big-endian
|
|
$(OUTPUT)/memcpy_64_t%: memcpy_64.S $(EXTRA_SOURCES)
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
|
-D COPY_LOOP=test_memcpy \
|
|
-D SELFTEST_CASE=$(subst memcpy_64_t,,$(notdir $@)) \
|
|
-o $@ $^
|
|
|
|
$(OUTPUT)/memcpy_p7_t%: memcpy_power7.S $(EXTRA_SOURCES)
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
|
-D COPY_LOOP=test_memcpy_power7 \
|
|
-D SELFTEST_CASE=$(subst memcpy_p7_t,,$(notdir $@)) \
|
|
-o $@ $^
|
|
|
|
$(OUTPUT)/copyuser_64_exc_t%: copyuser_64.S exc_validate.c ../harness.c \
|
|
copy_tofrom_user_reference.S stubs.S
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
|
-D COPY_LOOP=test___copy_tofrom_user_base \
|
|
-D SELFTEST_CASE=$(subst copyuser_64_exc_t,,$(notdir $@)) \
|
|
-o $@ $^
|