.. | .. |
---|
1 | 1 | # SPDX-License-Identifier: GPL-2.0 |
---|
| 2 | +include ../../../../../../scripts/Kbuild.include |
---|
| 3 | + |
---|
2 | 4 | noarg: |
---|
3 | 5 | $(MAKE) -C ../../ |
---|
4 | 6 | |
---|
5 | 7 | # The EBB handler is 64-bit code and everything links against it |
---|
6 | 8 | CFLAGS += -m64 |
---|
7 | 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 | + |
---|
8 | 17 | TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \ |
---|
9 | 18 | cycles_with_freeze_test pmc56_overflow_test \ |
---|
10 | 19 | ebb_vs_cpu_event_test cpu_event_vs_ebb_test \ |
---|