[uClibc]buildroot: building the dev environment to run on the target

David Wuertele dave-gnus at bfnet.com
Tue Mar 4 01:18:29 UTC 2003

First, I just have to say buildroot rocks!  Thanks Erik!

I'm using buildroot downloaded from CVS on Feb 28.  My target arch is
mipsel, my build arch is i686.  I have two issues with the "Everything
needed to build a full uClibc development system!" section of the
buildroot makefile.  The first issue is with the way the makefiles
call ./configure in each of the packages.

I'm attempting to build a complete dev environment that runs on my
target, so my host arch is the same as my target arch.

It seems that the gcc_target.mk (and many of the other .mk files)
cause configure to guess the wrong build architecture.  It looks like
you must specify both the "build" and "host" system when
cross-building, since if you just specify "host", configure assumes
the build system is the same as the host system.  I found that by
changing every instance of the execution of ./configure in the .mk
files from:

           .../configure \
		--target=$(GNU_TARGET_NAME) \


           .../configure \
		--build=i686-pc-linux-gnu \
		--host=$(GNU_TARGET_NAME) \
		--target=$(GNU_TARGET_NAME) \

EXCEPT for the uclibc_toolchain.mk file.  In the case of the
toolchain, the host and the build arch are the same, so in the
uclibc_toolchain.mk file I changed it to:

           .../configure \
		--build=i686-pc-linux-gnu \
		--host=i686-pc-linux-gnu \
		--target=$(GNU_TARGET_NAME) \

This all appears to work fine for me up until the gcc-target/Makefile
tries to run 'mipsel-linux-gcc -dumpspecs > tmp-specs'.  There is no
mipsel-linux-gcc, and even if there were, it isn't what I would
expect.  I would have expected it to want to run mipsel-uclibc-gcc at
this point.  Why is it running mipsel-linux-gcc?

My second issue with buildroot is that ranlib doesn't get discovered
properly by the various ./configure scripts.  I added 


to the top-level makefile, and in the .mk makefiles I changed the
configure invocation from:

	./configure \


	./configure \

That did the trick.  Again, I don't know how this could work any other
way.  Did I misconfigure anything?

Aside from these two issues with the buildroot makefiles, there were
of course some issues inside various of the packages where the
configure script tries to run a program compiled for the target.  In
those cases I just followed Dana Soward's lead and amputated those
segments out of the configure script, and just hope that the default
is right.

If y'all would like to see patches that recreate the changes I made to
get a full dev system for mipsel, let me know.

Thanks again,

More information about the uClibc mailing list