Building a GCC PowerPC/Linux Cross Compiler For SPARC/Solaris[1]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 huzancheng 的 blog

building a gcc powerpc/linux cross compiler for sparc/solaris

there are a number of resources on the internet serving as a guide for building a cross compiler. however, each addresses a particular version of the compiler as well as a particular host/target combination; which while generally useful as a base instruction set, doesn't cover the intricacies of performing the feat for a different version and host/target combination. this attempts to document the process of building a gcc 2.95.2 cross compiler for powerpc/linux 2.4.0 on sparc/ solaris 2.7 (aka solaris 7, sunos 5.7).

conventions

in the instructions below, the following conventions are used:

<archive dir> location in which you store your archive (i.e. *.tar.gz) files.
<source dir> location in which you unpack your archive files as various source directories.
<object dir> location in which you will build object files from the source dirctories located in <source dir>. this may be the same as <source dir>; however, that is not recommended.
<tool dir> location in which you will place all of the built cross-compiler tools and libraries.
gmake gnu version of make
gtar gnu version of tar

instructions

most of the following steps should work fine with default system tools. however, the process for building tends to make a number of assumptions about running with a gnu tool set, in particular, a native gcc compiler. that said, it may be useful (i certainly found it to be) to have /usr/local/gnu/bin or an equivalent gnu tool set in your path before your normal system tools (/usr/bin, /usr/xpg4/bin, /usr/ucb, etc.). i used these tools.

it is also highly encouraged that all the below commands be run while using bash (preferrably) or ksh as your shell. you will likely even have better luck if you set the environment variable shell to bash or ksh. all the subsequent examples will assume that this is the case. adjust accordingly if you are using csh, tcsh or some other shell.

changing the optimization level of the compiler (e.g. -o3), either via cflags or by another means, is not recommened. doing so will likely result in either a failed build step in glibc or a broken cross-compilation environment.

  1. packages
  2. the following packages are required for this endeavor:

    package version location
    binutils 2.10.1 download
    gcc-core 2.95.2 download
    gcc 2.95.2 download
    glibc 2.1.3 download
    glibc-crypt 2.1.3 download
    glibc-linuxthreads 2.1.3 download
    linux 2.4.0 download

本文关键:Building a GCC PowerPC/Linux Cross Compiler For SPARC/Solaris
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top