[uClibc] Build uClibc in a different directory from the source tree?

Carl Miller chaz at energoncube.net
Thu Dec 18 18:10:00 UTC 2003


> Hi Carl,
> 
> I have had a go at applying the patch. I am using the CVS head version of
> uClibc and it clashed on most makefiles so I am slowly working in the
> changes by hand.

Yeah, I figured it wouldn't go in cleanly to other than the 0.9.23
release.  That was the latest at the time I started working on it.

> There could be some scope to split this into a few smaller
> patches. I have notice a lot of places where you replace $*.o with $@. This
> is just good makefile practice.

Yes, that cleanup should probably be its own patch.  It was only time
pressure that convinced me not to split it out.  It took long enough to
go through every makefile to add SRCDIR and SRCTOPDIR variables, and use
them everywhere appropriate.

> Also you have a fix in the top level
> makefile that I have previously submitted but is not in CVS yet. Maybe I
> need to resubmit some of this.
> 
> Not really sure the perl relocate script is the way to go. There is some
> opposition to using perl in the build process as it makes native compiles
> harder.

Hmmmm, I suppose you have a point there.  Let me raise two counter-arguments
if I could:
  a) If you're compiling uClibc native on a stripped-down box that doesn't
     have Perl, there's less reason to do the build outside of the source
     directory.  You're almost certainly not going to be building multiple
     configurations or multiple architectures from the same source tree.
     If you only do a single build in the source tree, there's no reason
     to run relocate.  I left all the makefiles such that they should work
     right out of the box for a traditional in-source-tree build.
  b) Failing that, relocate doesn't use very much of Perl's capability.  It
     could probably be rewritten as a bash script with calls out to sed,
     grep, cut, and maybe a few other common file/text utilities.  Would
     that make it more palatable?

> When I walk through the other manual changes I will have a go at building
> and let you know how I get on.

Great, thanks!


                             -----Carl



More information about the uClibc mailing list