summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/fchmodat2/Makefile
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-06-20 23:02:22 +0300
committerJakub Kicinski <kuba@kernel.org>2024-06-20 23:49:59 +0300
commita6ec08beec9ea93f342d6daeac922208709694dc (patch)
treee14f4b7f0133e63a20a27baea37506abeba3bb95 /tools/testing/selftests/fchmodat2/Makefile
parenta012f9a752a5856b29610057c76079fbdbe02abf (diff)
parentd5a7fc58da039903b332041e8c67daae36f08b50 (diff)
downloadlinux-a6ec08beec9ea93f342d6daeac922208709694dc.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/ethernet/broadcom/bnxt/bnxt.c 1e7962114c10 ("bnxt_en: Restore PTP tx_avail count in case of skb_pad() error") 165f87691a89 ("bnxt_en: add timestamping statistics support") No adjacent changes. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/fchmodat2/Makefile')
-rw-r--r--tools/testing/selftests/fchmodat2/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/testing/selftests/fchmodat2/Makefile b/tools/testing/selftests/fchmodat2/Makefile
index 71ec34bf1501..4373cea79b79 100644
--- a/tools/testing/selftests/fchmodat2/Makefile
+++ b/tools/testing/selftests/fchmodat2/Makefile
@@ -1,6 +1,15 @@
# SPDX-License-Identifier: GPL-2.0-or-later
-CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined -static-libasan $(KHDR_INCLUDES)
+CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined $(KHDR_INCLUDES)
+
+# gcc requires -static-libasan in order to ensure that Address Sanitizer's
+# library is the first one loaded. However, clang already statically links the
+# Address Sanitizer if -fsanitize is specified. Therefore, simply omit
+# -static-libasan for clang builds.
+ifeq ($(LLVM),)
+ CFLAGS += -static-libasan
+endif
+
TEST_GEN_PROGS := fchmodat2_test
include ../lib.mk