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 14 June 2017 at 00:41, Iain Buclaw <ibuclaw@gdcproject.org> wrote:
> On 13 June 2017 at 19:29, Joseph Myers <joseph@codesourcery.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
>> hooks.)
>>
>
> 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
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.

Regards
Iain


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