[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: troubles with kernel compiling



Wed, Dec 21, 2005 at 11:05:07PM +0300, Вы(Andrey Melnikoff) написали:
> Иван Лох <loh@1917.com> wrote:
> > On Wed, Dec 21, 2005 at 10:00:35PM +0300, Artem Chuprina wrote:
> > >  >>Может, и будут, но не факт.  Сильно подозреваю, что извращенцев, которые
> > >  >>пользуются ядрами 2.4, но gcc 4.x, достаточно мало...
> > >  >>
> > >  A> ну почему-же , допустим есть какое-нить железо с драйверами  только к 2.4 и
> > >  A> т.д.
> > > 
> > > Я же не сказал, что их нет.  Их мало.  Страшно далеки они от.
> > Думаю, что таких людей довольно много, но 99% из них имеют более одного
> > установленного gcc в системе... На всякий случай. 
> Ага. Щаз. Вон индивидумы пытаются собирать >= 2.6.14 с помощью gcc-2.95. Как
> думаешь - что у них получается ? ;)

Как ни странно, но получается вполне рабочее ядро:

# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux-gnu/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
# cpp -v
Reading specs from /usr/lib/gcc-lib/i486-linux-gnu/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
 /usr/lib/gcc-lib/i486-linux-gnu/2.95.4/cpp0 -lang-c -v -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di486 -D__i486 -D__i486__ -
GNU CPP version 2.95.4 20011002 (Debian prerelease) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i486-linux-gnu/2.95.4/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/lib/gcc-lib/i486-linux-gnu/2.95.4/../../../../include/g++-3
 /usr/lib/gcc-lib/i486-linux-gnu/2.95.4/../../../../i486-linux-gnu/include
End of omitted list.

# uname -a
Linux xxx 2.6.14.3-sayd0 #1 Thu Dec 15 09:22:59 MSK 2005 i686 GNU/Linux

Более того.. в Documentation/Changes написано:

The recommended compiler for the kernel is gcc 2.95.x (x >= 3), and it
should be used when you need absolute stability. You may use gcc 3.0.x
instead if you wish, although it may cause problems. Later versions of gcc
have not received much testing for Linux kernel compilation, and there are
almost certainly bugs (mainly, but not exclusively, in the kernel) that
will need to be fixed in order to use these compilers. In any case, using
pgcc instead of plain gcc is just asking for trouble.

The Red Hat gcc 2.96 compiler subtree can also be used to build this tree.
You should ensure you use gcc-2.96-74 or later. gcc-2.96-54 will not build
the kernel correctly.

In addition, please pay attention to compiler optimization.  Anything
greater than -O2 may not be wise.  Similarly, if you choose to use gcc-2.95.x
or derivatives, be sure not to use -fstrict-aliasing (which, depending on
your version of gcc 2.95.x, may necessitate using -fno-strict-aliasing).

-- 
	Burchu Sergey.



Reply to: