Re: Some errors occurred when building Linux 2.4.36 Kernel used for building cross-compiler

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

 



On 12/10/2023 20:42, Dingjun Chen wrote:
Hi, guys,

I want to build Linux 2.4.X kernel (head files and its libraries) in order to build a cross compiler GCC. However some errors occurred.

it requests the gcc version currently used on my host machine is less than 4.2.

So I tried gcc 4.0. However while making gcc 4.0 sourc codes, and please see below for details.


Could someone help me with these two errors ?  I really want to build a cross-compiler in order to run our 32-bit application on i686 single board computer, which has the following information:


Any gcc for x86 targets will be able to build binaries for your 32-bit i686. Just use the "-m32" flag to tell it to build 32-bit binaries rather than the default 64-bit binaries. (You probably want other x86-specific flags to get optimal targetting of the specific processor.)

But in general, when you are dealing with these very old versions of kernels and compilers, you will have trouble on more modern OS's. I recommend that you install an old Debian (or Red Hat, or whatever you prefer) and use that as your build system - play around with different versions until you find one that is happy with the toolchain and kernel builds that you want. Depending on your preferences and experiences, such a build system would ideally be in a Linux container of your main system, but you should also be fine with a full virtualisation such as KVM or VirtualBox.

Although using such an old image in a virtual machine will take some effort, I would expect you will use a lot less time than trying to compile with modern systems and fight errors one by one as they pop up.

David





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux