mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Petr Hosek <phosek@chromium.org>
To: musl@lists.openwall.com
Subject: Re: Support for out-of-tree build
Date: Tue, 17 Nov 2015 22:15:29 +0000	[thread overview]
Message-ID: <CABBv4TYZUN1t+3kvQF9=Af9gDdrv=BgsYatErd4WDD50gyQwVg@mail.gmail.com> (raw)
In-Reply-To: <20151117220141.GD3818@brightrain.aerifal.cx>

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

Absolutely, that's probably the simplest solution in the sense that it
avoids using additional .mk/.sub files or complicated build-time logic.

If that's the solution we all agree on, I'd be happy to implement this as a
separate patch and then rebase the out-of-tree build patch on top of that.

On Tue, Nov 17, 2015 at 2:01 PM Rich Felker <dalias@libc.org> wrote:

> On Tue, Nov 17, 2015 at 09:37:37PM +0000, Petr Hosek wrote:
> > How would you express the fact that e.g. armhf subarch should use armel
> > implementation of memcpy.s?
>
> The point of the *.sub files is to define a mapping from a fully
> specific subarch (with 'default'/'empty' replaced with an explicit
> default; this is why configure sets ASMSUBARCH=el for plain arm) to
> the actual file to use, which is almost always going ot be shared
> between a number of subarchs when there's more than one 'dimension'
> involved.
>
> However there's no need for this mapping to be defined per-file. In
> reality it's sufficient to have a fixed fallback sequence. In the rare
> case where there were asm files that depended on endianness and
> hard/soft float in the same file, the fallback order would look
> something like (for le-hf):
>
>         le-hf le-any any-hf any-any
>
> But for our actual usage cases it suffices just to have:
>
>         le hf any
>
> However, at this point I'm strongly considering whether we should just
> do away with the subarch dirs entirely and use preprocessed asm or C
> with inline asm in their place. The one place this is mildly difficult
> is when only some of the subarchs want the asm at all, and others want
> the generic C. This is common for fenv.s and also applies to arm
> memcpy.s where we lack a big-endian variant.
>
> One possible solution would be to have (for example)
> src/string/arm/memcpy.c that just does
>
> #ifdef __ARMEB__
> #include <../memcpy.c>
> #endif
>
> and then put memcpy.S in arch/arm/src/ with #ifndef __ARMEB__ around
> the whole file.
>
> That would fully eliminate the subarch mess from the build system and
> leave us with a fixed fallback order for it to use:
>
> $(ARCH)/%.S
> $(ARCH)/%.s
> $(ARCH)/%.c
> %.S
> %.s
> %.c
>
> Currently the unadorned %.S/%.s is not needed, but I would consider
> adding it so we can put asm files in arch/$(ARCH)/src without needing
> dummy .c files for them to pull in asm from arch/$(ARCH)/src/$(ARCH).
>
> Would this make things simpler for the build system? I think so.
>
> Rich
>

[-- Attachment #2: Type: text/html, Size: 2980 bytes --]

  reply	other threads:[~2015-11-17 22:15 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 23:40 Petr Hosek
2015-11-07 13:05 ` Szabolcs Nagy
2015-11-08  0:43   ` Rich Felker
2015-11-08  2:16     ` Szabolcs Nagy
2015-11-08  2:29       ` Rich Felker
2015-11-11 22:02         ` Petr Hosek
2015-11-11 23:08           ` Rich Felker
2015-11-12  0:01             ` Rich Felker
2015-11-12  0:28             ` Petr Hosek
2015-11-12 14:50               ` Szabolcs Nagy
2015-11-12 20:17                 ` Petr Hosek
2015-11-12 20:30                   ` Rich Felker
2015-11-12 21:10                     ` Szabolcs Nagy
2015-11-12 21:52                       ` Rich Felker
2015-11-12 22:35                         ` Petr Hosek
2015-11-12 23:41                           ` Rich Felker
2015-11-17  2:45                             ` Petr Hosek
2015-11-17  6:05                               ` Petr Hosek
2015-11-17 19:51                                 ` Szabolcs Nagy
2015-11-17 21:00                               ` Rich Felker
2015-11-17 21:37                                 ` Petr Hosek
2015-11-17 22:01                                   ` Rich Felker
2015-11-17 22:15                                     ` Petr Hosek [this message]
2015-11-17 22:58                                       ` Rich Felker
2015-11-17 23:06                                     ` Szabolcs Nagy
2015-11-17 23:27                                       ` Rich Felker
2015-11-17 23:43                                         ` Rich Felker
2015-11-17 23:54                                           ` Petr Hosek
2015-11-18  0:19                                             ` Szabolcs Nagy
2015-11-18  0:19                                             ` Rich Felker
2015-11-18 20:19                                               ` Petr Hosek
2015-11-18 21:44                                                 ` Rich Felker
2015-11-19  0:22                                                   ` Petr Hosek
2015-11-20  4:09                                                     ` Rich Felker
2015-11-20  5:02                                                       ` Rich Felker
2015-11-20 10:51                                                       ` Szabolcs Nagy
2015-11-30  1:25                                                       ` Petr Hosek
2015-11-20 22:20                                                     ` Rich Felker
2015-11-30  1:29                                                       ` Petr Hosek
2015-11-30  1:35                                                         ` Rich Felker
2015-11-30  2:49                                                           ` Petr Hosek
2015-11-30 21:14                                                             ` Rich Felker
2015-11-30 22:14                                                               ` Rich Felker
2015-12-01  2:14                                                                 ` Petr Hosek
2015-12-09  0:39                                                                   ` Rich Felker
2015-12-10  1:39                                                                     ` Petr Hosek
2015-12-10 12:47                                                                       ` Szabolcs Nagy
2016-01-17 22:32                                                                       ` Rich Felker
2016-01-17 23:41                                                                         ` Szabolcs Nagy
2016-01-20  3:49                                                                           ` Rich Felker
2015-11-21  1:05                                                     ` Szabolcs Nagy
2015-11-21  1:16                                                       ` Szabolcs Nagy
2015-11-22 14:56                                                     ` Szabolcs Nagy
2015-11-30  1:30                                                       ` Petr Hosek
2015-11-30 12:01                                                         ` Szabolcs Nagy
2015-11-30 22:22                                                           ` Rich Felker

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='CABBv4TYZUN1t+3kvQF9=Af9gDdrv=BgsYatErd4WDD50gyQwVg@mail.gmail.com' \
    --to=phosek@chromium.org \
    --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).