public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/109904] New: linking with -static flag generates undefined references
@ 2023-05-18 18:07 Gary.White at ColoState dot edu
2023-05-18 18:11 ` [Bug libgomp/109904] " pinskia at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: Gary.White at ColoState dot edu @ 2023-05-18 18:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
Bug ID: 109904
Summary: linking with -static flag generates undefined
references
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: Gary.White at ColoState dot edu
Target Milestone: ---
What follows are a portion of the undefined references when using -static with
gfortran-13. I require the -static flag to be able to distribute executable to
users not having gfortran on their machines.
gfortran -m64 -fopenmp mark.o glabrd.o xmatrx.o tmread.o rlabrd.o blabrd.o
dlabrd.o estmat.o varmat.o derivedest.o piread.o func.o saturd.o chprob.o
chprob001.o chprob002.o chprob008.o chprob009.o chprob032.o chprob115.o
chprob119.o chprob121.o chprob126.o chprob139.o chprob140.o chprob141.o
chprob142.o chprob143.o chprob144.o chprob160.o chprob170.o chprob171.o
chprob172.o chprob173.o chprob174.o chprob175.o chprob176.o chprob177.o
chprob178.o chprob179.o chprob180.o chprob181.o chprob182.o chprob183.o
chprob184.o rcread.o kfread.o nsread.o optmiz.o status_module.o prcisub.o
prfunc.o mcmc.o hyperread.o gibbsitsub.o optimizers_module.o gaussquad.o
hyper_dist_module.o profile_conf_interval_module.o data_module.o
design_matrix_funcs_module.o random_values_module.o Linpack.a -o mark64.exe
-static -static-libgfortran
C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib\libgomp.a(target.o):(.text+0x94f):
undefined reference to `dlopen'
C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib\libgomp.a(target.o):(.text+0x96a):
undefined reference to `dlsym'
C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib\libgomp.a(target.o):(.text+0x99f):
undefined reference to `dlclose'
C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib\libgomp.a(oacc-profiling.o):(.text+0x83d):
undefined reference to `dlerror'
Specifics of the installation of gfortran are:
gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=C:/tdm-gcc-64/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/lto-wrapper.exe
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-w64-mingw32
Configured with: ../configure
--prefix=/R/winlibs64ucrt_stage/inst_gcc-13.1.0/share/gcc
--build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32
--enable-offload-targets=nvptx-none --with-pkgversion='MinGW-W64
x86_64-msvcrt-posix-seh, built by Brecht Sanders' --with-tune=generic
--enable-checking=release --enable-threads=posix --disable-sjlj-exceptions
--disable-libunwind-exceptions --disable-serial-configure --disable-bootstrap
--enable-host-shared --enable-plugin --disable-default-ssp --disable-rpath
--disable-libstdcxx-debug --disable-version-specific-runtime-libs --with-stabs
--disable-symvers --enable-languages=c,c++,fortran,lto,objc,obj-c++
--disable-gold --disable-nls --disable-stage1-checking --disable-win32-registry
--disable-multilib --enable-ld --enable-libquadmath --enable-libada
--enable-libssp --enable-libstdcxx --enable-lto --enable-fully-dynamic-string
--enable-libgomp --enable-graphite --enable-mingw-wildcard
--enable-libstdcxx-time --enable-libstdcxx-pch
--with-mpc=/d/Prog/winlibs64ucrt_stage/custombuilt
--with-mpfr=/d/Prog/winlibs64ucrt_stage/custombuilt
--with-gmp=/d/Prog/winlibs64ucrt_stage/custombuilt
--with-isl=/d/Prog/winlibs64ucrt_stage/custombuilt --enable-libstdcxx-backtrace
--enable-install-libiberty --enable-__cxa_atexit --without-included-gettext
--with-diagnostics-color=auto --enable-clocale=generic --with-libiconv
--with-system-zlib
--with-build-sysroot=/R/winlibs64ucrt_stage/gcc-13.1.0/build_mingw/mingw-w64
CFLAGS='-I/d/Prog/winlibs64ucrt_stage/custombuilt/include/libdl-win32
-Wno-int-conversion' CXXFLAGS=-Wno-int-conversion LDFLAGS='-pthread
-Wl,--dynamicbase -Wl,--high-entropy-va -Wl,--nxcompat -Wl,--tsaware'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.0 (MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sanders)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
@ 2023-05-18 18:11 ` pinskia at gcc dot gnu.org
2023-05-18 18:14 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-18 18:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>--enable-offload-targets=nvptx-none
I suspect this might be the issue. offloading only works with targets that have
dlopen . Maybe you need to link with -ldl to get it working.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
2023-05-18 18:11 ` [Bug libgomp/109904] " pinskia at gcc dot gnu.org
@ 2023-05-18 18:14 ` pinskia at gcc dot gnu.org
2023-05-18 18:28 ` Gary.White at ColoState dot edu
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-18 18:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
In fact I noticed this on the configure comand line:
-I/d/Prog/winlibs64ucrt_stage/custombuilt/include/libdl-win32
Please report this issue to where you got the binary builds of GCC from and ask
them about providing libdl-win32 to you too.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
2023-05-18 18:11 ` [Bug libgomp/109904] " pinskia at gcc dot gnu.org
2023-05-18 18:14 ` pinskia at gcc dot gnu.org
@ 2023-05-18 18:28 ` Gary.White at ColoState dot edu
2023-05-18 18:33 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Gary.White at ColoState dot edu @ 2023-05-18 18:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #3 from GARY.WHITE at ColoState dot edu <Gary.White at ColoState dot edu> ---
Linking with -ldl fixed the issue Where is there documentation of -ldl?
Gary C. White, CWB(r)
Professor Emeritus
Department of Fish, Wildlife, and Conservation Biology
10 Wagar
Colorado State University
Fort Collins, CO 80523
(515)450-2768 Mobile
Gary.White@ColoState.edu
https://sites.warnercnr.colostate.edu/gwhite/
he/him/his
See where we are!
"Leadership is a privilege to better the lives of others. It is not an
opportunity to satisfy personal greed." Mwai Kibaki
-----Original Message-----
From: pinskia at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>
Sent: Thursday, May 18, 2023 12:11 PM
To: White,Gary <Gary.White@colostate.edu>
Subject: [Bug libgomp/109904] linking with -static flag generates undefined
references
** Caution: EXTERNAL Sender **
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>--enable-offload-targets=nvptx-none
I suspect this might be the issue. offloading only works with targets that have
dlopen . Maybe you need to link with -ldl to get it working.
--
You are receiving this mail because:
You reported the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
` (2 preceding siblings ...)
2023-05-18 18:28 ` Gary.White at ColoState dot edu
@ 2023-05-18 18:33 ` pinskia at gcc dot gnu.org
2023-05-18 18:36 ` Gary.White at ColoState dot edu
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-18 18:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to GARY.WHITE@ColoState.edu from comment #3)
> Linking with -ldl fixed the issue Where is there documentation of -ldl?
-l says to link against a specified library in this case libdl; libgomp needs
to open a library at runtime due to offloading support and dl* functions do
that and for windows dl* functions are implemented in libdl-win32. But as I
mentioned you should be asking where you got the binary toolchain instead of
here.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
` (3 preceding siblings ...)
2023-05-18 18:33 ` pinskia at gcc dot gnu.org
@ 2023-05-18 18:36 ` Gary.White at ColoState dot edu
2023-05-18 20:53 ` Gary.White at ColoState dot edu
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Gary.White at ColoState dot edu @ 2023-05-18 18:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #5 from GARY.WHITE at ColoState dot edu <Gary.White at ColoState dot edu> ---
I'm getting gfortran downloads from here:
https://github.com/brechtsanders/winlibs_mingw/releases
Gary C. White, CWB(r)
Professor Emeritus
Department of Fish, Wildlife, and Conservation Biology
10 Wagar
Colorado State University
Fort Collins, CO 80523
(515)450-2768 Mobile
Gary.White@ColoState.edu
https://sites.warnercnr.colostate.edu/gwhite/
he/him/his
See where we are!
"Leadership is a privilege to better the lives of others. It is not an
opportunity to satisfy personal greed." Mwai Kibaki
-----Original Message-----
From: pinskia at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>
Sent: Thursday, May 18, 2023 12:33 PM
To: White,Gary <Gary.White@colostate.edu>
Subject: [Bug libgomp/109904] linking with -static flag generates undefined
references
** Caution: EXTERNAL Sender **
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to
GARY.WHITE@ColoState.edu from comment #3)
> Linking with -ldl fixed the issue Where is there documentation of -ldl?
-l says to link against a specified library in this case libdl; libgomp needs
to open a library at runtime due to offloading support and dl* functions do
that and for windows dl* functions are implemented in libdl-win32. But as I
mentioned you should be asking where you got the binary toolchain instead of
here.
--
You are receiving this mail because:
You reported the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
` (4 preceding siblings ...)
2023-05-18 18:36 ` Gary.White at ColoState dot edu
@ 2023-05-18 20:53 ` Gary.White at ColoState dot edu
2023-05-18 20:59 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Gary.White at ColoState dot edu @ 2023-05-18 20:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #6 from GARY.WHITE at ColoState dot edu <Gary.White at ColoState dot edu> ---
So using -ldl seems really quirky. Doesn't seem to work for generating 32-bit
executables. Plus, not working at all on my second machine. Is there a better
solution?
Gary C. White, CWB(r)
Professor Emeritus
Department of Fish, Wildlife, and Conservation Biology
10 Wagar
Colorado State University
Fort Collins, CO 80523
(515)450-2768 Mobile
Gary.White@ColoState.edu
https://sites.warnercnr.colostate.edu/gwhite/
he/him/his
See where we are!
"Leadership is a privilege to better the lives of others. It is not an
opportunity to satisfy personal greed." Mwai Kibaki
-----Original Message-----
From: pinskia at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>
Sent: Thursday, May 18, 2023 12:33 PM
To: White,Gary <Gary.White@colostate.edu>
Subject: [Bug libgomp/109904] linking with -static flag generates undefined
references
** Caution: EXTERNAL Sender **
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to
GARY.WHITE@ColoState.edu from comment #3)
> Linking with -ldl fixed the issue Where is there documentation of -ldl?
-l says to link against a specified library in this case libdl; libgomp needs
to open a library at runtime due to offloading support and dl* functions do
that and for windows dl* functions are implemented in libdl-win32. But as I
mentioned you should be asking where you got the binary toolchain instead of
here.
--
You are receiving this mail because:
You reported the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
` (5 preceding siblings ...)
2023-05-18 20:53 ` Gary.White at ColoState dot edu
@ 2023-05-18 20:59 ` pinskia at gcc dot gnu.org
2023-05-18 21:02 ` Gary.White at ColoState dot edu
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-18 20:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to GARY.WHITE@ColoState.edu from comment #6)
> So using -ldl seems really quirky. Doesn't seem to work for generating
> 32-bit executables. Plus, not working at all on my second machine. Is
> there a better solution?
Yes use a differently built gcc where libgomp does NOT depend on dl* functions.
Again this is not the right place to report these issues, the correct place is
where you got the binary GCC from. In your case that would be
https://github.com/brechtsanders/winlibs_mingw/issues .
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
` (6 preceding siblings ...)
2023-05-18 20:59 ` pinskia at gcc dot gnu.org
@ 2023-05-18 21:02 ` Gary.White at ColoState dot edu
2023-05-18 21:06 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Gary.White at ColoState dot edu @ 2023-05-18 21:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #8 from GARY.WHITE at ColoState dot edu <Gary.White at ColoState dot edu> ---
So send me the link where I should get the binaries from.
Gary C. White, CWB(r)
Professor Emeritus
Department of Fish, Wildlife, and Conservation Biology
10 Wagar
Colorado State University
Fort Collins, CO 80523
(515)450-2768 Mobile
Gary.White@ColoState.edu
https://sites.warnercnr.colostate.edu/gwhite/
he/him/his
See where we are!
"Leadership is a privilege to better the lives of others. It is not an
opportunity to satisfy personal greed." Mwai Kibaki
-----Original Message-----
From: pinskia at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>
Sent: Thursday, May 18, 2023 2:59 PM
To: White,Gary <Gary.White@colostate.edu>
Subject: [Bug libgomp/109904] linking with -static flag generates undefined
references
** Caution: EXTERNAL Sender **
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to
GARY.WHITE@ColoState.edu from comment #6)
> So using -ldl seems really quirky. Doesn't seem to work for
> generating 32-bit executables. Plus, not working at all on my second
> machine. Is there a better solution?
Yes use a differently built gcc where libgomp does NOT depend on dl* functions.
Again this is not the right place to report these issues, the correct place is
where you got the binary GCC from. In your case that would be
https://github.com/brechtsanders/winlibs_mingw/issues .
--
You are receiving this mail because:
You reported the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
` (7 preceding siblings ...)
2023-05-18 21:02 ` Gary.White at ColoState dot edu
@ 2023-05-18 21:06 ` pinskia at gcc dot gnu.org
2023-05-18 21:08 ` jakub at gcc dot gnu.org
2023-05-19 8:16 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-18 21:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
See https://gcc.gnu.org/install/binaries.html
Specifically: "Please note that we did not create these binaries, nor do we
support them. If you have any problems installing them, please contact their
makers."
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
` (8 preceding siblings ...)
2023-05-18 21:06 ` pinskia at gcc dot gnu.org
@ 2023-05-18 21:08 ` jakub at gcc dot gnu.org
2023-05-19 8:16 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-18 21:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Offloading doesn't work for 32-bit architectures, the offloading target needs
to have the same wordsize as the host and e.g. nvptx 32-bit support has been
deprecated and removed some years ago.
So, don't configure offloading for 32-bit architectures.
As for adding -ldl automatically for -static linking, I think we should do:
2023-05-18 Jakub Jelinek <jakub@redhat.com>
PR libgomp/109904
* configure.ac (link_gomp): Include also $DL_LIBS.
* configure: Regenerated.
--- libgomp/configure.ac.jj 2023-05-15 19:12:35.138624638 +0200
+++ libgomp/configure.ac 2023-05-18 20:41:58.512501769 +0200
@@ -398,9 +398,9 @@ fi
# which will force linkage against -lpthread (or equivalent for the system).
# That's not 100% ideal, but about the best we can do easily.
if test $enable_shared = yes; then
- link_gomp="-lgomp %{static: $LIBS}"
+ link_gomp="-lgomp %{static: $LIBS${DL_LIBS:+ $DL_LIBS}}"
else
- link_gomp="-lgomp $LIBS"
+ link_gomp="-lgomp $LIBS${DL_LIBS:+ $DL_LIBS}"
fi
AC_SUBST(link_gomp)
--- libgomp/configure.jj 2023-05-15 19:12:35.138624638 +0200
+++ libgomp/configure 2023-05-18 20:42:12.703299052 +0200
@@ -16788,9 +16788,9 @@ fi
# which will force linkage against -lpthread (or equivalent for the system).
# That's not 100% ideal, but about the best we can do easily.
if test $enable_shared = yes; then
- link_gomp="-lgomp %{static: $LIBS}"
+ link_gomp="-lgomp %{static: $LIBS${DL_LIBS:+ $DL_LIBS}}"
else
- link_gomp="-lgomp $LIBS"
+ link_gomp="-lgomp $LIBS${DL_LIBS:+ $DL_LIBS}"
fi
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libgomp/109904] linking with -static flag generates undefined references
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
` (9 preceding siblings ...)
2023-05-18 21:08 ` jakub at gcc dot gnu.org
@ 2023-05-19 8:16 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-19 8:16 UTC (permalink / raw)
To: gcc-bugs
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 <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:9abc830247e547186a48caadca43f5372eae1195
commit r14-991-g9abc830247e547186a48caadca43f5372eae1195
Author: Jakub Jelinek <jakub@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 <jakub@redhat.com>
PR libgomp/109904
* configure.ac (link_gomp): Include also $DL_LIBS.
* configure: Regenerated.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-05-19 8:16 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
2023-05-18 18:11 ` [Bug libgomp/109904] " pinskia at gcc dot gnu.org
2023-05-18 18:14 ` pinskia at gcc dot gnu.org
2023-05-18 18:28 ` Gary.White at ColoState dot edu
2023-05-18 18:33 ` pinskia at gcc dot gnu.org
2023-05-18 18:36 ` Gary.White at ColoState dot edu
2023-05-18 20:53 ` Gary.White at ColoState dot edu
2023-05-18 20:59 ` pinskia at gcc dot gnu.org
2023-05-18 21:02 ` Gary.White at ColoState dot edu
2023-05-18 21:06 ` pinskia at gcc dot gnu.org
2023-05-18 21:08 ` jakub at gcc dot gnu.org
2023-05-19 8:16 ` cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).