Here are the results of my attempt to build from scratch: I got hold of the avr-libc-1.6.4 user manual, read section 12 and started digging in. I choose the option of setting my PREFIX to $HOME/local/avr instead of /usr/local/avr. Hey... the manual mentions some patches I might need... I'll put off applying those for the moment (Patches? What patches?).
So, after a bit of effort, farting around and stumbling in the dark, I was finally able to get binutils-2.19, gcc-4.3.3 (with mpfr-2.4.1 and gmp-4.2.4 placed in the source tree) and avr-libc-1.6.4 to build. However, the build of avrdude-5.6 craps out. Still, undaunted, I try to use the parts of the toolchain that did successfully build to try to compile my tiny88 project, and what do I discover? That I still don't get any support for the ATtiny88! Aaargh.
After repeatedly striking my forehead upon a hard surface, I began to realize my problem might be that maybe I needed to apply those patches to binutils and gcc after all.
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-binutils/files/patch-newdevices http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-gcc/files/patch-newdevices
Now, I must admit that I am a complete newbie when it comes to applying source-level patches (or even fully understanding them, for that matter) which explains my reluctance to try in the first place. Nevertheless, taking a deep breath, I go for it and download the latest patches.
However, when I read the cvs log entry for avr-binutils patch-newdevices (rev 1.12), I find the remark "Update to binutils-2.18". Hmm, does this mean that this patch is supposed to be applied to binutils-2.18? Thinking the answer is "yes", I instead download binutils-2.18, apply the patch and try to build that. I also download gcc-4.2.2 since the latest GCC patch-newdevices seems to point to that release.
Now, when I try to build, I can't even get past binutils because I get the error:
WARNING: makeinfo' is missing on your system. You should only need it if you modified a .texi' or .texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy make' (AIX, DU, IRIX). You might want to install the Texinfo' package or the GNU make' package. Grab either from any GNU archive site. make[3]: *** [bfd.info] Error 1
WTF?
So, I try to look around to see what this is about and find various references to this problem. I find the following bug which references a patch that is supposed to fix it:
Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=5021
Patch: http://gcc.gnu.org/ml/gcc-patches/2007-09/msg01271.html
Unfortunately, applying the patch to my binutils-2.18 doesn't work. The lines in the diff don't even match the actual lines that are in the binutils-2.18 configure.ac script file. The diff says that the changed files start at line 2454 but in the configure.ac in 2.18 these lines start at 2403. I don't understand... is there another "2.18" to which this diff is referring?
Anyway, I change the diff to fix the line numbers so they match the sources I have and apply the patch and still I get the error. Now what?
So, I go hunting around some more. More Googling yields another bug report:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/226037
Now, this is appears to be the same problem I'm having. However, the bug report says the problem's fixed and provides a link to what appears to be a patch of patches:
Also, the file version name seems different from the release I wanted to use, which is binutils_2.18.1~cvs20080103-0ubuntu1. What is this? What do I apply this patch of patches to? Do I apply it to binutils_2.18.1~cvs20080103.orig? Will this version be compatible with the patch-newdevices?
http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.18.1~cvs20080103-0ubuntu1.diff.gz
Also, the directory containing this patch also contains a bunch of .deb files. I'm not quite sure what a .deb file is but I doubt it has anything to do with anyone named Debbie (dang it!). Are these precompiled binaries or source distributions? If they are sources, and if I install them, will they end up where I want them?
I am starting to get a little discouraged ... I've been bumbling at this, off an on, for a couple of weeks now and haven't made any headway. Maybe I'm a bit retarded or something but, really, doesn't this stuff seems kinda hard?
Any help/guidance would be greatly appreciated. Does anybody have a script or description of a successful build of the entire toolchain that I could study (i.e. copy)?
All comments welcome!
Best to all, Allan