[patch] Bugs in install_headers

Joseph S. Myers joseph at codesourcery.com
Sat Feb 11 09:39:20 UTC 2006


On Fri, 10 Feb 2006, Mike Frysinger wrote:

> On Friday 10 February 2006 17:18, Joseph S. Myers wrote:
> > On Fri, 10 Feb 2006, Mike Frysinger wrote:
> > > going through my backlog here ... this should be resolved now in uClibc
> > > svn head ... if it isnt, can you post an up-to-date patch please ?
> >
> > The issue of headers being copied over themselves isn't resolved.  Here's
> > a current patch.  Again, the headers are copied to
> > $(PREFIX)$(DEVEL_PREFIX) (not to plain $(DEVEL_PREFIX)) so that is what
> > must be compared with $(KERNEL_SOURCE) to avoid tar copying files to
> > themselves.
> 
> so we're clear, what are you trying to fix ?  are  you trying to avoid copying 
> too often or not enough ?  i'm thinking the test should read:
> if [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] || \
>    [ "$(KERNEL_SOURCE)" = "$(PREFIX)$(DEVEL_PREFIX)" ] ; then

Trying to avoid copying too often (specifically, avoiding tar truncating a 
file by trying to copy it to itself).  Kernel headers should be copied to 
$(PREFIX)$(DEVEL_PREFIX) iff they didn't come from there.

It might be possible for $(DEVEL_PREFIX) and $(KERNEL_SOURCE) to be /usr 
(copying system kernel headers from /usr/include to the target sysroot, in 
the case that the target and host architectures are the same), where 
$(PREFIX) gives the location of the target sysroot, and in that case the 
headers do need copying to $(PREFIX)$(DEVEL_PREFIX).  (That's not the 
configuration I use - I use $(DEVEL_PREFIX) being /usr and 
$(KERNEL_SOURCE) being $(PREFIX)$(DEVEL_PREFIX) - but it seems a possible 
configuration where testing [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] 
would end up copying too little.)

-- 
Joseph S. Myers
joseph at codesourcery.com



More information about the uClibc mailing list