mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Design idea for subarchs/abivariants
Date: Thu, 29 Nov 2012 09:03:32 +0100	[thread overview]
Message-ID: <20121129080332.GN10895@port70.net> (raw)
In-Reply-To: <20121129002251.GA13394@intma.in>

* Kurt H Maier <khm-lists@intma.in> [2012-11-28 19:22:51 -0500]:
> I'm asking this to be educated, rather than to make a point:  why is a
> system like this preferable to the way plan9 libc is written, which as
> far as I can tell uses no ifdef at all?

i looked at this

it seems the plan9 and musl approach is similar
in the sense that they avoid unnecessary ifdefs
(putting arch specific stuff in separate dir etc, plan9
has union mount, musl uses a bits symlink in case of
headers)

they both use ifdefs for feature test macros
(obviously it's much less needed in plan9 but see the
ape implementation and it has some, musl needs a lot)

they both use ifdefs for typedef and include guards
(plan9 only uses them in ape, this is unavioidable in a
posix libc)

musl has to use ifdefs for some compiler specific features
(plan9 don't need this, they have their own compiler)

now musl will need to use ifdefs for some arch parameters
(endianness, soft vs hard float, long double,..)
plan9 libc does not need these because they don't implement
such things (there is no soft float or long double support,
no fenv, no endian dependent api etc)

but plan9 has ifdefs for arch specific options as well
(eg in driver code) just not in the libc



      parent reply	other threads:[~2012-11-29  8:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 19:26 Rich Felker
2012-11-28 20:03 ` Isaac Dunham
2012-11-28 21:50   ` Szabolcs Nagy
2012-11-28 23:57   ` Rich Felker
2012-11-28 20:26 ` John Spencer
2012-11-28 22:38 ` Szabolcs Nagy
2012-11-29  0:10   ` Rich Felker
2012-11-29  0:22     ` Kurt H Maier
2012-11-29  1:21       ` Rich Felker
2012-11-29  8:03       ` Szabolcs Nagy [this message]

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=20121129080332.GN10895@port70.net \
    --to=nsz@port70.net \
    --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).