From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, willy@infradead.org,
irogers@google.com, xiexiuqi@huawei.com,
akpm@linux-foundation.org
Subject: + tools-mm-fix-undefined-reference-to-pthread_once.patch added to mm-hotfixes-unstable branch
Date: Sat, 02 Sep 2023 16:46:01 -0700 [thread overview]
Message-ID: <20230902234601.EF70BC433C7@smtp.kernel.org> (raw)
The patch titled
Subject: tools/mm: fix undefined reference to pthread_once
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
tools-mm-fix-undefined-reference-to-pthread_once.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/tools-mm-fix-undefined-reference-to-pthread_once.patch
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Xie XiuQi <xiexiuqi@huawei.com>
Subject: tools/mm: fix undefined reference to pthread_once
Date: Thu, 31 Aug 2023 11:42:05 +0800
Commit 97d5f2e9ee12 ("tools api fs: More thread safety for global
filesystem variables") introduces pthread_once, so the libpthread
should be added at link time, or we'll meet the following compile
error when 'make -C tools/mm':
gcc -Wall -Wextra -I../lib/ -o page-types page-types.c ../lib/api/libapi.a
~/linux/tools/lib/api/fs/fs.c:146: undefined reference to `pthread_once'
~/linux/tools/lib/api/fs/fs.c:147: undefined reference to `pthread_once'
~/linux/tools/lib/api/fs/fs.c:148: undefined reference to `pthread_once'
~/linux/tools/lib/api/fs/fs.c:149: undefined reference to `pthread_once'
~/linux/tools/lib/api/fs/fs.c:150: undefined reference to `pthread_once'
/usr/bin/ld: ../lib/api/libapi.a(libapi-in.o):~/linux/tools/lib/api/fs/fs.c:151:
more undefined references to `pthread_once' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:22: page-types] Error 1
Link: https://lkml.kernel.org/r/20230831034205.2376653-1-xiexiuqi@huaweicloud.com
Fixes: 97d5f2e9ee12 ("tools api fs: More thread safety for global filesystem variables")
Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tools/mm/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/tools/mm/Makefile~tools-mm-fix-undefined-reference-to-pthread_once
+++ a/tools/mm/Makefile
@@ -8,8 +8,8 @@ TARGETS=page-types slabinfo page_owner_s
LIB_DIR = ../lib/api
LIBS = $(LIB_DIR)/libapi.a
-CFLAGS += -Wall -Wextra -I../lib/
-LDFLAGS += $(LIBS)
+CFLAGS += -Wall -Wextra -I../lib/ -pthread
+LDFLAGS += $(LIBS) -pthread
all: $(TARGETS)
_
Patches currently in -mm which might be from xiexiuqi@huawei.com are
tools-mm-fix-undefined-reference-to-pthread_once.patch
reply other threads:[~2023-09-02 23:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230902234601.EF70BC433C7@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=willy@infradead.org \
--cc=xiexiuqi@huawei.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.