> 2019-12-01 Bruno Haible
>
> pthread-h: Fix link errors with --enable-threads=isoc on AIX.
This patch was not entirely correct. With --enable-threads=isoc --with-c++-tests
on AIX, I see a link error:
xlC -q64 -qthreaded -qtls-L/home/haible/prefix64/lib -o test-pthread-c++
test-pth
Some more link errors of this kind, this time when the gnulib-tool option
--with-c++-tests is used:
xlC -q64 -qthreaded -qtls-L/home/haible/prefix64/lib -o test-string-c++
test-string-c++.o test-string-c++2.o libtests.a ../gllib/libgnu.a libtests.a
ld: 0711-317 ERROR: Undefined symbol: .p
That was actually the second error I got. I had to work around this
first one to get to it:
$ /opt/IBM/xlC/16.1.0/bin/xlclang++ test.cc -I gnulib/import -I
../gnulib/import/
In file included from test.cc:2:
In file included from gnulib/import/stdlib.h:36:
In file included from /opt/IBM/xlC/16.1.0/
(tested on the GCC compile farm, gcc119, /opt/IBM/xlC/16.1.0/bin/xlclang++)
/opt/IBM/xlC/16.1.0/include2/c++/__bsd_locale_fallbacks.h:50:12:
error: no matching function for call to
'wcsnrtombs'
return wcsnrtombs(__dest, __src, __nwc, __len, __ps);
^~
/usr/include/wchar
On AIX, with --enable-threads=posix or no --enable-threads option, I'm
seeing a number of link errors:
xlc -q64 -qthreaded -qtls -g -L/home/haible/prefix64/lib -o test-set-mode-acl
test-set-mode-acl.o libtests.a ../gllib/libgnu.a libtests.a -lintl -lm -lm
-lm -lm -lm -lm -lm -lm -lm -lm
ld
Since support for GNU pth was removed, it can be assumed that the multithreading
library comes from the system, therefore no -rpath processing is required, and
therefore
$(LTLIBTHREAD) = $(LIBTHREAD)
and
$(LTLIBMULTITHREAD) = $(LIBMULTITHREAD).
2019-12-02 Bruno Haible
Simplify
On AIX, with --enable-threads=isoc+posix, I'm seeing this link error:
xlc -q64 -qthreaded -qtls -g -L/home/haible/prefix64/lib -o test-thread_self
test-thread_self.o libtests.a ../gllib/libgnu.a libtests.a
ld: 0711-317 ERROR: Undefined symbol: .pthread_self
ld: 0711-345 Use the -bloadmap or