Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/powerpc: Re-order *FLAGS to follow lib.mk

In some powerpc/ sub-folder Makefiles, CFLAGS are defined before lib.mk
include. Clean it up by re-ordering the flags to follow after the mk
include. This is needed to support sub-folders in powerpc/ buildable on
its own.

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240229093711.581230-1-maddy@linux.ibm.com

authored by

Madhavan Srinivasan and committed by
Michael Ellerman
37496845 29247de4

+45 -44
+2 -2
tools/testing/selftests/powerpc/benchmarks/Makefile
··· 4 4 5 5 TEST_FILES := settings 6 6 7 - CFLAGS += -O2 8 - 9 7 top_srcdir = ../../../../.. 10 8 include ../../lib.mk 9 + 10 + CFLAGS += -O2 11 11 12 12 $(TEST_GEN_PROGS): ../harness.c 13 13
+10 -10
tools/testing/selftests/powerpc/copyloops/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - # The loops are all 64-bit code 3 - CFLAGS += -m64 4 - CFLAGS += -I$(CURDIR) 5 - CFLAGS += -D SELFTEST 6 - CFLAGS += -maltivec 7 - CFLAGS += -mcpu=power4 8 - 9 - # Use our CFLAGS for the implicit .S rule & set the asm machine type 10 - ASFLAGS = $(CFLAGS) -Wa,-mpower4 11 - 12 2 TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \ 13 3 copyuser_p7_t0 copyuser_p7_t1 \ 14 4 memcpy_64_t0 memcpy_64_t1 memcpy_64_t2 \ ··· 10 20 11 21 top_srcdir = ../../../../.. 12 22 include ../../lib.mk 23 + 24 + # The loops are all 64-bit code 25 + CFLAGS += -m64 26 + CFLAGS += -I$(CURDIR) 27 + CFLAGS += -D SELFTEST 28 + CFLAGS += -maltivec 29 + CFLAGS += -mcpu=power4 30 + 31 + # Use our CFLAGS for the implicit .S rule & set the asm machine type 32 + ASFLAGS = $(CFLAGS) -Wa,-mpower4 13 33 14 34 $(OUTPUT)/copyuser_64_t%: copyuser_64.S $(EXTRA_SOURCES) 15 35 $(CC) $(CPPFLAGS) $(CFLAGS) \
+2 -2
tools/testing/selftests/powerpc/nx-gzip/Makefile
··· 1 - CFLAGS = -O3 -m64 -I./include -I../include 2 - 3 1 TEST_GEN_FILES := gzfht_test gunz_test 4 2 TEST_PROGS := nx-gzip-test.sh 5 3 6 4 include ../../lib.mk 5 + 6 + CFLAGS = -O3 -m64 -I./include -I../include 7 7 8 8 $(TEST_GEN_FILES): gzip_vas.c ../utils.c
+10 -10
tools/testing/selftests/powerpc/pmu/ebb/Makefile
··· 4 4 noarg: 5 5 $(MAKE) -C ../../ 6 6 7 - # The EBB handler is 64-bit code and everything links against it 8 - CFLAGS += -m64 9 - 10 - TMPOUT = $(OUTPUT)/TMPDIR/ 11 - # Toolchains may build PIE by default which breaks the assembly 12 - no-pie-option := $(call try-run, echo 'int main() { return 0; }' | \ 13 - $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -no-pie -x c - -o "$$TMP", -no-pie) 14 - 15 - LDFLAGS += $(no-pie-option) 16 - 17 7 TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \ 18 8 cycles_with_freeze_test pmc56_overflow_test \ 19 9 ebb_vs_cpu_event_test cpu_event_vs_ebb_test \ ··· 18 28 19 29 top_srcdir = ../../../../../.. 20 30 include ../../../lib.mk 31 + 32 + # The EBB handler is 64-bit code and everything links against it 33 + CFLAGS += -m64 34 + 35 + TMPOUT = $(OUTPUT)/TMPDIR/ 36 + # Toolchains may build PIE by default which breaks the assembly 37 + no-pie-option := $(call try-run, echo 'int main() { return 0; }' | \ 38 + $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -no-pie -x c - -o "$$TMP", -no-pie) 39 + 40 + LDFLAGS += $(no-pie-option) 21 41 22 42 $(TEST_GEN_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c \ 23 43 ebb.c ebb_handler.S trace.c busy_loop.S
+2 -2
tools/testing/selftests/powerpc/pmu/event_code_tests/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - CFLAGS += -m64 3 - 4 2 TEST_GEN_PROGS := group_constraint_pmc56_test group_pmc56_exclude_constraints_test group_constraint_pmc_count_test \ 5 3 group_constraint_repeat_test group_constraint_radix_scope_qual_test reserved_bits_mmcra_sample_elig_mode_test \ 6 4 group_constraint_mmcra_sample_test invalid_event_code_test reserved_bits_mmcra_thresh_ctl_test \ ··· 9 11 10 12 top_srcdir = ../../../../../.. 11 13 include ../../../lib.mk 14 + 15 + CFLAGS += -m64 12 16 13 17 $(TEST_GEN_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c ../sampling_tests/misc.h ../sampling_tests/misc.c
+2 -2
tools/testing/selftests/powerpc/pmu/sampling_tests/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - CFLAGS += -m64 3 - 4 2 TEST_GEN_PROGS := mmcr0_exceptionbits_test mmcr0_cc56run_test mmcr0_pmccext_test \ 5 3 mmcr0_pmcjce_test mmcr0_fc56_pmc1ce_test mmcr0_fc56_pmc56_test \ 6 4 mmcr1_comb_test mmcr2_l2l3_test mmcr2_fcs_fch_test \ ··· 9 11 10 12 top_srcdir = ../../../../../.. 11 13 include ../../../lib.mk 14 + 15 + CFLAGS += -m64 12 16 13 17 $(TEST_GEN_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c misc.c misc.h ../loop.S ../branch_loops.S
+2 -2
tools/testing/selftests/powerpc/primitives/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - CFLAGS += -I$(CURDIR) 3 - 4 2 TEST_GEN_PROGS := load_unaligned_zeropad 5 3 6 4 top_srcdir = ../../../../.. 7 5 include ../../lib.mk 6 + 7 + CFLAGS += -I$(CURDIR) 8 8 9 9 $(TEST_GEN_PROGS): ../harness.c
+2 -2
tools/testing/selftests/powerpc/security/Makefile
··· 5 5 6 6 top_srcdir = ../../../../.. 7 7 8 - CFLAGS += $(KHDR_INCLUDES) 9 - 10 8 include ../../lib.mk 9 + 10 + CFLAGS += $(KHDR_INCLUDES) 11 11 12 12 $(TEST_GEN_PROGS): ../harness.c ../utils.c 13 13
+2 -1
tools/testing/selftests/powerpc/signal/Makefile
··· 3 3 TEST_GEN_PROGS += sigreturn_kernel 4 4 TEST_GEN_PROGS += sigreturn_unaligned 5 5 6 - CFLAGS += -maltivec 7 6 $(OUTPUT)/signal_tm: CFLAGS += -mhtm 8 7 $(OUTPUT)/sigfuz: CFLAGS += -pthread -m64 9 8 ··· 10 11 11 12 top_srcdir = ../../../../.. 12 13 include ../../lib.mk 14 + 15 + CFLAGS += -maltivec 13 16 14 17 $(TEST_GEN_PROGS): ../harness.c ../utils.c signal.S
+5 -5
tools/testing/selftests/powerpc/stringloops/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - # The loops are all 64-bit code 3 - CFLAGS += -I$(CURDIR) 4 - 5 2 EXTRA_SOURCES := ../harness.c 6 3 7 4 build_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi) ··· 24 27 TEST_GEN_PROGS += strlen_32 25 28 endif 26 29 27 - ASFLAGS = $(CFLAGS) 28 - 29 30 top_srcdir = ../../../../.. 30 31 include ../../lib.mk 32 + 33 + # The loops are all 64-bit code 34 + CFLAGS += -I$(CURDIR) 35 + 36 + ASFLAGS = $(CFLAGS) 31 37 32 38 $(TEST_GEN_PROGS): $(EXTRA_SOURCES)
+2 -2
tools/testing/selftests/powerpc/switch_endian/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 TEST_GEN_PROGS := switch_endian_test 3 3 4 - ASFLAGS += -O2 -Wall -g -nostdlib -m64 5 - 6 4 EXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S 7 5 8 6 top_srcdir = ../../../../.. 9 7 include ../../lib.mk 8 + 9 + ASFLAGS += -O2 -Wall -g -nostdlib -m64 10 10 11 11 $(OUTPUT)/switch_endian_test: ASFLAGS += -I $(OUTPUT) 12 12 $(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S
+2 -2
tools/testing/selftests/powerpc/syscalls/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 TEST_GEN_PROGS := ipc_unmuxed rtas_filter 3 3 4 - CFLAGS += $(KHDR_INCLUDES) 5 - 6 4 top_srcdir = ../../../../.. 7 5 include ../../lib.mk 6 + 7 + CFLAGS += $(KHDR_INCLUDES) 8 8 9 9 $(TEST_GEN_PROGS): ../harness.c ../utils.c
+2 -2
tools/testing/selftests/powerpc/vphn/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 TEST_GEN_PROGS := test-vphn 3 3 4 - CFLAGS += -m64 -I$(CURDIR) 5 - 6 4 top_srcdir = ../../../../.. 7 5 include ../../lib.mk 6 + 7 + CFLAGS += -m64 -I$(CURDIR) 8 8 9 9 $(TEST_GEN_PROGS): ../harness.c 10 10