Fwd: Bug#819069: dietlibc: FTBFS on powerpcspe due to missing FPU emulation in library

Thorsten Glaser <[email protected]> Wed, 23 Mar 2016 15:19:26 +0000 (UTC)
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
Hi Felix,

unsure if you saw that. powerpcspe is an architecture which differs
slightly from powerpc and has no FPU. The fix is probably to merge
GCC=E2=80=99s FPU emulation code (as dietlibc also uses the GPL this could
work).

---------- Forwarded message ----------
From: John Paul Adrian Glaubitz <[email protected]>
Message-ID:
    <145873929931.14974.10725083240958549148.reportbug@z6.physik.fu-berlin.=
de>
Date: Wed, 23 Mar 2016 14:21:39 +0100
Subject: Bug#819069: dietlibc: FTBFS on powerpcspe due to missing FPU emula=
tion
    in library

Source: dietlibc
Version: 0.33~cvs20120325-6
Severity: normal
User: [email protected]
Usertags: powerpcspe

Hello!

dietlibc currently fails to build from source on powerpcspe because the cod=
e
is missing FPU emulation:

test/select.c:12:5: warning: implicit declaration of function 'perror' [-Wi=
mplicit-function-declaration]
     perror("select");
     ^
=2E/ttt
rm -f ttt
bin-'ppc'/diet -v -Os gcc -nostdinc -static -o ttt debian/test/tc523086.c
gcc -nostdlib -static -L/B+PKGBUILDDIRB;/bin-ppc /B+PKGBUILDDIRB;/bin-ppc/s=
tart.o -nostdinc -static -o ttt debian/test/tc523086.c -isystem /B+PKGBUILD=
DIRB;/include -D__dietlibc__ -Os -fomit-frame-pointer -mpowerpc-gpopt -mpow=
erpc-gfxopt /B+PKGBUILDDIRB;/bin-ppc/dietlibc.a -lgcc -fno-stack-protector=
=20
/B+PKGBUILDDIRB;/bin-ppc/dietlibc.a(vprintf.o): In function `vprintf':
vprintf.c:(.text+0x64): warning: warning: the printf functions add several =
kilobytes of bloat.
/B+PKGBUILDDIRB;/bin-ppc/dietlibc.a(__dtostr.o): In function `__dtostr':
__dtostr.c:(.text+0xc0): undefined reference to `__unorddf2'
__dtostr.c:(.text+0x110): undefined reference to `__unorddf2'
collect2: error: ld returned 1 exit status
make: *** [build-stamp] Error 1
debian/rules:54: recipe for target 'build-stamp' failed

"__unorddf2" is a function in the FPU emulation library present in glibc. I=
n
the past, the FPU emulation code was present in libgcc which is why dietlib=
c
used to build find on powerpcspe. However, the FPU emulation code in gcc
has been deprecated in favour of the code present in glibc 2.19 or newer [1=
]
and any recent version of gcc built on a system with glibc 2.19 or newer
will automatically deactivate its built-in FPU emulation code.

I don't know if any FPU emulation code is actually present in dietlibc, but
if there is, it should be enabled similar to what was done in glibc [2].

Cheers,
Adrian

> [1] https://patchwork.ozlabs.org/patch/405072/
> [2] https://anonscm.debian.org/cgit/pkg-glibc/glibc.git/commit/?id=3D0d9b=
726ce6b29614d1ddd4e55502a9221cfb4d04

--=20
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913