forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/testing/selftests/powerpc/pmu/ebb/Makefile
....@@ -1,10 +1,19 @@
11 # SPDX-License-Identifier: GPL-2.0
2
+include ../../../../../../scripts/Kbuild.include
3
+
24 noarg:
35 $(MAKE) -C ../../
46
57 # The EBB handler is 64-bit code and everything links against it
68 CFLAGS += -m64
79
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
+
817 TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \
918 cycles_with_freeze_test pmc56_overflow_test \
1019 ebb_vs_cpu_event_test cpu_event_vs_ebb_test \