Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:linux:arch_avr_gcc [2012/03/13 06:13]
alex
— (current)
Line 1: Line 1:
-====== Arch Linux and Xmega support in avr-gcc ====== 
  
-Unfortunately,​ the latest version of GCC does not support Atmel chips properly out-of-the-box. ​ The only fix is to use an older version of the compiler and patch the heck out of it.  The latest compiler does not support the newer Xmega series of chips at all.  As Arch Linux only cares about version numbers, the default [[http://​www.archlinux.org/​packages/​community/​i686/​avr-gcc/​|avr-gcc packages]] are broken as they do not contain the necessary patches. ​ [[https://​bugs.archlinux.org/​task/​28884|several]] [[https://​bugs.archlinux.org/​task/​28885|bug]] [[https://​bugs.archlinux.org/​task/​28886|reports]] exist for the issue, but it has not been addressed as the required versions of gcc and binutils are rather dated.  ​ 
- 
-The solution is to build the three packages from older sources, apply Atmel'​s [[http://​distribute.atmel.no/​tools/​opensource/​avr-gcc/​|patches]] , and then force pacman to ignore the '​ancient'​ packages.  ​ 
- 
-To build the packages, first download the modified PKGBUILDs: 
- 
-  * {{:​en:​linux:​binutils-avr-2.20.1-2.pkgbuild}} 
-  * {{:​en:​linux:​gcc-avr-4.5.3-1.pkgbuild}} 
-  * {{:​en:​linux:​avr-libc-1.7.1-1.pkgbuild}} 
- 
-Tell pacman to ignore updates to these packages by adding the following to ''/​etc/​pacman.conf'':​ 
- 
-<​code>​ 
-# ignore specific avr packages 
-IgnorePkg = binutils-avr gcc-avr avr-libc 
-</​code>​ 
- 
-Now, ensure the broken Arch packages are not installed: 
- 
-<​code>​ 
-# pacman -R avr-libc gcc-avr binutils-avr 
-</​code>​ 
- 
-Finally, build and install the packages: 
-<​code>​ 
-$ mkdir binutils-avr 
-$ cd binutils-avr 
-$ makepkg -sip ../​binutils-avr-*.pkgbuild 
-$ cd .. 
-$ mkdir gcc-avr 
-$ cd gcc-avr 
-$ makepkg -sip ../​gcc-avr-*.pkgbuild 
-$ cd .. 
-$ mkdir avr-libc 
-$ cd avr-libc 
-$ makepkg -sip ../​avr-libc-*.pkgbuild 
-</​code>​ 
- 
-Finally, start coding for Xmega! 
- 
-===== Old PKGBUILDs ===== 
- 
-  * {{:​en:​linux:​avr-libc-1.7.0-1.pkgbuild}} 
-  * {{:​en:​linux:​binutils-avr-2.20.1-1.pkgbuild}} 
-  * {{:​en:​linux:​gcc-avr-4.3.4-1.pkgbuild}} 
- 
-~~DISCUSSION~~