https://github.com/curl/curl/blob/master/configure.ac#:~:text=AC_CHECK_FUNC(pthread_create%2C%20%5BUSE_THREADS_POSIX,PTHREAD%3D%22%20%2Dpthread%22
In configure.ac (and the generated configure script) the -pthread flag gets appended to CFLAGS even in the case of IBM XLC compiler. The issue was experienced in AIX 7.1 with XLC version 11.1.
The -pthread flag has no meaning in XLC, and it's probably getting interpreted as -p (enable profiling) -t (list of toolchain programs to prepend the prefix specified by the -B flag to, i.e., 'a' for 'assembler', 'l' for 'linker', etc.), and then 'hread' is parsed as argument for -t (which is garbage, so the flag is simply discarded with a warning).
In discussion: https://curl.se/mail/lib-2019-03/0049.html a possible fix is proposed.
https://github.com/curl/curl/blob/master/configure.ac#:~:text=AC_CHECK_FUNC(pthread_create%2C%20%5BUSE_THREADS_POSIX,PTHREAD%3D%22%20%2Dpthread%22
In configure.ac (and the generated configure script) the -pthread flag gets appended to CFLAGS even in the case of IBM XLC compiler. The issue was experienced in AIX 7.1 with XLC version 11.1.
The -pthread flag has no meaning in XLC, and it's probably getting interpreted as -p (enable profiling) -t (list of toolchain programs to prepend the prefix specified by the -B flag to, i.e., 'a' for 'assembler', 'l' for 'linker', etc.), and then 'hread' is parsed as argument for -t (which is garbage, so the flag is simply discarded with a warning).
In discussion: https://curl.se/mail/lib-2019-03/0049.html a possible fix is proposed.