Many tests in gdc.dg fail with: /home/uros/gcc-build/x86_64-pc-linux-gnu/./libphobos/libdruntime/.libs/libgdruntime.a(qsort.o): In function `_adSort': /home/uros/gcc-build/x86_64-pc-linux-gnu/libphobos/libdruntime/../../../../git/gcc/libphobos/libdruntime/rt/qsort.d:41: undefined reference to `qsort_r' collect2: error: ld returned 1 exit status The tests are run on CentOS 5.11 with "GNU C Library stable release version 2.5". Please note that qsort_r() was added to glibc in version 2.8.
Upstream PR: https://github.com/dlang/druntime/pull/2480
Patch at [1]. [1] https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00120.html
Author: ibuclaw Date: Mon Feb 18 23:29:39 2019 New Revision: 268999 URL: https://gcc.gnu.org/viewcvs?rev=268999&root=gcc&view=rev Log: libphobos: Detect if qsort_r is available Merges upstream druntime bbfb58e8. libphobos/ChangeLog: 2019-02-19 Johannes Pfau <johannespfau@gmail.com> PR d/88127 * m4/druntime/libraries.m4 (DRUNTIME_LIBRARIES_CLIB): Add new macro. * configure.ac: Use DRUNTIME_LIBRARIES_CLIB. * configure: Regenerate * Makefile.in: Regenerate * libdruntime/gcc/config.d.in: Add Have_Qsort_R. * libdruntime/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Modified: trunk/libphobos/ChangeLog trunk/libphobos/Makefile.in trunk/libphobos/configure trunk/libphobos/configure.ac trunk/libphobos/libdruntime/MERGE trunk/libphobos/libdruntime/Makefile.in trunk/libphobos/libdruntime/gcc/config.d.in trunk/libphobos/libdruntime/rt/qsort.d trunk/libphobos/m4/druntime/libraries.m4 trunk/libphobos/src/Makefile.in trunk/libphobos/testsuite/Makefile.in
This should be fixed now.