This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/24991] [4.1/4.2 Regression] gfortran build fails with - error:gthr-default.h: No such file or directory



------- Comment #29 from geoffk at gcc dot gnu dot org  2005-11-25 22:06 -------
Some comments:

1. There is no need to use weak symbols for pthreads on Darwin.  There's no
separate pthread library like on some other OSs.
2. Some older versions of Darwin do not support weak symbols *at all*.  Using a
weak symbol in an executable will cause it not to load.
3. Unless you set the -mmacosx-version-min flag, the linker will not let you
use weak symbols, it will make them strong.  If you really plan to not support
earlier Darwin versions, though, it is better to set the flag, since that makes
other efficiency improvements.
4. The 'weakref' attribute is new.  The gcc.dg/attr-weakref-1.c test fails on
Darwin.  The feature appears to have been added very late in the 4.1 timeframe
and so wouldn't necessarily have support on all targets, and bugs in it are not
regressions and so are unlikely to be fixed for 4.1.  There's some work to do
to make it properly integrate with the Darwin port, because Darwin already has
weak_import and I believe these two attributes are actually the same thing.

So, I think it would be better if gfortran followed libstdc++ and didn't try to
make the thread symbols weak on Darwin. Failing that, at least for 4.1, use
weak_import rather than weakref on Darwin.


-- 

geoffk at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |geoffk at gcc dot gnu dot
                   |                            |org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]