From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 426001386DC for ; Sun, 27 Jan 2013 12:34:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1883821C0A1; Sun, 27 Jan 2013 12:34:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D596D21C09D for ; Sun, 27 Jan 2013 12:34:22 +0000 (UTC) Received: from localhost (pc-234-79-101-190.cm.vtr.net [190.101.79.234]) (using SSLv3 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aballier) by smtp.gentoo.org (Postfix) with ESMTPSA id 390D633DB12; Sun, 27 Jan 2013 12:34:20 +0000 (UTC) Date: Sun, 27 Jan 2013 09:34:13 -0300 From: Alexis Ballier To: gentoo-dev@lists.gentoo.org Cc: mgorny@gentoo.org, amd64@gentoo.org, releng@gentoo.org, x11@gentoo.org Subject: Re: [gentoo-dev] [PATCH 2/5] Use explicit abi_* flags to select multilib targets. Message-ID: <20130127093413.6919d22b@gentoo.org> In-Reply-To: <1359238096-13232-3-git-send-email-mgorny@gentoo.org> References: <1359238096-13232-1-git-send-email-mgorny@gentoo.org> <1359238096-13232-3-git-send-email-mgorny@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.14; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 360b3a3f-72b6-4b98-a270-91b6392137eb X-Archives-Hash: dae2cc0b8a87c3a190149247ddf74587 Very nice work; +1 on everything, it seems we'll finally get serious and official multilib support after all those years. I'm looking forward to get this in three :) On Sat, 26 Jan 2013 23:08:13 +0100 Micha=C5=82 G=C3=B3rny wrote: [...] > # @FUNCTION: multilib_get_enabled_abis > # @DESCRIPTION: > @@ -49,9 +64,20 @@ MULTILIB_USEDEP=3D'multilib(-)?' > multilib_get_enabled_abis() { > debug-print-function ${FUNCNAME} "${@}" > =20 > - if use multilib; then > - get_all_abis > - else > + local supported_abis=3D$(get_all_abis) > + local i found > + for i in "${_MULTILIB_FLAGS[@]}"; do > + local abi=3D${i#*:} > + local flag=3D${i%:*} > + > + if has "${abi}" ${supported_abis} && use "${flag}"; > then > + echo "${abi}" > + found=3D1 > + fi > + done > + > + if [[ ! ${found} ]]; then > + debug-print "${FUNCNAME}: no ABIs enabled, fallback > to ${DEFAULT_ABI}" echo ${DEFAULT_ABI} > fi > } Just one thing here: I may have missed something, but how do you ensure the DEFAULT_ABI is last in the list ? It seems to me you rely on the order of _MULTILIB_FLAGS. I'd just skip it explicitly (if the corresponding useflag is enabled) and print DEFAULT_ABI at the end to be on the safe side, if it has been skipped. Alexis.