Binutils-2.17 | gcc-4.1.1 | glibc-2.5 for cross compiler record highlights
Source: Internet
Author: User
Binutils-2.17 | gcc-4.1.1 | glibc-2.5 for cross compiler record points-Linux general technology-Linux technology and application information, the following is a detailed reading. Author: iibull email: iibull@yahoo.com.cn nick: Daniel @ FUZHOU 20080515
If you need to reprint it, please indicate the author's source.
Tossing a day, finally get the arm-linux-gcc4.11. The record is as follows. By the way, I wish my daughter a happy birthday.
On the homepage, prepare the software packages for compilation:
Software Package
Http://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2 wget-c
Http://ftp.gnu.org/gnu/gcc/gcc-4.1.1/gcc-4.1.1.tar.bz2 wget-c
Http://ftp.gnu.org/gnu/glibc/glibc-2.5.tar.bz2 wget-c
Http://ftp.gnu.org/gnu/glibc/glibc-ports-2.5.tar.bz2 wget-c
Http://ftp.gnu.org/gnu/gdb/gdb-6.6.tar.bz2 wget-c
Wget-c http://www.kernel.org/pub/linux/kernel/v2.6/source code file and patch
Install some software packages that may be required:
Sudo apt-get install bison flex texinfo gawk
Working directory of the entire compilation process:
Sudo mkdir/crosstool
Sudo chmod a + rwx/crosstool
Cd/crosstool
Mkdir linux-2.6.20
Mkdir-p src/patches
Linux-2.6.20 to store the kernel header files to use, patches to store the required patches, src to store the software package PS: after the completion of the compilation of files will be installed ~ /Arm-linux
Install the kernel header file:
Create a directory for saving the header file and generate a linux/version. h file to indicate the kernel version. If this file is missing, an error will occur during subsequent compilation.
Install-dv $ {CLFS}/usr/include
Cd linux-2.6.20
Make include/linux/version. h
Compile binutils-2.17:
# Install necessary patches
Cd src
Tar jxvf binutils-2.17.tar.bz2
Cd binutils-2.17
Patch-Np1-I ../patches/binutils-2.17-posix-1.patch (do not mess up the patch, otherwise make will not succeed)
Create a compilation directory:
Mkdir-v ../binutils-build
Cd ../binutils-build
Install binutils to $ {CLFS}/cross-tools:
Make install
Open $ {CLFS}/cross-tools/bin, and many files starting with "arm-linux-" are generated.
The following header file will be used in the future, so install it in include:
Cp-v ../binutils-2.17/include/libiberty. h $ {CLFS}/usr/include
Install the header file of glibc to the kernel header file
The header file of glibc is required for compiling glibc, so it must be copied to the kernel header folder.
Cd src
Tar jxvf glibc-2.5.tar.bz2
Cd glibc-2.5
Install the glibc header file:
Make install-headers # (if mawk is used, an error will be sent. Modify vi .. /glibc-2.5/scripts/gen-sorted.awk error 19/59/65 lines of modification code change \ [^ \] To \ [\ ^]) or install gawk Tool
Cp-v bits/stdio_lim.h $ {CLFS}/usr/include/bits
Touch $ {CLFS}/usr/include/gnu/stubs. h
Cp-v ../glibc_2.5/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes. h $ {CLFS}/usr/include/bits
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.