Hello,

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"
form).

Thanks.
Alexander

Reply via email to