Skip to content

-pthread appended to CFLAGS even though the compiler is IBM XLC #8276

@dcassioli

Description

@dcassioli

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions