Заметка о том, как поставить обновленный компилятор в Debian Lenny. Всем известно, что в Debian Lenny по-умолчанию стоит GCC 4.3.2. Иногда требуется для сборки из исходников воспользоваться более новой версией этого компилятора, поэтому… Подключаем репозитарий testing:
s1:/# echo "deb http://ftp.debian.org/debian testing main contrib" >> /etc/apt/sources.list
После чего смотрим, что есть по GCC в нем:
s1:/# aptitude search gcc p colorgcc - Colorizer for GCC warning/error messages ----[ skip ]---- i A gcc - The GNU C compiler i A gcc-4.3 - The GNU C compiler i gcc-4.3-base - The GNU Compiler Collection (base package) p gcc-4.3-locales - The GNU C compiler (native language support files) p gcc-4.3-multilib - The GNU C compiler (multilib files) p gcc-4.3-source - Source of the GNU Compiler Collection i gcc-4.4 - The GNU C compiler i A gcc-4.4-base - The GNU Compiler Collection (base package) p gcc-4.4-locales - The GNU C compiler (native language support files) p gcc-4.4-multilib - The GNU C compiler (multilib files) p gcc-4.4-source - Source of the GNU Compiler Collection ----[ skip ]----
Ну и устанавливаем стандартно:
s1:/# aptitude install gcc-4.4 g++-4.4
После перезагрузки выполняем:
s1:/# gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.4-5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.4 (Debian 4.4.4-5)