Patch "tools/mm: fix undefined reference to pthread_once" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tools/mm: fix undefined reference to pthread_once

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tools-mm-fix-undefined-reference-to-pthread_once.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9e78e197885753b868ec109631e3f370999d794c
Author: Xie XiuQi <xiexiuqi@xxxxxxxxxx>
Date:   Thu Aug 31 11:42:05 2023 +0800

    tools/mm: fix undefined reference to pthread_once
    
    [ Upstream commit 7f33105cdd59a99d068d3d147723a865d10e2260 ]
    
    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@xxxxxxxxxxxxxxx
    Fixes: 97d5f2e9ee12 ("tools api fs: More thread safety for global filesystem variables")
    Signed-off-by: Xie XiuQi <xiexiuqi@xxxxxxxxxx>
    Acked-by: Ian Rogers <irogers@xxxxxxxxxx>
    Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/mm/Makefile b/tools/mm/Makefile
index 6c1da51f4177c..1c5606cc33346 100644
--- a/tools/mm/Makefile
+++ b/tools/mm/Makefile
@@ -8,8 +8,8 @@ TARGETS=page-types slabinfo page_owner_sort
 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)
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux