diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 68f59479f3..ff80610540 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -393,7 +393,9 @@ local rule compile-link-flags ( * ) local bsd = [ MATCH ^(.*bsd)$ : $(all-os) ] ; threading-flags $(bsd) : -pthread ; - local no-threading = android beos haiku sgi darwin vxworks ; + # iOS doesn't need pthread flag according to the https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/pthread.3.html + # The default system libraries include pthread functions. No additional libraries or CFLAGS are necessary to use this API. + local no-threading = android beos haiku sgi darwin vxworks iphone appletv ; local threading-generic-os = [ set.difference $(all-os) : $(no-threading) $(bsd) windows cygwin solaris qnx ] ; threading-flags $(threading-generic-os) : -pthread : rt ; } @@ -880,7 +882,7 @@ toolset.flags gcc.link.dll .IMPLIB-COMMAND cygwin : "-Wl,--out-implib # default - local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ; + local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux iphone appletv ] ; # Strip the binary when no debugging is needed. We use --strip-all flag # as opposed to -s since icc (intel's compiler) is generally # option-compatible with and inherits from the gcc toolset, but does not