From 3a1f1ac547e33a28e05fa272e9b0f1beb5e53194 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 9 Jul 2026 10:48:03 +0200 Subject: [PATCH 1/2] Prefer target-os when detecting the default binary-format Signed-off-by: Uilian Ries --- boost-context-features.jam | 31 ++++++++++++++++++++++++------- build/Jamfile.v2 | 2 ++ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/boost-context-features.jam b/boost-context-features.jam index d0167fa5..b85bb11d 100644 --- a/boost-context-features.jam +++ b/boost-context-features.jam @@ -5,6 +5,7 @@ import feature ; import os ; +import property ; feature.feature segmented-stacks : on : optional propagated composite ; feature.compose on : BOOST_USE_SEGMENTED_STACKS ; @@ -15,14 +16,30 @@ feature.compose tsx : BOOST_USE_TSX ; feature.feature valgrind : on : optional propagated composite ; feature.compose on : BOOST_USE_VALGRIND ; -local rule default_binary_format ( ) +rule default_binary_format ( properties * ) { local tmp = elf ; - if [ os.name ] = "NT" { tmp = pe ; } - else if [ os.name ] = "CYGWIN" { tmp = pe ; } - else if [ os.name ] = "AIX" { tmp = xcoff ; } - else if [ os.name ] = "MACOSX" { tmp = mach-o ; } - return $(tmp) ; + local target-os = [ property.select : $(properties) ] ; + + if $(target-os) + { + if windows in $(properties) { tmp = pe ; } + else if cygwin in $(properties) { tmp = pe ; } + else if aix in $(properties) { tmp = xcoff ; } + else if darwin in $(properties) { tmp = mach-o ; } + else if iphone in $(properties) { tmp = mach-o ; } + else if appletv in $(properties) { tmp = mach-o ; } + else if watchos in $(properties) { tmp = mach-o ; } + # else: android, linux, freebsd, solaris, qnx, vxworks, ... -> elf + } + else + { + if [ os.name ] = "NT" { tmp = pe ; } + else if [ os.name ] = "CYGWIN" { tmp = pe ; } + else if [ os.name ] = "AIX" { tmp = xcoff ; } + else if [ os.name ] = "MACOSX" { tmp = mach-o ; } + } + return $(tmp) ; } feature.feature binary-format @@ -32,7 +49,7 @@ feature.feature binary-format xcoff : propagated ; -feature.set-default binary-format : [ default_binary_format ] ; +feature.set-default binary-format : elf ; local rule default_abi ( ) { diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 1ba8a52b..3315cb0d 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -14,10 +14,12 @@ import modules ; import os ; import toolset ; import config : requires ; +import boost-context-features ; project : common-requirements $(boost_dependencies) : requirements + @boost-context-features.default_binary_format windows,arm,64:winfib windows:_WIN32_WINNT=0x0601 linux,gcc,on:-fsplit-stack From 93cf80c535b30a997712be993d845a7969e87456 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Thu, 23 Jul 2026 07:41:41 +0200 Subject: [PATCH 2/2] Update Jamfile.v2 --- build/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 3315cb0d..3b04ce90 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -19,6 +19,7 @@ import boost-context-features ; project : common-requirements $(boost_dependencies) : requirements + @boost-context-features.default_abi @boost-context-features.default_binary_format windows,arm,64:winfib windows:_WIN32_WINNT=0x0601