Building the tools from scratch as none privileged user

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First off, if this is not the most appropriate place for this discussion please direct me elsewhere.

I created a user called avr32 and I'm trying to build and install a working toolchain under that users home directory. The reasons are:
1 )Get a good working understanding about building the tools from first principles.
2) Can delete and reinstall a completely new set of tools without having to dig through the /usr directory tree.
3) I don't feel I have as much control over buildroot as I would have configuring and installing the tools myself.

I've made it through Binutils, GCC bootstrap, Kernel headers, uClibc, U-Boot and Linux but get errors when building the full version of GCC. I got stuck when GCC could not find some header files but created a symbolic link to where the compiler was looking (~/tools/avr32-linux/include/sys-include) for headers. The problem I now have is the following error message:

Quote:

checking for sin in -lm... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make: *** [configure-target-libstdc++-v3] Error 1

Can anyone direct me to a HowTo on installing a local toolchain that uses uClibc, I can't imagine I'm the first person to try this with so many embedded Linux systems out there.

I'm quite prepared to post or create a wiki entry when done for future users.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I used some of the configure options in my own configuration, but like all other installs, it assumes you are going to install everything under /usr and not your own home directory.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just change the --prefix to whatever suits your need :) For example "--prefix=$HOME/avr32", then you should get everyting in the $HOME/avr32 folder (bin, lib, share, etc.).

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's what I've done and I managed to get pretty far through the toolchain.
The problem is where the best place to install uClibc is, and do I have to tell the compiler where to find it since it's probably not where it would normally expect to find it.
I'm surprised that I wasn't able to find more information using Google as I'm sure many people must have done this for other Linux supported platforms.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What I've done is create three directories under ~/, called ~/build, ~/root and ~/tools.
~/build is where I do all the toolchain building.
~/root is where I'm copying files like uImage and uClibc libraries.
~/tools is where the compiled toolchain is located, so most of the time --prefix is set to /home/avr32/tools

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that you need to install the uClibc libraries (as well as all other dynamic libraries) under both ~/root and ~/tools/avr32-linux.