Skip to content

multibyteMulAdd "is already defined" with -flto=full on i686 #4294

@CyberShadow

Description

@CyberShadow

Trying to port btdu to i686 I ran into this. ldc-build-runtime is invoked with --dFlags="-flto=full" and later ldc2 with -flto=full and -static. This happens (but does not happen on x86_64):

/usr/bin/i686-linux-gnu-gcc btdu-static-i686.o -static -o btdu-static-i686 -Wl,-plugin,/tmp/ldc2-1.30.0-linux-x86_64/lib/LLVMgold-ldc.so -Wl,-plugin-opt=mcpu=pentium4 -Wl,-plugin-opt=O3 -Wl,-plugin-opt=-function-sections -Wl,-plugin-opt=-data-sections -Lrelease -l:libtermcap.a -l:libncursesw.a -l:libtinfo.a -l:libz.a -L/tmp/ldc-build-runtime.tmp/lib -lphobos2-ldc -ldruntime-ldc -Wl,--gc-sections -lrt -ldl -lpthread -lm -m32 
/usr/lib/gcc-cross/i686-linux-gnu/8/../../../../i686-linux-gnu/bin/ld: error: LLVM gold plugin: <inline asm>:876:1: symbol '.L_D3std8internal4math10biguintx86__T15multibyteMulAddVai43ZQxFNaNbNfAkxAkkkZk_L1' is already defined
.L_D3std8internal4math10biguintx86__T15multibyteMulAddVai43ZQxFNaNbNfAkxAkkkZk_L1:      mull 36(%esp)
^

collect2: error: ld returned 1 exit status
Error: /usr/bin/i686-linux-gnu-gcc failed with status: 1
DOCKER=podman ci/build-docker.sh i686 x86_64 aarch64  58.45s user 12.43s system 77% cpu 1:31.21 total

Let me know if you need a full reproducer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions