Created attachment 11976 [details] Dockerfile to reproduce issue Hi, A crosstool-ng user reported a problem building for powerpc64le-unknown-linux-gnu. https://github.com/crosstool-ng/crosstool-ng/issues/1227 The issue boils down to /home/x-tool/.build/powerpc64le-unknown-linux-gnu/buildtools/lib/gcc/powerpc64le-unknown-linux-gnu/8.3.0/../../../../powerpc64le-unknown-linux-gnu/bin/ld: /home/x-tool/.build/powerpc64le-unknown-linux-gnu/buildtools/lib/gcc/powerpc64le-unknown-linux-gnu/8.3.0/libgcc.a(ppc64-fp.o): in function `__fixdfdi': /home/x-tool/.build/powerpc64le-unknown-linux-gnu/src/gcc/libgcc/config/rs6000/ppc64-fp.c:57: multiple definition of `__fixdfdi'; /home/x-tool/.build/powerpc64le-unknown-linux-gnu/build/build-libc-final/multilib/libc_pic.os:/home/x-tool/.build/src/glibc-2.29/soft-fp/fixdfdi.c:36: first defined here /home/x-tool/.build/powerpc64le-unknown-linux-gnu/buildtools/lib/gcc/powerpc64le-unknown-linux-gnu/8.3.0/../../../../powerpc64le-unknown-linux-gnu/bin/ld: /home/x-tool/.build/powerpc64le-unknown-linux-gnu/buildtools/lib/gcc/powerpc64le-unknown-linux-gnu/8.3.0/libgcc.a(ppc64-fp.o): in function `__fixsfdi': /home/x-tool/.build/powerpc64le-unknown-linux-gnu/src/gcc/libgcc/config/rs6000/ppc64-fp.c:65: multiple definition of `__fixsfdi'; /home/x-tool/.build/powerpc64le-unknown-linux-gnu/build/build-libc-final/multilib/libc_pic.os:/home/x-tool/.build/src/glibc-2.29/soft-fp/fixsfdi.c:36: first defined here ... (more errors for other floating point functions) It looks like we've ended up with multiple floating point libraries selected conflicting with each other. If we change to glibc-2.28 the build succeeds. I've attached a Dockerfile that can be used to demonstrate the issue.
You'll need to find why the soft-fp functions got built into glibc. Only sysdeps/powerpc/nofpu/Makefile and sysdeps/nios2/Makefile add them to the build, and there's no such thing as soft-float powerpc64, either endianness (see the list of supported glibc ABIs at <https://sourceware.org/glibc/wiki/ABIList>). So what went wrong with the configure tests distinguishing hard and soft float to cause inappropriate sysdeps directories to be used?
Looks like 2.30 doesn't have the same problem. Skimming the history I don't see anything obvious.
Somewhere along the line with_fp_cond gets set to 0 in the configure process. snippet from config.log configure:3865: checking for use of fpu sysdeps directories conftest.c:4:3: error: #error "no hardware floating point" # error "no hardware floating point" ^~~~~ configure:3884: result: no As Joseph said this should be true for powerpc64. sysdeps/powerpc/preconfigure only sets this in the 32-bit case. I wonder if one of the other preconfigure scripts is setting this to 0 unconditionally.
I think the problem is actually due to a non-upstream patch that crosstool-NG is carrying for ARC. This ends up modifying with_fp_cond for all architectures (not just arc).
I'm marking this as resolved/worksforme since the bug is actually due to a downstream patch.