On Mon, 2009-06-01 at 11:14 -0700, Steve Kargl wrote:
> On Mon, Jun 01, 2009 at 07:59:15PM +0200, Gerald Pfeifer wrote:
> >   Excess errors:
> >   /pfeifer/OBJ-0531-2252/i386-unknown-freebsd7.1/./libgomp/.libs/libgomp.so:
> >   undefined reference to `pthread_create'
> > 
> > And what all of these three testcases have in common is
> > 
> >   { dg-options "-fno-openmp" }
> > 
> > So, it seems -fno-openmp in combination with an attempt to still link
> > libgomp.so leads to this failure.
> > 
> > 
> > Is it possible this is an issue with the testsuite rather than with
> > the code on FreeBSD?
> > 
> 
> The code is fine.  The problem is with the testsuite.  When
> -fopenmp is used on FreeBSD, the additional option -pthread
> is added to the list of options.
> 
> REMOVE:kargl[28] gfortran -v -fopenmp -c d.f90
> Using built-in specs.
> Target: i386-portbld-freebsd8.0
> Configured with: ./..//gcc-4.3-20081120/configure --disable-nls 
> --with-system-zlib --with-libiconv-prefix=/usr/local --with-gmp=/usr/local 
> --program-suffix=43 --libdir=/usr/local/lib/gcc-4.3.3 
> --with-gxx-include-dir=/usr/local/lib/gcc-4.3.3/include/c++/ --disable-rpath 
> --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc43 
> --build=i386-portbld-freebsd8.0
> Thread model: posix
> gcc version 4.3.3 20081120 (prerelease) (GCC) 
> COLLECT_GCC_OPTIONS='-v' '-fopenmp' '-c' '-mtune=i386' '-pthread'
> 
> If someone uses -fno-openmp and still tries to link to libgomp,
> then the -pthread option is missing and hence the test fail
> because -lpthread is not included.  On FreeBSD, libgomp.so.1
> does not show a dependency on libpthread, so the dynamic linker
> can't automagically work.

Why doesn't libgomp.so.1 show a depedency on libpthread, isn't
that the bug?

> REMOVE:kargl[30] ldd /usr/home/kargl/work/lib/libgomp.so.1
> /usr/home/kargl/work/lib/libgomp.so.1:
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x481a8000)

Janis

Reply via email to