From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] buildroot-test: enable toolchains based on hostarch
Date: Thu, 31 Mar 2016 03:30:11 +0200 [thread overview]
Message-ID: <20160331033011.5c85f77f@free-electrons.com> (raw)
In-Reply-To: <CAFt09wPAQQBFHUq+EMZr1S3Ap6TeJ3vKyZg6nZayRuQLPyD8fg@mail.gmail.com>
Hello,
On Wed, 30 Mar 2016 20:24:49 -0500, Matthew Weber wrote:
> Updated to account for 'any' host arch.
>
> # ~2015 distros report x86 when on a 32bit install
> if hostarch == 'i686' or hostarch == 'i386' or hostarch == 'x86':
> hostarch = 'x86'
>
> for row in csv.reader(l):
> config = {}
> config["url"] = row[0]
> config["hostarch"] = row[1]
> # Ignore toolchains that are not built for the appropriate
> # host architecture
> if hostarch != 'x86_64' and hostarch != config["hostarch"] and
> config["hostarch"] != 'any' :
> continue
> # Assuming x86_64 can also execute x86 toolchains
> if hostarch == 'x86_64' and config["hostarch"] != 'x86' and
> config["hostarch"] != 'any':
> continue
> config["libc"] = row[2]
> with urlopen_closing(config["url"]) as r:
> config["contents"] = decode_byte_list(r.readlines())
> configs.append(config)
> return configs
Sounds good, but the conditions look complicated. What about something
like:
keep = False
# Keep all toolchain configs that work regardless of the host
# architecture
if config['hostarch'] == "any":
keep = True
# Keep all toolchain configs that can work on the current host
# architecture
if hostarch == config["hostarch"]:
keep = True
# Assume that x86 32 bits toolchains work on x86_64 build
# machines
if hostarch == 'x86_64' and config["hostarch"] == "x86":
keep = True
if not keep:
continue
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-03-31 1:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 1:47 [Buildroot] [PATCH 1/1] buildroot-test: enable toolchains based on hostarch Matt Weber
2016-03-30 14:55 ` Thomas Petazzoni
2016-03-31 0:41 ` Matthew Weber
2016-03-31 1:00 ` Thomas Petazzoni
2016-03-31 1:11 ` Matthew Weber
2016-03-31 1:24 ` Matthew Weber
2016-03-31 1:30 ` Thomas Petazzoni [this message]
2016-03-31 1:42 ` Matthew Weber
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=20160331033011.5c85f77f@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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