This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44927] static linkage with -lgomp fails on simple program
- From: "victor dot pasko at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2010 09:27:33 -0000
- Subject: [Bug fortran/44927] static linkage with -lgomp fails on simple program
- References: <bug-44927-19433@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from victor dot pasko at gmail dot com 2010-07-13 09:27 -------
OK test PASSED after adding -Wl,--whole-archive -lpthread
-Wl,--no-whole-archive
But there is some strange warning:
% gfortran -static bug.f90 -lgomp -Wl,--whole-archive -lpthread
-Wl,--no-whole-archive -lrt
/usr/lib/../lib64/libpthread.a(sem_open.o): In function `sem_open':
(.text+0x448): warning: the use of `mktemp' is dangerous, better use `mkstemp'
vpasko@nstmklel143
/nfs/ins/proj/mkl/builds2/vpasko/10.3b1_lnx/mkl/examples/dftf
% ./a.out
sssss
sssss
8
TEST PASS
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44927