https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:9abc830247e547186a48caadca43f5372eae1195

commit r14-991-g9abc830247e547186a48caadca43f5372eae1195
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri May 19 10:13:14 2023 +0200

    libgomp: Fix up -static -fopenmp linking [PR109904]

    When an OpenMP program with target regions is linked statically,
    it fails to link on various arches (doesn't when using recent glibc
    because it has libdl stuff in libc), because libgomp.a(target.o) uses
    dlopen/dlsym/dlclose, but we aren't linking against -ldl (unless
    user asked for that).  We already have libgomp.spec so that we
    can supply extra libraries to link against in the -static case,
    this patch adds -ldl to that if plugins are supported.

    2023-05-19  Jakub Jelinek  <ja...@redhat.com>

            PR libgomp/109904
            * configure.ac (link_gomp): Include also $DL_LIBS.
            * configure: Regenerated.

Reply via email to