Re: Generating unistd_*.h

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

 



On Fri, Aug 26, 2011 at 05:20:48PM -0700, H. Peter Anvin wrote:
> I am working on a patchset after which unistd_*.h in the x86 tree will
> be autogenerated by scripts.  This is a substantial cleanup and a
> preparation for the x32 setup.
> 
> However, one consequence of this is that <asm/unistd.h> will now include
> a number of autogenerated fragments, some of which will be needed by
> "make headers-install".  Furthermore, since <asm/asm-offsets.h> depends
> on <asm/unistd.h> this creates a new dependency which I'm not sure what
> the best way to handle is from a kbuild perspective.
> 
> 1. Is there a better place than others to put these generated files
>    (i.e. other than $(obj)/arch/x86/include/asm)?
$(obj)/arch/x86/include/generated

This is what generic-y supports uses.


> 
> 2. Is there a better place than others to put the rules for generate
>    these files?
> 
> 3. There needs to be an arch-specific way to encode the dependency
>    before asm-offsets.h is generated.  Preferences here?

Use "archprepare".

Something like this in arch/x86/Makefile:


archprepare: arch/x86/tools/syscall-magic.sh
	$(CONFIG_SHELL) $<



It should IIRC be execute before we try to create asm-offsets.h.
So there is no dependency issues.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux