[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: single-threaded optimizations
From: |
Paul Eggert |
Subject: |
Re: single-threaded optimizations |
Date: |
Sun, 7 Mar 2021 18:46:25 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 3/7/21 1:58 AM, Bruno Haible wrote:
The mbrtowc modules states:
Link:
$(LIB_MBRTOWC)
Thanks for explaining that. Over time Gnulib has evolved and 'tar'
hadn't caught up with all those Link: lines. So I just now added
$(LIB_ACL), $(LIB_GETRANDOM), $(LIB_HARD_LOCALE), $(LIB_HAS_ACL),
$(LIB_MBRTOWC), and $(LIB_SETLOCALE_NULL) to the tar linking instructions.
However, I have a new problem now. Even though 'tar' now defines
GNULIB_EXCLUDE_SINGLE_THREAD, GNULIB_MBRTOWC_SINGLE_THREAD,
GNULIB_REGEX_SINGLE_THREAD, and GNULIB_WCHAR_SINGLE_LOCALE, 'configure'
still unnecessarily arranges for GNU Tar to be linked with -lpthread,
because of these lines in src/Makefile:
LIB_HARD_LOCALE = -lpthread
LIB_MBRTOWC = -lpthread
LIB_SETLOCALE_NULL = -lpthread
I can work around this unnecessary dynamic dependency for GNU Tar by
removing $(LIB_HARD_LOCALE), $(LIB_MBRTOWC) and $(LIB_SETLOCALE_NULL)
from the tar linking instructions. But this seems brittle, as these
$(LIB_...) macros might expand to something other than a threading
library in the future. Is there a better way?