This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 2/13] D: The front-end (GDC) implementation.
- From: Iain Buclaw <ibuclaw at gdcproject dot org>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 14 Jun 2017 23:58:46 +0200
- Subject: Re: [PATCH 2/13] D: The front-end (GDC) implementation.
- Authentication-results: sourceware.org; auth=none
- References: <CABOHX+eUKoD4VOdsmaQW+BC2fwt1v0r_OaAABz_TjjdJj7OhDQ@mail.gmail.com> <alpine.DEB.firstname.lastname@example.org> <CABOHX+efuDWLhAkgDwO9n=i3ixHKwyPe2MUuumy51pPok8NGemail@example.com>
On 14 June 2017 at 00:41, Iain Buclaw <firstname.lastname@example.org> wrote:
> On 13 June 2017 at 19:29, Joseph Myers <email@example.com> wrote:
>> You have two new target macros TARGET_CPU_D_BUILTINS and
>> TARGET_OS_D_BUILTINS. You're missing any documentation for them in
>> tm.texi.in. And we prefer target hooks to macros. So please try to
>> convert them to (documented) target hooks. (See c-family/c-target.def,
>> and c_target_objs etc., for how there can be hooks that are specific to
>> particular front ends. See the comment in config/default-c.c regarding
>> how to deal with a mixture of OS-dependent and architecture-dependent
> OK, thanks for the suggestion!
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
- 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
- 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.