From: Cheng-Yang Chou <yphbchou0911@gmail.com>
To: sched-ext@lists.linux.dev, Tejun Heo <tj@kernel.org>,
David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>
Cc: Ching-Chun Huang <jserv@ccns.ncku.edu.tw>,
Chia-Ping Tsai <chia7712@gmail.com>,
chengyang.chou@mediatek.com,
Cheng-Yang Chou <yphbchou0911@gmail.com>
Subject: [PATCH 1/2] tools/sched_ext: Drop the no-op -rdynamic from CFLAGS
Date: Tue, 8 Sep 2026 21:47:08 +0800 [thread overview]
Message-ID: <20260908134722.8671-2-yphbchou0911@gmail.com> (raw)
In-Reply-To: <20260908134722.8671-1-yphbchou0911@gmail.com>
Because CFLAGS only applies to compilation ($(CC) -c), the link-time
flag -rdynamic is inert during the build. Schedulers do not rely on
exported dynamic symbols, and binaries remain byte-identical without it.
Under -Werror, Clang treats this unused argument as a build error:
$ make CC=clang-21
clang-21: error: argument unused during compilation: '-rdynamic'
[-Werror,-Wunused-command-line-argument]
Drop -rdynamic from CFLAGS to ensure clean builds across Clang versions.
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
---
tools/sched_ext/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/sched_ext/Makefile b/tools/sched_ext/Makefile
index 21554f0896923..70d2503b6b330 100644
--- a/tools/sched_ext/Makefile
+++ b/tools/sched_ext/Makefile
@@ -89,7 +89,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
--
2.43.0
next prev parent reply other threads:[~2026-09-08 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 13:47 [PATCH sched_ext/for-7.4 0/2] sched_ext: Clean up -rdynamic and LDFLAGS in Makefiles Cheng-Yang Chou
2026-09-08 13:47 ` Cheng-Yang Chou [this message]
2026-09-08 13:47 ` [PATCH 2/2] selftests/sched_ext: Move -rdynamic to LDFLAGS and append to it Cheng-Yang Chou
2026-09-08 17:09 ` Tejun Heo
2026-09-09 14:55 ` Cheng-Yang Chou
2026-09-08 17:09 ` [PATCH 1/2] tools/sched_ext: Drop the no-op -rdynamic from CFLAGS Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260908134722.8671-2-yphbchou0911@gmail.com \
--to=yphbchou0911@gmail.com \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=chengyang.chou@mediatek.com \
--cc=chia7712@gmail.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=void@manifault.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.