[Bug target/39939] MinGW 4.3.0 fails to link sample programme.

2009-04-30 Thread julian1844 at yahoo dot com


--- Comment #8 from julian1844 at yahoo dot com  2009-04-30 06:38 ---
(In reply to comment #7)
 ok, mingw should be linking against libpthreads with -fopenmp (it should also
 be linking against libgomp also)
 
 I don't think libgomp has been ported to mingw yet.
 

I wonder if the source code for libgomp is available. I'm looking for it about
5 days and I cannot find it. Have you got any idea?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939



[Bug target/39939] MinGW 4.3.0 fails to link sample programme.

2009-04-30 Thread dannysmith at users dot sourceforge dot net


--- Comment #9 from dannysmith at users dot sourceforge dot net  2009-04-30 
20:57 ---
(In reply to comment #6)
 (In reply to comment #4)
  Your libpthreads is doing something wrong.
  Re. comment 5
 The command was actually
 gcc -fopemnp test.c -lgomp -o test.exe
 

That command works for me with gcc 4.3.4, 4.4.0 and trunk
In 4.4.0 and trunk, test.exe links against LIBGOMP-1.DLL which in turn resolves
the pthread imports from PTHREADGCE2.DLL, which is distributed by the
pthreads-win32 project
http://sources.redhat.com/pthreads-win32/

My version of 4.3.4 has local mods.  I'm not sure if the shared libgomp build
was standard then.

How did you build gcc-4.3.0?  You need to add  --enable-libgomp to configure
and ensure that libpthread.a (note spelling) can be found.

Danny


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939



[Bug target/39939] MinGW 4.3.0 fails to link sample programme.

2009-04-30 Thread dannysmith at users dot sourceforge dot net


--- Comment #10 from dannysmith at users dot sourceforge dot net  
2009-04-30 21:07 ---
(In reply to comment #9)
 (In reply to comment #6)
  (In reply to comment #4)
   Your libpthreads is doing something wrong.
   Re. comment 5
  The command was actually
  gcc -fopemnp test.c -lgomp -o test.exe
  
 
 That command works for me with gcc 4.3.4, 4.4.0 and trunk
 In 4.4.0 and trunk, test.exe links against LIBGOMP-1.DLL which in turn 
 resolves
 the pthread imports from PTHREADGCE2.DLL, which is distributed by the
 pthreads-win32 project
 http://sources.redhat.com/pthreads-win32/
 
 My version of 4.3.4 has local mods.  I'm not sure if the shared libgomp build
 was standard then.


No it wasn't. And so the problem is that libgomp.spec says:
# This spec file is read by gcc when linking.  It is used to specify the
# standard libraries we need in order to link with -fopenmp.
*link_gomp: -lgomp %{static: -lpthread }

You have not specified '-static', so you must provide the '-lpthread' (again
note spelling) yourself.

Danny


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939



[Bug target/39939] MinGW 4.3.0 fails to link sample programme.

2009-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2009-04-30 05:02 ---
ok, mingw should be linking against libpthreads with -fopenmp (it should also
be linking against libgomp also)

I don't think libgomp has been ported to mingw yet.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|libgomp |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939