Skip to content

Commit 1cfab77

Browse files
authored
Merge pull request #283 from iv-m/fix-loonarch64-build
Fix ABI detection for empty 'os.platform'
2 parents bf043e3 + 63996e4 commit 1cfab77

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

boost-context-features.jam

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ feature.set-default binary-format : [ default_binary_format ] ;
3737
local rule default_abi ( )
3838
{
3939
local tmp = sysv ;
40+
41+
# Avoid using "in" operator here: it returns true if its left
42+
# part is empty, which happens e.g. with os.platform on
43+
# some uncommon architectures.
4044
if [ os.name ] = "NT" { tmp = ms ; }
4145
else if [ os.name ] = "CYGWIN" { tmp = ms ; }
42-
else if [ os.platform ] in "ARM" "ARM64" { tmp = aapcs ; }
46+
else if [ os.platform ] = "ARM" { tmp = aapcs ; }
47+
else if [ os.platform ] = "ARM64" { tmp = aapcs ; }
4348
else if [ os.platform ] = "MIPS32" { tmp = o32 ; }
4449
else if [ os.platform ] = "MIPS64" { tmp = n64 ; }
4550
return $(tmp) ;

0 commit comments

Comments
 (0)