X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2Fgcc%2FtianoCross-gcc-4.0;h=99fceb8086cd173d80c84db0a3d233a62b4385c5;hp=19e2c8256959f79a9e9de9eb86ad5ee1560a5e3e;hb=30500d38cd185a44e576fe6b5174a663e7ac459a;hpb=b8f302f88c4ea1cf48e5790f4776dd577549db2b;ds=inline diff --git a/Tools/gcc/tianoCross-gcc-4.0 b/Tools/gcc/tianoCross-gcc-4.0 index 19e2c82569..99fceb8086 100644 --- a/Tools/gcc/tianoCross-gcc-4.0 +++ b/Tools/gcc/tianoCross-gcc-4.0 @@ -1,140 +1,141 @@ -#!/bin/bash - -# -# Get, build and install the latest cross-development tools and libraries -# - -# -# Specify the architectures for which the tools are to be built -# To build for single target: ARCHS="m68k" -# -ARCHS="${ARCHS:-i386}" - -# Let's be nice -renice 10 -p $$ - -# If any thing goes wrong, we'll bail out. -set -ex - -# -# Specify the versions -# -GCC=gcc-4.0.2 -BINUTILS=binutils-2.16.1 -CYGWIN_SNAP=20060120 # You may need to find a more recent one. - -# -# Where to install -# -PREFIX="${PREFIX:-/opt/tiano/}" - -# -# Where to get the GNU tools -# -BINUTILS_URL=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/binutils/${BINUTILS}.tar.bz2 -GCC_URL=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-4.0.2/${GCC}.tar.bz2 -CYG_LOC=http://cygwin.com/snapshots/cygwin-src-${CYGWIN_SNAP}.tar.bz2 -export http_proxy=http://proxy.dp.intel.com:911 -export ftp_proxy=http://proxy.dp.intel.com:911 - -# -# Uncomment one of the following depending upon which your system provides -# -GET_COMMAND="curl --remote-name" -#GET_COMMAND="wget -nc --no-directories --retr-symlinks " - -# -# Allow environment to override some programs -# -MAKE="${MAKE:-make}" -export MAKE -SHELL="${SHELL:-/bin/sh}" -export SHELL - -# -# Get the source -# If you don't have curl on your machine, try using -# wget --passive-ftp --no-directories --retr-symlinks <> -# If that doesn't work, try without the --passive-ftp option. -# -getSource() { - ${GET_COMMAND} "${BINUTILS_URL}" & - ${GET_COMMAND} "${GCC_URL}" & - ${GET_COMMAND} "${CYG_LOC}" & - wait -} - -# -# Unpack the source -# -unpackSource() { - (rm -rf "${BINUTILS}" - tar jxf "${BINUTILS}.tar.bz2" - ) & - - (rm -rf "${GCC}" - tar jxf "${GCC}.tar.bz2" - ) & - - (rm -rf cygwin-snapshot-${CYGWIN_SNAP}-1/ - tar jxf cygwin-src-${CYGWIN_SNAP}.tar.bz2 - ) & - - wait - - # (cd "${GCC}" ; ln -sf "../cygwin-snapshot-20060120-1/newlib" newlib) - -} - -CONF_SHELL="${CONF_SHELL:-/bin/bash}" -# CONF_SHELL="${CONF_SHELL:-echo}" - -# -# Build -# -build() { - for arch in $ARCHS - do ( - export targ=${arch}-tiano-pe - export pref=${PREFIX}${targ} - export PATH="${pref}/bin:$PATH" - - ( mkdir -p build-binutils-$targ - cd build-binutils-$targ - "${CONF_SHELL}" "../${BINUTILS}/configure" \ - --disable-nls "--target=${targ}" "--prefix=${pref}" - ${MAKE} -j1 -w all - ${MAKE} -w install - ) >> ${targ}.log 2>&1 - - ( - mkdir -p $pref/$targ/sys-include; - cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/newlib/libc/include/* $pref/$targ/sys-include - cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/winsup/cygwin/include/* $pref/$targ/sys-include - ) - - ( mkdir -p build-gcc-$targ - cd build-gcc-$targ - "${CONF_SHELL}" "../${GCC}/configure" "--target=${targ}" "--prefix=${pref}" \ - --with-gnu-as --with-gnu-ld --with-newlib --verbose \ - --disable-nls --enable-languages=c - ${MAKE} -j1 -w all - ${MAKE} -w install - ) >> ${targ}.log 2>&1 - ) & - done - - wait -} - - - -# -# Do everything -# -# Comment out any activities you wish to omit -# -getSource -unpackSource -build - +#!/bin/bash + +# +# Get, build and install the latest cross-development tools and libraries +# + +# +# Specify the architectures for which the tools are to be built +# To build for single target: ARCHS="m68k" +# +ARCHS="${ARCHS:-i386}" + +# Let's be nice +renice 10 -p $$ + +# If any thing goes wrong, we'll bail out. +set -ex + +# +# Specify the versions +# +GCC=gcc-4.0.2 +BINUTILS=binutils-2.16.1 +CYGWIN_SNAP=20060120 # You may need to find a more recent one. +export PATH=/bin:/usr/bin + +# +# Where to install +# +PREFIX="${PREFIX:-/opt/tiano/}" + +# +# Where to get the GNU tools +# +BINUTILS_URL=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/binutils/${BINUTILS}.tar.bz2 +GCC_URL=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-4.0.2/${GCC}.tar.bz2 +CYG_LOC=http://cygwin.com/snapshots/cygwin-src-${CYGWIN_SNAP}.tar.bz2 +export http_proxy=http://proxy.dp.intel.com:911 +export ftp_proxy=http://proxy.dp.intel.com:911 + +# +# Uncomment one of the following depending upon which your system provides +# +GET_COMMAND="curl --remote-name" +#GET_COMMAND="wget -nc --no-directories --retr-symlinks " + +# +# Allow environment to override some programs +# +MAKE="${MAKE:-make}" +export MAKE +SHELL="${SHELL:-/bin/sh}" +export SHELL + +# +# Get the source +# If you don't have curl on your machine, try using +# wget --passive-ftp --no-directories --retr-symlinks <> +# If that doesn't work, try without the --passive-ftp option. +# +getSource() { + ${GET_COMMAND} "${BINUTILS_URL}" & + ${GET_COMMAND} "${GCC_URL}" & + ${GET_COMMAND} "${CYG_LOC}" & + wait +} + +# +# Unpack the source +# +unpackSource() { + (rm -rf "${BINUTILS}" + tar jxf "${BINUTILS}.tar.bz2" + ) & + + (rm -rf "${GCC}" + tar jxf "${GCC}.tar.bz2" + ) & + + (rm -rf cygwin-snapshot-${CYGWIN_SNAP}-1/ + tar jxf cygwin-src-${CYGWIN_SNAP}.tar.bz2 + ) & + + wait + + # (cd "${GCC}" ; ln -sf "../cygwin-snapshot-20060120-1/newlib" newlib) + +} + +CONF_SHELL="${CONF_SHELL:-/bin/bash}" +# CONF_SHELL="${CONF_SHELL:-echo}" + +# +# Build +# +build() { + for arch in $ARCHS + do ( + export targ=${arch}-tiano-pe + export pref=${PREFIX}${targ} + export PATH="${pref}/bin:$PATH" + + ( mkdir -p build-binutils-$targ + cd build-binutils-$targ + "${CONF_SHELL}" "../${BINUTILS}/configure" \ + --disable-nls "--target=${targ}" "--prefix=${pref}" + ${MAKE} -j1 -w all + ${MAKE} -w install + ) >> ${targ}.log 2>&1 + + ( + mkdir -p $pref/$targ/sys-include; + cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/newlib/libc/include/* $pref/$targ/sys-include + cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/winsup/cygwin/include/* $pref/$targ/sys-include + ) + + ( mkdir -p build-gcc-$targ + cd build-gcc-$targ + "${CONF_SHELL}" "../${GCC}/configure" "--target=${targ}" "--prefix=${pref}" \ + --with-gnu-as --with-gnu-ld --with-newlib --verbose \ + --disable-nls --enable-languages=c + ${MAKE} -j1 -w all + ${MAKE} -w install + ) >> ${targ}.log 2>&1 + ) & + done + + wait +} + + + +# +# Do everything +# +# Comment out any activities you wish to omit +# +getSource +unpackSource +build +