[Bug target/71749] New: Define _REENTRANT on ARC when -pthread is passed

thomas.petazzoni@free-electrons.com gcc-bugzilla@gcc.gnu.org
Mon Jul 4 08:49:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71749

            Bug ID: 71749
           Summary: Define _REENTRANT on ARC when -pthread is passed
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thomas.petazzoni@free-electrons.com
  Target Milestone: ---

Created attachment 38827
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38827&action=edit
Patch that defines _REENTRANT on ARC when -pthread is passed

When -pthread is passed, gcc should define _REENTRANT to make the C library use
reentrant version of various functions, and also because userspace code
sometimes checks _REENTRANT to decide if thread support is available or not
(see ax_pthread.m4 in autoconf-archive).

The attached patch makes sure _REENTRANT gets defined on ARC when -pthread is
specified.


More information about the Gcc-bugs mailing list