Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Aug 2015 13:32:24 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH v2] Add PowerPC soft-float support

* Khem Raj <raj.khem@...il.com> [2015-08-06 18:55:06 -0700]:
> On Thu, Aug 6, 2015 at 3:47 PM, Szabolcs Nagy <nsz@...t70.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.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.