From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: feature request: flag to disable math library build
Date: Sat, 13 Oct 2012 19:53:03 -0400 [thread overview]
Message-ID: <20121013235303.GK254@brightrain.aerifal.cx> (raw)
In-Reply-To: <20121013164945.b824bada.idunham@lavabit.com>
On Sat, Oct 13, 2012 at 04:49:45PM -0700, Isaac Dunham wrote:
> On Sat, 13 Oct 2012 08:26:42 -0400
> Rich Felker <dalias@aerifal.cx> wrote:
>
> > > And IIRC, src/complex built the last time I tried CVS pcc (but I
> > > could be misremembering!)
> >
> > Nice to hear - I hope that's true!
>
> Yes. pcc 20120923 used.
> The problems I'm running into are -m*:
>
> echo 'int main(){ return 0; }' |pcc -march=i386 -
> ld: unrecognised emulation mode: arch=i386
> Supported emulations: elf_i386 i386linux elf_x86_64 elf_l1om
> ld terminated with status 1
> (I use -melf_i386, i386linux is not the right mode)
This sounds like a bug. -m* should not be passed thru to the linker.
I suppose the configure checks should be updated to try linking with
-march etc. rather than just compiling, so this bug is caught.
> And a segfaulty loader.
Any idea why? My guess would be generating bad code that needs
relocations before it can run.
> > > However, C11 makes complex numbers optional, and there's currently
> > > no dependance on src/complex/ - would it make sense to allow
> > > /configure --disable-complex
> > > (via the filter-out rule)?
>
> > There are plenty of other things in musl that are not required by the
> > base standards, like GNU extensions, all of the XSI option, and
> > various POSIX feature groups like spawn, but they're not made
> > optional, because it increases complexity and has almost no benefits.
>
> The potential issue is that complex/ requires a compiler capable of
> handling complex numbers, which C11 makes optional. Of course, it
> would be possible to just say that the compiler used to build musl
> must support complex numbers.
If this is ever an issue, we could consider making the complex code
operate on the representation of complex values as double[2], etc.
rather than directly using complex. IMO this is ugly though. I think
most relevant compilers will want to comply to C99 as well as C11.
Rich
next prev parent reply other threads:[~2012-10-13 23:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 17:30 John Spencer
2012-10-11 18:17 ` Szabolcs Nagy
2012-10-11 19:37 ` Szabolcs Nagy
2012-10-11 23:28 ` Rich Felker
2012-10-11 23:57 ` Luca Barbato
2012-10-12 0:24 ` John Spencer
2012-10-13 7:23 ` Isaac Dunham
2012-10-13 12:26 ` Rich Felker
2012-10-13 23:49 ` Isaac Dunham
2012-10-13 23:53 ` Rich Felker [this message]
2012-10-13 13:42 ` John Spencer
2012-10-13 20:13 ` Rich Felker
2012-10-12 0:32 ` John Spencer
2012-10-12 0:17 ` 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=20121013235303.GK254@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).