This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/3] Move data definitions from icv.c back to env.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: Sebastian Huber <sebastian dot huber at embedded-brains dot de>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Nov 2016 18:50:47 +0100
- Subject: Re: [PATCH 3/3] Move data definitions from icv.c back to env.c
- Authentication-results: sourceware.org; auth=none
- References: <1975510021.15120.1480455073650.JavaMail.zimbra@embedded-brains.de> <alpine.LNX.2.20.13.1611300107450.2229@monopod.intra.ispras.ru> <501123062.16535.1480514780572.JavaMail.zimbra@embedded-brains.de> <alpine.LNX.2.20.13.1611302005130.9298@monopod.intra.ispras.ru> <alpine.LNX.2.20.13.1611302028100.9298@monopod.intra.ispras.ru>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 30, 2016 at 08:36:27PM +0300, Alexander Monakov wrote:
> env.c contains a static constructor that would initialize various global libgomp
> data such as members of gomp_global_icv. Therefore it's not ok to define them
> in a separate translation unit: under static linking this results in env.o not
> linked in (unless an incremental link on icv.o+env.o is performed when building
> libgomp.a). Move definitions of global data from icv.c back to env.c, remove
> empty config/nvptx/env.c, and guard environment access on NVPTX using the new
> LIBGOMP_OFFLOADED_ONLY macro.
>
> * config/nvptx/env.c: Delete.
> * icv.c: Move definitions of ICV variables back ...
> * env.c: ...here. Do not compile environment-related functionality if
> LIBGOMP_OFFLOADED_ONLY is set.
Can you please move the ICVs after all the (especially system) headers are included,
even when it means 2 separate #ifndef LIBGOMP_OFFLOADED_ONLY instead of just
one? Ok with that change.
Jakub