From 4f351fefc18c4549399634f582bd0227fdbc07b8 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Thu, 2 Sep 2021 21:50:28 +0700 Subject: [PATCH 1/3] - fix iconv detection for boost.locale on iOS * clang-darwin doesn't need --start-group * clang-darwin doesn't need -lrt Signed-off-by: SSE4 --- src/tools/gcc.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 68f59479f3..761cdc28d7 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -393,7 +393,7 @@ local rule compile-link-flags ( * ) local bsd = [ MATCH ^(.*bsd)$ : $(all-os) ] ; threading-flags $(bsd) : -pthread ; - local no-threading = android beos haiku sgi darwin vxworks ; + local no-threading = android beos haiku sgi darwin vxworks iphone ; local threading-generic-os = [ set.difference $(all-os) : $(no-threading) $(bsd) windows cygwin solaris qnx ] ; threading-flags $(threading-generic-os) : -pthread : rt ; } @@ -880,7 +880,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 ] ; # 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 From 9a598657d75d0d1c975e34549be2c717dcd3da77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ferdinand=20Rivera=20Morell?= Date: Thu, 2 Sep 2021 10:16:11 -0500 Subject: [PATCH 2/3] Also need appletv to have the same excemption. `appletv` is another Xcode clang related platform that would have the same limitations. --- src/tools/gcc.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 761cdc28d7..69446db53c 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -393,7 +393,7 @@ local rule compile-link-flags ( * ) local bsd = [ MATCH ^(.*bsd)$ : $(all-os) ] ; threading-flags $(bsd) : -pthread ; - local no-threading = android beos haiku sgi darwin vxworks iphone ; + 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 +880,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 iphone ] ; + 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 From 210983f9af1e673da4406a54078e724cab98ad02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ferdinand=20Rivera=20Morell?= Date: Thu, 2 Sep 2021 23:32:52 -0400 Subject: [PATCH 3/3] Update src/tools/gcc.jam Co-authored-by: SSE4 --- src/tools/gcc.jam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 69446db53c..ff80610540 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -393,6 +393,8 @@ local rule compile-link-flags ( * ) local bsd = [ MATCH ^(.*bsd)$ : $(all-os) ] ; threading-flags $(bsd) : -pthread ; + # 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 ;