------- Comment #5 from jv244 at cam dot ac dot uk  2009-02-13 14:01 -------
(In reply to comment #4)
> It is glibc specific, on the other hand it isn't particularly -fopenmp 
> related.
> I guess easiest will be if glibc stops shipping libpthread.a.

but if -fopenmp automatically adds -lpthread maybe it should do it in the
'proper' way if -static is also on the command line (eventually bailing out if
libpthread.a can not be found)? 

Note, e.g. a warning is produced for similar issues already, e.g. I see:

/home/u1/vondele/gcc_trunk/build/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../lib64/libgfortran.a(getlog.o):
In function `_gfortran_getlog':
/home/u1/vondele/gcc_trunk/gcc/libgfortran/intrinsics/getlog.c:82: warning:
Using 'getpwuid' in statically linked applications requires at runtime the
shared libraries from the glibc version used for linking

let me reopen the bug, removing the regression marker, and as an enhancement. I
think that a warning, or adding -lpthread in the 'proper' way if -static will
save many other users from loosing time on this one.


-- 

jv244 at cam dot ac dot uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|RESOLVED                    |UNCONFIRMED
          Component|libfortran                  |libgomp
         Resolution|INVALID                     |
            Summary|[4.4 Regression] -static and|-static and -fopenmp and io
                   |-fopenmp and io causes      |causes segfault
                   |segfault                    |


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

Reply via email to