---
 gx86/eclass/autotools-multilib.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gx86/eclass/autotools-multilib.eclass 
b/gx86/eclass/autotools-multilib.eclass
index f6d1feb..541e934 100644
--- a/gx86/eclass/autotools-multilib.eclass
+++ b/gx86/eclass/autotools-multilib.eclass
@@ -38,17 +38,19 @@ IUSE=multilib
 # @USAGE: argv...
 # @DESCRIPTION:
 # If multilib support is enabled, sets the toolchain up for each
-# supported ABI along with the ABI variable and correct
-# AUTOTOOLS_BUILD_DIR, and runs the given commands with them.
+# supported ABI along with the ABI variable and correct BUILD_DIR,
+# and runs the given commands with them.
 #
 # If multilib support is disabled, it just runs the commands. No setup
 # is done.
 autotools-multilib_foreach_abi() {
+       local initial_dir=${BUILD_DIR:-${S}}
+
        if use multilib; then
                local ABI
                for ABI in $(get_all_abis); do
                        multilib_toolchain_setup "${ABI}"
-                       AUTOTOOLS_BUILD_DIR=${S%%/}-${ABI} "${@}"
+                       BUILD_DIR=${initial_dir%%/}-${ABI} "${@}"
                done
        else
                "${@}"
-- 
1.8.0


Reply via email to