Cainiao for help !!! Compile binutils

Source: Internet
Author: User
Cainiao for help !!! Compile binutils-general Linux technology-Linux technology and application information. The following is a detailed description. Hello everyone: I learned about linux as a newbie. I started to compile binutils according to a reference document. Please help me to see why!
2. Set environment variables and prepare source code and related patches.
2.1 set Environment Variables
Arm @ ubuntu :~ $ Vi ~ /. Bashrc
Export PREFIX =/usr/local/arm/3.4.4
Export TARGET = arm-linux
Export SYSROOT =$ {PREFIX}/sysroot
Export ARCH = arm
Export CROSS_COMPILE =$ {TARGET }-
Export PATH =$ {PREFIX}/bin: $ PATH
Export SRC =/home/arm/dev_home/btools/tchain3.4.4
Note: If you have installed arm-linux-gcc and added it to environment variables, remove it from the environment to ensure that the root user and arm user environments do not contain arm-linux-gcc

2.2 prepare the source code package

2.2.1 binutils
Binutils-2.16.tar.gz name

2.2.2 gcc
Gcc-3.4.4.tar.bz2 name

2.2.3 glibc
Name: glibc-2.3.5.tar.gz (I am using 2.3.3)
Glibc-linuxthreads-2.3.5.tar.gz (I am using 2.3.3)

2.2.4 linux kernel
Name: linux-2.6.14.1.tar.bz2 (I use 2.6.16.1)

2.2.5 gdb
Gdb-6.4.tar.gz name

2.3 prepare Patches
2.3.1 ioperm. c. diff
Purpose: Call the corrected ioperm () function.

2.3.2 flow. c. diff
Purpose: modify a gcc bug.

2.3.3 t-linux.diff
Purpose: This patch is used to generate crti. o and crtn. o files.

2.4 compile GNU binutils

Log on with an arm user again to make the newly set environment variables take effect.
Arm @ ubuntu :~ /Dev_home/btools/tchain3.4.4 $ tree-L 1
.
| -- BUILD
| -- Binutils-2.16
| -- Binutils-2.16.tar.gz
| -- Flow. c. diff
| -- Gcc-3.4.4
| -- Gcc-3.4.4.tar.bz2
| -- Gdb-6.4.tar.gz
| -- Glibc-2.3.5
| -- Glibc-2.3.5.tar.gz
| -- Glibc-linuxthreads-2.3.5.tar.gz
| -- Ioperm. c. diff
| -- Linux-2.6.14.1.tar.bz2
'-- T-linux.diff
Arm @ ubuntu :~ $ Su arm
Arm @ ubuntu :~ $ Cd $ {SRC}
Arm @ ubuntu :~ /Dev_home/btools/tchain3.4.4 $ tar zxvf binutils-2.16.tar.gz
Arm @ ubuntu :~ /Dev_home/btools/tchain3.4.4 $ mkdir-p BUILD/binutils-2.16 (the command I use is mkdir-p BUILD/x/binutils-2.16)
Arm @ ubuntu :~ /Dev_home/btools/tchain3.4.4 $ cd BUILD/binutils-2.16 (the command I use is cd BUILD/x/binutils-2.16)
Arm @ ubuntu :~ /Dev_home/btools/tchain3.4.4/BUILD/binutils-2.16 $ .. /.. /binutils-2.16/configure -- prefix =$ {PREFIX} -- target =$ {TARGET} -- with-sysroot =$ {SYSROOT}
Arm @ ubuntu :~ /Dev_home/btools/tchain3.4.4/BUILD/binutils-2.16 $ make
The following error occurs:
...
Checking host system type... i386-pc-linux-gnu
Checking target system type... config. sub: too your arguments
Try 'config. sub -- help' for more information
Configure: error:/bin/sh .. /.. /.. /binutils-2.16/bfd .. /config. sub arm-linux -- with-sysroot =/usr/local/arm/gcc-3.4.4/sysroot filed
Make: *** [configure-bfd] Error 1

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.