mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Build system adjustments for subarchs
Date: Wed, 14 Aug 2013 21:48:07 -0400	[thread overview]
Message-ID: <20130815014807.GU221@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAL3m8eCNKtvh9FGzp1AT_5bpDt37hh_fX3vw+WjktBmsb3nsiA@mail.gmail.com>

On Wed, Aug 14, 2013 at 07:55:25PM -0500, Strake wrote:
> On 13/08/2013, Rich Felker <dalias@aerifal.cx> wrote:
> > The current system searches for arch-specific asm in this order:
> >
> > 1. $(ARCH)$(ASMSUBARCH)/%.s, where ASMSUBARCH for the default subarch
> >    is not blank but rather a unique suffix (for plain arm, it's "el").
> >    This allows having asm that applies only to the default subarch but
> >    not others.
> >
> > 2. $(ARCH)/%.s, for shared asm used by all subarchs.
> >
> > 3. %.c, the C fallback (which is empty for code that cannot be
> >    implemented at all in C).
> 
> Another option:
> 
> Each arch has properties, which each take a value in a set; these sets
> are mutually exclusive, and all the values in each set have the same
> length. The properties have a well-defined order. The build system
> parses each directory name as an arch name and a list of properties,
> and chooses the most specific match; if no match, it uses the C code.

This would be nice, but as far as I can tell there's no simple way of
doing it without hard-coding the number of possible properties and
including a rule for each one in the makefile.

> > Unfortunately, this still provides no way to include asm that's used
> > by both soft and hardfloat little-endian, or both little- and
> > big-endian hardfloat, without having, for example:
> >
> > - armel/%.s and armhf/%.s as duplicate files or symlinked
> > - armhf/%.s and armebhf/%.s as duplicate files or symlinked
> 
> Thus arm would have 2 properties:
> byte order ∈ { "eb", "el" }
> float hardness ∈ { "hf", "sf" }
> 
> asm used by both soft- and hard-float little-endian: armel/%.s
> asm used by both little- and big-endian hard-float: armhf/%.s
> asm used by little-endian hard-float: armelhf/%.s

The system I ended up committing is not quite this logical, but it
admits a simple implementation and it's very flexible, allowing
arbitrary sharing and substitutions between subarchs.

Rich


  reply	other threads:[~2013-08-15  1:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14  1:06 Rich Felker
2013-08-14  1:16 ` Rich Felker
2013-08-14  1:42 ` Luca Barbato
2013-08-14  1:53   ` Rich Felker
2013-08-14  2:25 ` Rich Felker
2013-08-14  3:42   ` Rich Felker
2013-08-14  4:02     ` Rich Felker
2013-08-14 15:09       ` Szabolcs Nagy
2013-08-14 15:15         ` Rich Felker
2013-08-14 15:28           ` Luca Barbato
2013-08-15  0:55 ` Strake
2013-08-15  1:48   ` Rich Felker [this message]
2013-08-15 12:33 ` Rob Landley

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=20130815014807.GU221@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).