This is the mail archive of the
mailing list for the GCC project.
Re: [libgomp] No references to env.c -> no libgomp construction
----- Alexander Monakov <firstname.lastname@example.org> schrieb:
> On Tue, 29 Nov 2016, Sebastian Huber wrote:
> > * env.c: Split out ICV definitions into...
> > * icv.c: ...here (new file) and...
> > * icv-device.c: ...here. New file.
> > the env.c contains now only local symbols (at least for target *-rtems*-*):
> > Thus the libgomp constructor is not linked in into executables.
> Thanks for the report. This issue affects only static libgomp.a (and not on
> NVPTX where env.c is deliberately empty).
> I think the minimal solution here is to #include <env.c> from icv.c instead of
> compiling it separately (using <> inclusion rather than "" so in case of NVPTX
> we pick up the empty config/nvptx/env.c from toplevel icv.c).
> A slightly more involved but perhaps a preferable approach is to remove
> config/nvptx/env.c, introduce LIBGOMP_OFFLOADED_ONLY macro, and use it to
> guard inclusion of env.c from icv.c (which then can use the #include "env.c"
I guess its sufficient to move
from team.c (NVPTX seems to provide its own team.c) to env.c. This generates a reference from team.c to env.c and the constructor is pulled in.
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.