[uClibc]cvs commit to uClibc by andersen

Manuel Novoa III mnovoa3 at bellsouth.net
Thu Apr 5 18:07:52 UTC 2001


On Thu, 05 Apr 2001, Erik Andersen wrote:
> On Thu Apr 05, 2001 at 11:34:19AM +0200, Michael Shmulevich wrote:
> > Erik,
> > 
> > I honestly think it is not a good idea. I use the compiler when 
> > compiling the library itself.
>
> You mean in unistd/Makefile, or something else?
> I do not think using the uClibc compiler wrapper is a good
> idea as part of the build process.  I think we should use the
> native system compiler for all such interum steps.  The results
> should be exactly the same, except there will be less pain when
> trying to (on a native system) bootstrap a new arch.

Speaking as the one who moved gcc-uClibc up in the build order so that it could
be used in the unistd/Makefile, I don't have a problem with moving it back and
using the native/cross) compiler.  I did it the way I did because it was
convenient at the time.  Anyway, the whole build of gen_sysconf needs to be
reworked.  I just haven't had time to do it the right way.  Even the way it was
though, it should not cause a problem when porting.  I can understand you not
wanting to set a precedent though.

HOWEVER, gen_sysconf HAS to be linked against the uClibc library and RUN on the
target platform in order to build the correct sysconf-{TARGET}.c file. 

The generic sysconf.c file is A BLOATED PIG (TM).  On i386, the sizes I get
are 903 bytes (generic) vs 299 bytes (specific).  I think it is worth a little
trouble to save 600 bytes or so.  If the target and native archs are the same,
then it can (and imo should) be done automatically.  So, I had reordered the
build so that everything needed from static uClibc by gen_sysconf would already
have been built and added to the lib by the time it was needed.

Also, speaking as the one who wote gcc-uClibc.c in the first place ;-) I can
say that there are some changes that need to be made to it.  Right now, it
always looks for the static lib and crt0.o in the uClibc build directory.  It
doesn't take into account INSTALL_DIR at all.  That worked for me since I never
do a make install anyway ;-) but it should probably be changed.  Changing it
introduces other problems though... it would break the build of uClibc/test
since you would then be testing against the _installed_ library vs the one in
the build directory.  I've thought about adding an option to gcc-uClibc to
select searching in the install (default) vs build (option) directory. 
Thoughts?

Manuel





More information about the uClibc mailing list