[Bug fortran/79182] when use openmp and link static libgfortran,open function cause SIGSEGV
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jan 22 20:28:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79182
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That is a libc issue, statically linking only parts of -lpthread often results
in broken programs, unless libpthread.a ensures all of libpthread is linked
when linking statically (e.g. what is done in some distributions where
libpthread.a contains only libpthread.o - result of ld -r). If your distro
isn't doing this, I'm afraid you need to use -static --Wl,--whole-archive
-lpthread -Wl,--no-whole-archive.
More information about the Gcc-bugs
mailing list