lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZOyZ9FgRUOGPh3qm@casper.infradead.org>
Date:   Mon, 28 Aug 2023 13:58:28 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Xie XiuQi <xiexiuqi@...weicloud.com>
Cc:     akpm@...ux-foundation.org, irogers@...gle.com, acme@...hat.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] tools/mm: fix undefined reference to pthread_once

On Mon, Aug 28, 2023 at 08:21:57PM +0800, Xie XiuQi wrote:
> diff --git a/tools/mm/Makefile b/tools/mm/Makefile
> index 6c1da51f4177..9997b2e401ae 100644
> --- a/tools/mm/Makefile
> +++ b/tools/mm/Makefile
> @@ -9,7 +9,7 @@ LIB_DIR = ../lib/api
>  LIBS = $(LIB_DIR)/libapi.a
>  
>  CFLAGS += -Wall -Wextra -I../lib/
> -LDFLAGS += $(LIBS)
> +LDFLAGS += $(LIBS) -lpthread

Is this the right fix?  I'm pretty sure you're suppose to use -pthread
in CFLAGS in case there are other things the compiler/linker/whatever
need.

'-pthread'
     Define additional macros required for using the POSIX threads
     library.  You should use this option consistently for both
     compilation and linking.  This option is supported on GNU/Linux
     targets, most other Unix derivatives, and also on x86 Cygwin and
     MinGW targets.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ