* [PATCH v2 sched_ext/for-7.4] selftests/sched_ext: Drop -rdynamic and stop clobbering LDFLAGS
@ 2026-09-09 15:17 Cheng-Yang Chou
2026-09-09 17:52 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Cheng-Yang Chou @ 2026-09-09 15:17 UTC (permalink / raw)
To: sched-ext, Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
Cc: Ching-Chun Huang, Chia-Ping Tsai, chengyang.chou, Cheng-Yang Chou
CFLAGS passes the link-time flag -rdynamic to compile steps ($(CC) -c),
where it is unused. Under -Werror, Clang fails the build:
$ make CC=clang-21
clang-21: error: argument unused during compilation: '-rdynamic'
[-Werror,-Wunused-command-line-argument]
Nothing needs the exported symbols. Separately, LDFLAGS uses '=' rather
than '+=', discarding USERLDFLAGS from lib.mk.
Drop -rdynamic and append LDFLAGS with '+='. This fixes builds with
CC=clang-N while preserving USERLDFLAGS.
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
---
Changes in v2:
- Drop -rdynamic instead of moving it to LDFLAGS (Tejun Heo)
- Link to v1:
https://lore.kernel.org/r/20260908134722.8671-3-yphbchou0911@gmail.com/
tools/testing/selftests/sched_ext/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/sched_ext/Makefile b/tools/testing/selftests/sched_ext/Makefile
index 3cfe90e0f34f..5f5dd9ab903a 100644
--- a/tools/testing/selftests/sched_ext/Makefile
+++ b/tools/testing/selftests/sched_ext/Makefile
@@ -53,7 +53,7 @@ ifneq ($(wildcard $(GENHDR)),)
GENFLAGS := -DHAVE_GENHDR
endif
-CFLAGS += -g -O2 -rdynamic -pthread -Wall -Werror $(GENFLAGS) \
+CFLAGS += -g -O2 -pthread -Wall -Werror $(GENFLAGS) \
-I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR) \
-I$(TOOLSINCDIR) -I$(APIDIR) -I$(CURDIR)/include -I$(SCXTOOLSINCDIR)
@@ -62,7 +62,7 @@ ifneq ($(LLVM),)
CFLAGS += -Wno-unused-command-line-argument
endif
-LDFLAGS = -lelf -lz -lpthread -lzstd
+LDFLAGS += -lelf -lz -lpthread -lzstd
IS_LITTLE_ENDIAN = $(shell $(CC) -dM -E - </dev/null | \
grep 'define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__')
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2 sched_ext/for-7.4] selftests/sched_ext: Drop -rdynamic and stop clobbering LDFLAGS
2026-09-09 15:17 [PATCH v2 sched_ext/for-7.4] selftests/sched_ext: Drop -rdynamic and stop clobbering LDFLAGS Cheng-Yang Chou
@ 2026-09-09 17:52 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2026-09-09 17:52 UTC (permalink / raw)
To: Cheng-Yang Chou
Cc: sched-ext, David Vernet, Andrea Righi, Changwoo Min,
Ching-Chun Huang, Chia-Ping Tsai, chengyang.chou, Emil Tsalapatis,
linux-kernel
Hello,
Applied to sched_ext/for-7.4.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-09 18:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09 15:17 [PATCH v2 sched_ext/for-7.4] selftests/sched_ext: Drop -rdynamic and stop clobbering LDFLAGS Cheng-Yang Chou
2026-09-09 17:52 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox