Skip to content

Fails to link glibc #1543

@HanabishiRecca

Description

@HanabishiRecca

OS: Arch Linux
mold: 2.40.4

When trying to build glibc using mold as a linker it fails with the following error:

gcc -fuse-ld=mold  -nostdlib -nostartfiles -r -o /glibc-build/libc_pic.os \
 -Wl,--whole-archive /glibc-build/libc_pic.a -o /glibc-build/libc_pic.os
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.

Steps to reproduce:

export LDFLAGS='-fuse-ld=mold'
curl 'https://ftp.gnu.org/gnu/glibc/glibc-2.42.tar.xz' | tar -xJv
mkdir glibc-build
cd glibc-build/
../glibc-2.42/configure --prefix=/usr
make

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions