From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8271 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH v2] Add PowerPC soft-float support Date: Fri, 7 Aug 2015 13:32:24 +0200 Message-ID: <20150807113224.GB32423@port70.net> References: <1436526171-32110-1-git-send-email-nbd@openwrt.org> <20150806224749.GA32423@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1438947166 16219 80.91.229.3 (7 Aug 2015 11:32:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Aug 2015 11:32:46 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8284-gllmg-musl=m.gmane.org@lists.openwall.com Fri Aug 07 13:32:40 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZNftA-0000IM-98 for gllmg-musl@m.gmane.org; Fri, 07 Aug 2015 13:32:40 +0200 Original-Received: (qmail 20181 invoked by uid 550); 7 Aug 2015 11:32:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 20160 invoked from network); 7 Aug 2015 11:32:36 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:8271 Archived-At: * Khem Raj [2015-08-06 18:55:06 -0700]: > On Thu, Aug 6, 2015 at 3:47 PM, Szabolcs Nagy 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.