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 libgcc/60790] libatomic convenience library selects IFUNC implementation before obtaining cpu info.


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

--- Comment #5 from Gary Funck <gary at intrepid dot com> ---
(In reply to Andrew Pinski from comment #2)
> It is better if you just link directly against libatomic.  We already
> require that for C11 _Atomic support in some/most cases.

As Ian notes, this issue would apply if libatomic were statically linked as
well.

In GNU UPC, we have a technical need to link in the (static) convenience
library, apart from it being "convenient" for the user: we need to substitute
our own locking routines.  I plan to submit a separate RFE on this.

Basically, we need process-level system wide locks because in the default
configuration UPC "threads" map to an operating system "process".  The current
libatomic implementation uses pthread mutexes.   We of course could build our
own libatomic types of facility, but that is a lot of work - libatomic is
well-engineered and apart from our need to have a different locking policy it
is a good fit for our application.  (detail: we had to build a
libatomic_convenience_nolock.a archive).

PS: It would be helpful to have a separate "libatomic" bug reporting category.


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