From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7750 Path: news.gmane.org!not-for-mail From: Arjen Roodselaar Newsgroups: gmane.linux.lib.musl.general Subject: Re: Trouble compiling musl for MIPS softfloat Date: Sun, 24 May 2015 22:09:58 +0000 Message-ID: References: <20150524124540.GA26188@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" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1432505425 15488 80.91.229.3 (24 May 2015 22:10:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 May 2015 22:10:25 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-7762-gllmg-musl=m.gmane.org@lists.openwall.com Mon May 25 00:10:18 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 1Ywe64-0007b0-0G for gllmg-musl@m.gmane.org; Mon, 25 May 2015 00:10:16 +0200 Original-Received: (qmail 14001 invoked by uid 550); 24 May 2015 22:10:13 -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 13983 invoked from network); 24 May 2015 22:10:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=xu7iQQPamrpxhJwTfVMRU4Kki3sX5lX2JvB5B/fu/tg=; b=hdOF30AcZxyRxMGDpIVzETZ6t1fBPiuXS1kQBYWr0DS5olnYs+P2zvTJ0gA6qLf23sZM ZnqgyvymP1Agip9RDCCcMKm5IdL+B+M+RFqVR2F+XcC/DKU1HH+zksHm+rutHVKNx7gb xivq1zSofFt0pM9yFkX+nB0I7FbilY6BzkU= Thread-Topic: [musl] Trouble compiling musl for MIPS softfloat Thread-Index: AQHQldtAm1PvjqASGEe1zVMynDnwYZ2LiLYAgAAoVYA= In-Reply-To: <20150524124540.GA26188@port70.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.52.123] Content-ID: X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-05-24_03:2015-05-22,2015-05-24,1970-01-01 signatures=0 Xref: news.gmane.org gmane.linux.lib.musl.general:7750 Archived-At: Passing -Wa,-msoft-float to the assembler works like a charm. Reading your reply I realized I had been looking for a way to pass this on to the assembler but did not realize I should just pass that same flag. I guess it was a long day yesterday. Thank you for the quick reply on this! 1.1.9 indeed produces a few of those warnings mentioned so for now I will continue with 1.1.8. Rich, should I open an issue somewhere to make sure this gets looked in to? On 5/24/15, 5:45 AM, "Szabolcs Nagy" wrote: >* Arjen Roodselaar [2015-05-24 04:36:52 +0000]: >> I am trying to compile musl for use on devices powered by a MIPS 24kc, >>a SoC without hardware floating point support. The supported target >>architectures list specifically mentions this, but so far I have been >>unable to get this working. In short, using mips-sf-linux-gnu as the >>target in the configure step seems to enable soft float support as per >>this output:=20 >>https://gist.github.com/arjenroodselaar/f8d20534b0d8c7542d01. When >>linking however ld warns about a small number of files being compiled >>with -mhard?float, resulting in crt1.so to use -mhard?float: >>https://gist.github.com/arjenroodselaar/270df6970b2bd43c9bce. This then >>trickles down in anything I try to link against libc. Ignoring all this >>and simply compiling hard-float binaries is causing problems when >>executing malloc. >>=20 >> Tools used here: >>=20 >> Binutils-2.25 >> Gcc-4.8.4 >> Musl-1.1.9 >>=20 > >works here with >binutils-2.24 >gcc-4.8.2 >musl-1.1.9 > >i get an assembler warning for the crt asm though: > >{standard input}:32: Warning: macro instruction expanded into multiple >instructions in a branch delay slot > >for this insn: > > and $sp, $sp, -8 > >which turns into > > 38: 2401fff8 li at,-8 > 3c: 03a1e824 and sp,sp,at > >(but this is not soft-float related, just the new start code in 1.1.9) > >> (I tried musl 1.0.5 and gcc 4.9.2 but neither seem to make a difference >>here). >>=20 >> Am I missing something here or is soft float support for MIPS currently >>broken? Any help is appreciated. > >your problem seems to be that asm is assumed to be >hardfloat by your toolchain. > >(ie the assembler does not get the -msoft-float flag >properly) > >you may try to add > >CFLAGS +=3D -Wa,-msoft-float > >to your config.mak > >(i have no idea why this would be needed, you may want >to send the build command and its output when -v added >for one of the files that turned to hard float >eg. > > rm src/setjmp/setjmp.lo > make src/setjmp/setjmp.lo > >and copy the build command, add -v to the end, and send us the >command and output and maybe readelf -aW src/setjmp/setjmp.lo >output too)