public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: aballier@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.
Date: Sun, 27 Jan 2013 14:36:36 +0100	[thread overview]
Message-ID: <20130127143636.72c66a73@pomiocik.lan> (raw)
In-Reply-To: <20130127093413.6919d22b@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1697 bytes --]

On Sun, 27 Jan 2013 09:34:13 -0300
Alexis Ballier <aballier@gentoo.org> wrote:

> 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 :)

I am writing some kind of spec/summary right now.

> On Sat, 26 Jan 2013 23:08:13 +0100
> Michał Górny <mgorny@gentoo.org> wrote:
> [...]
> >  # @FUNCTION: multilib_get_enabled_abis
> >  # @DESCRIPTION:
> > @@ -49,9 +64,20 @@ MULTILIB_USEDEP='multilib(-)?'
> >  multilib_get_enabled_abis() {
> >  	debug-print-function ${FUNCNAME} "${@}"
> >  
> > -	if use multilib; then
> > -		get_all_abis
> > -	else
> > +	local supported_abis=$(get_all_abis)
> > +	local i found
> > +	for i in "${_MULTILIB_FLAGS[@]}"; do
> > +		local abi=${i#*:}
> > +		local flag=${i%:*}
> > +
> > +		if has "${abi}" ${supported_abis} && use "${flag}";
> > then
> > +			echo "${abi}"
> > +			found=1
> > +		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.

That seems like a reasonable idea. I'd have a second and third look
at the function, and see if it wouldn't be better to just iterate over
$(get_all_abis) in the outer loop.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

  reply	other threads:[~2013-01-27 13:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26 22:08 [gentoo-dev] [PATCHES] x86 multilib flags, ver. 2 Michał Górny
2013-01-26 22:08 ` [gentoo-dev] [PATCH 1/5] Introduce a common function to obtain enabled ABIs Michał Górny
2013-01-26 22:08 ` [gentoo-dev] [PATCH 2/5] Use explicit abi_* flags to select multilib targets Michał Górny
2013-01-27 12:34   ` Alexis Ballier
2013-01-27 13:36     ` Michał Górny [this message]
2013-01-27 22:46     ` Michał Górny
2013-01-27 22:46       ` [gentoo-dev] [PATCH 1/2] Order ABIs following MULTILIB_ABIS Michał Górny
2013-01-27 22:46       ` [gentoo-dev] [PATCH 2/2] Add an assertion for valid ABI order Michał Górny
2013-01-27 23:27       ` [gentoo-dev] [PATCH 2/5] Use explicit abi_* flags to select multilib targets Alexis Ballier
2013-01-28  9:25         ` Michał Górny
2013-01-26 22:08 ` [gentoo-dev] [PATCH 3/5] Make ABI_X86 an USE_EXPAND, and mask them in global scope Michał Górny
2013-01-26 22:08 ` [gentoo-dev] [PATCH 4/5] Set multilib for (Linux) amd64 profile Michał Górny
2013-01-26 22:08 ` [gentoo-dev] [PATCH 5/5] Unmask and force the abi_x86_32 for uniform binary dependencies Michał Górny
2013-01-27 13:40 ` [gentoo-dev] [PATCHES] x86 multilib flags, ver. 2 Thomas Sachau
2013-01-29 17:22   ` Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130127143636.72c66a73@pomiocik.lan \
    --to=mgorny@gentoo.org \
    --cc=aballier@gentoo.org \
    --cc=amd64@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=releng@gentoo.org \
    --cc=x11@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox