My failed attempt follows.

 

rule default_abi ( properties * )

{

    local tmp = sysv ;

 

    if [ os.platform ] = "ARM" { tmp = aapcs ; }

    else if [ os.platform ] = "MIPS" { tmp = o32 ; }

    else if ( <target-os>vxworks in $(properties) )  { tmp = sysv ; }

    else if [ os.name ] = "NT" { tmp = ms ; }

    return $(tmp) ;

}

 

rule set_default_abi ( )

{

    local abi =   <conditional>@default_abi  ;

    return $(abi)  ;

}

 

feature.feature abi

   : aapcs

     eabi

     ms

     n32

     n64

     o32

     o64

     sysv

     x32

   : propagated

   ;

feature.set-default abi : [ set_default_abi ] ;