Message ID | 20230629162301.1234157-2-bjorn@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Two cross-compilation kselftest fixes | expand |
diff --git a/tools/testing/selftests/openat2/Makefile b/tools/testing/selftests/openat2/Makefile index 843ba56d8e49..f13ad02a18ea 100644 --- a/tools/testing/selftests/openat2/Makefile +++ b/tools/testing/selftests/openat2/Makefile @@ -1,6 +1,13 @@ # SPDX-License-Identifier: GPL-2.0-or-later -CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined +# We need this for the "try-run" macro. +include ../../../build/Build.include + +CFLAGS += -Wall -O2 -g -fsanitize=address +CFLAGS += $(call try-run, \ + echo 'int main() {}' | $(CC) -fsanitize=undefined -x c - -o /dev/null, \ + -fsanitize=undefined,) + TEST_GEN_PROGS := openat2_test resolve_test rename_attack_test include ../lib.mk