Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 24 May 2015 14:45:40 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: Trouble compiling musl for MIPS softfloat

* Arjen Roodselaar <arjen@...com> [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: 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.
> 
> Tools used here:
> 
> Binutils-2.25
> Gcc-4.8.4
> Musl-1.1.9
> 

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).
> 
> 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 += -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)

Powered by blists - more mailing lists

Your e-mail address:

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