This is the mail archive of the gcc-patches@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]

Re: [PATCH 2/13] D: The front-end (GDC) implementation.


On Wed, 14 Jun 2017, Iain Buclaw wrote:

> Just to make sure I understand the structure correct.  There are a a
> lot of files that would be involved.
> 
> - d/d-target.def: Define the hooks.
> - d/d-target.h: Data definitions, extern gcc_targetdm;
> - d/d-target-def.h: Default initializers (if applicable?)
> - config.gcc: Add d_target_objs, assign platform and cpu files to it
> as necessary.
> - config/cpu/cpu-d.c: For each CPU that needs it, new file.  Here
> would go CPU-related versions.
> - config/os-d.c: For each OS that needs it, new file.  Here would go
> OS and CRuntime versions, and other information like
> sizeof(pthread_mutex_t).
> - config/default-d.c: Define targetdm.
> - config/glibc-d.c (others): Replaces default-d.c.
> - config/t-glibc (others): Add build rules for above source file.
> - Makefile.in: Add genhooks for d-target-hooks-def.h, build rule for default-d.c
> 
> I think that covers everything.

That seems about right - subject to the issue of how architecture-specific 
configuration is visible to the definition of targetdm if that definition 
is in an OS-specific file, without ending up with a target macro in tm.h 
that's visible everywhere (see the suggestion in config/default-c.c of 
having a tm_c.h for such definitions, so tm_d.h in this case).

-- 
Joseph S. Myers
joseph@codesourcery.com


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