This is the mail archive of the
mailing list for the GCC project.
Re: [libgomp] No references to env.c -> no libgomp construction
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 30 Nov 2016 01:36:25 +0300 (MSK)
- Subject: Re: [libgomp] No references to env.c -> no libgomp construction
- Authentication-results: sourceware.org; auth=none
- References: <1975510021.15120.1480455073650.JavaMail.firstname.lastname@example.org>
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"