Create a crosstoll cross-compiling environment

Source: Internet
Author: User

Objective: To compile other instruction sets on an existing machine, for example, to compile MIPS and PPC on x86.

Download: http://www.kegel.com/crosstool/crosstool-0.43.tar.gz

Body:

1. Obtain the crosstool toolkit and decompress it.

2, choose a suitable template, such as powerpc-405-linux-gnu,
This article selects the demo-ppc405.sh template.

A) vi
Demo-ppc405.sh

#!/bin/sh# This script has one line for each known working toolchain# for this architecture.  Uncomment the one you want.# Generated by generate-demo.pl from buildlogs/all.dats.txtset -exTARBALLS_DIR=$HOME/downloadsRESULT_TOP=/home/jyq/crosstoolexport TARBALLS_DIR RESULT_TOPGCC_LANGUAGES="c,c++"export GCC_LANGUAGES# Really, you should do the mkdir before running this,# and chown /opt/crosstool to yourself so you don't need to run as root.mkdir -p $RESULT_TOP#eval `cat powerpc-405.dat gcc-3.2.3-glibc-2.2.5.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-3.2.3-glibc-2.3.2.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-3.3.6-glibc-2.2.5.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-3.3.6-glibc-2.3.2.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-3.3.6-glibc-2.3.5.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-3.3.6-glibc-2.3.6.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-3.4.5-glibc-2.2.5.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-3.4.5-glibc-2.3.2.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-3.4.5-glibc-2.3.5.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-3.4.5-glibc-2.3.6.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-4.0.2-glibc-2.3.2.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-4.0.2-glibc-2.3.5.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-4.0.2-glibc-2.3.6.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-4.1.0-glibc-2.3.2.dat` sh all.sh --notest#eval `cat powerpc-405.dat gcc-4.1.0-glibc-2.3.5.dat` sh all.sh --notesteval `cat powerpc-405.dat gcc-4.4.2-glibc-2.9.dat` sh all.sh --notestecho Done.

The red part is the source code directory, the tool directory, the language, and the corresponding version file.

B) Vim powerpc-7450.dat.

TARGET=powerpc-405-linux-gnuTARGET_CFLAGS="-O -mcpu=405"GCC_EXTRA_CONFIG="--with-cpu=405 --enable-cxx-flags=-mcpu=405"GLIBC_EXTRA_CONFIG="$GLIBC_EXTRA_CONFIG --without-fp"

Tool chain name in red

C) Vim gcc-3.4.1-glibc-2.3.3.dat.

The corresponding directory is the source code package file

D)./demo-ppc405.sh.

D


Related Article

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.