diff options
| author | Xie XiuQi <[email protected]> | 2023-08-31 03:42:05 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-09-05 17:13:45 +0000 |
| commit | 7f33105cdd59a99d068d3d147723a865d10e2260 (patch) | |
| tree | 225b0754cecad7a5ade81dbd78ab7d789af5bade /mm/vmalloc.c | |
| parent | memcontrol: ensure memcg acquired by id is properly set up (diff) | |
| download | kernel-7f33105cdd59a99d068d3d147723a865d10e2260.tar.gz kernel-7f33105cdd59a99d068d3d147723a865d10e2260.zip | |
tools/mm: fix undefined reference to pthread_once
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/[email protected]
Fixes: 97d5f2e9ee12 ("tools api fs: More thread safety for global filesystem variables")
Signed-off-by: Xie XiuQi <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/vmalloc.c')
0 files changed, 0 insertions, 0 deletions
