mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: [PATCH v2] Add PowerPC soft-float support
Date: Fri, 7 Aug 2015 13:32:24 +0200	[thread overview]
Message-ID: <20150807113224.GB32423@port70.net> (raw)
In-Reply-To: <CAMKF1sq-jfvp7E8RxZ=bkST78sVue8CZeEEFTjCtvYUrWcN_cA@mail.gmail.com>

* Khem Raj <raj.khem@gmail.com> [2015-08-06 18:55:06 -0700]:
> On Thu, Aug 6, 2015 at 3:47 PM, Szabolcs Nagy <nsz@port70.net> wrote:
> > i used
> >
> > #define MUSL_DYNAMIC_LINKER \
> >   "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
> >
> > in gcc to get a soft float toolchain.
> > (MUSL_DYNAMIC_LINKER_E is "le" on little endian).
> > but i'm not yet sure if -msoft-float is always passed
> > down by gcc for soft float targets.
> 
> use --with-float=soft --disable-altivec to configure gcc or may be
> target triplet powerpc-linux-musl-gnuspe would work too.
> 

i was wondering how to patch gcc to emit the dynamic
linker name correctly.

i used --with-float=soft and then the resulting gcc
passes -msoft-float in the COLLECT_GCC_OPTIONS so then
the above linkspec works (sets -sf correctly).

but i think gcc can be configured for soft float cpu
in a way that it won't pass -msoft-float by default.

it certainly does not pass -msoft-float if i use explicit
-mcpu=e300c2 or similar: in that case the cpp, cc1 and as
seem to know it's soft float based on the cpu.
(sh target has the same issue).

this means the linkspec has to check the selected cpu,
not just the -msoft-float flag.

(i don't think it can be done in a future-proof way,
the current set of cpus are

401 403 405 405fp 440 440fp 464 464fp 476 476fp 505 601
602 603 603e 604 604e 620 630 740 7400 7450 750 801 821
823 8540 8548 860 970 G3 G4 G5 a2 cell e300c2 e300c3 e500mc
e500mc64 e5500 e6500 ec603e native power3 power4 power5
power5+ power6 power6x power7 power8 powerpc powerpc64
powerpc64le rs64 titan

and the linkspec should match the subset that don't have
fp regs)

and i'm not sure if spe abi is the same as the soft float abi.


  reply	other threads:[~2015-08-07 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 11:02 Felix Fietkau
2015-08-06 22:47 ` Szabolcs Nagy
2015-08-07  1:55   ` Khem Raj
2015-08-07 11:32     ` Szabolcs Nagy [this message]
2015-08-30 23:05   ` 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=20150807113224.GB32423@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).