DragonFly BSD
DragonFly submit List (threaded) for 2006-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: unbreak individual module building

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 12 Nov 2006 11:38:43 -0800 (PST)

:     No, all files outside of the machine headers MUST include <machine/*.h>,
:     NEVER <cpu/*.h>.

   I should explain this a bit more.  What is happening here is that
   there are platform architecture specific includes <machine/*.h> and
   there are cpu architecture specific includes <cpu/*.h>

   BUT all #include lines must go via <machine/*.h> in order to give the
   platform architecture a chance to override or enhance/add-to the 
   cpu architecture.

   This means that a header file must exist in <machine/*.h> for every
   header in <cpu/*.h>.  I did not want to create a mess of forwarding-only
   header files in the platform architectures - amoung other things this
   would make it difficult to impossible to keep everything synchronized
   when adding or removing cpu architecture headers, since (potentially)
   many platforms might reference the same cpu architecture.  Also, certain
   platforms such as VKERNEL might wind up referencing any number of
   different cpu architectures depending on 'machine_arch' directive in
   the kernel config file.

   Because of all this the buildworld (in src/include/Makefile*) and
   buildkernel (in src/Makefile.inc1) targets synthesize the 'missing'
   <machine/*.h> header files by either creating a forwarding header
   file to <cpu/*.h> or simply copying the <cpu/*.h> to the machine/
   sub directory in the object tree or in /usr/include.

   This allows us to omit pure forwarding header files.  It also means 
   that ALL sources must access platform or cpu architecture headers
   via <machine/*.h> or risk becoming a porting nightmare when we expand
   to other cpu architectures.

					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]