]> git.ipfire.org Git - thirdparty/gcc.git/commit
libgomp: Fix up -static -fopenmp linking [PR109904]
authorJakub Jelinek <jakub@redhat.com>
Fri, 19 May 2023 08:13:14 +0000 (10:13 +0200)
committerJakub Jelinek <jakub@redhat.com>
Fri, 19 May 2023 08:16:30 +0000 (10:16 +0200)
commit9abc830247e547186a48caadca43f5372eae1195
tree1ebf38bc75c120c319f0769c58033e3acbbbb084
parente82025df6289aff66e4fa3c5cb594728bf8344aa
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  <jakub@redhat.com>

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