Skip to content

Glibc version detection is broken for Clang #146

@Timmmm

Description

@Timmmm

TBB tries to detect the glibc version by looking at __GNUC__, __GNUC_MINOR__ etc. which is the version of GCC. However Clang always seems to set this to 4. The code notes this.

// note that when ICC or Clang is in use, __TBB_GCC_VERSION might not fully match
// the actual GCC version on the system.
#define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)

This is pretty annoying because GCC 4 is pretty ancient at this point, and you get warnings about deprecated functions if you try compiling the code with Clang.

Also there are proper macros for the glibc version now (easily since 6). See https://sourceforge.net/p/predef/wiki/Libraries/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions