]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/gcc/tianoCross-gcc-4.1
6b1dcc2c78dea6bcb689c2a2f112593161e93477
4 # Get, build and install the latest cross-development tools and libraries
8 # Specify the architectures for which the tools are to be built
9 # To build for single target: ARCHS="m68k"
11 ARCHS
="${ARCHS:-i386}"
16 # If any thing goes wrong, we'll bail out.
20 # Specify the versions
23 BINUTILS
=binutils-2.16
.1
24 # BINUTILS=binutils-2.16.91-20060119-1
25 CYGWIN_SNAP
=20060403 # You may need to find a more recent one.
30 PREFIX
="${PREFIX:-/opt/tiano/}"
33 # Where to get the GNU tools
35 # BINUTILS_URL=http://superb.dl.sourceforge.net/sourceforge/mingw/${BINUTILS}-src.tar.gz
36 BINUTILS_URL
=ftp://ftp.ibiblio.org
/pub
/mirrors
/gnu
/ftp
/gnu
/binutils
/${BINUTILS}.
tar.bz2
37 # GCC_URL=http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-${GCC}/${GCC}.tar.bz2
38 GCC_URL
=ftp://mirrors.kernel.org
/gnu
/gcc
/$GCC/$GCC.
tar.bz2
39 CYG_LOC
=http
://cygwin.com
/snapshots
/cygwin-src-
${CYGWIN_SNAP}.
tar.bz2
40 # export http_proxy=http://proxy.dp.intel.com:911
41 # export ftp_proxy=http://proxy.dp.intel.com:911
44 # Uncomment one of the following depending upon which your system provides
46 #GET_COMMAND="curl --remote-name"
47 GET_COMMAND
="wget -nc --no-directories --retr-symlinks "
50 # Allow environment to override some programs
54 SHELL
="${SHELL:-/bin/sh}"
59 # If you don't have curl on your machine, try using
60 # wget --passive-ftp --no-directories --retr-symlinks <<url>>
61 # If that doesn't work, try without the --passive-ftp option.
64 ${GET_COMMAND} "${BINUTILS_URL}" &
65 ${GET_COMMAND} "${GCC_URL}" &
66 ${GET_COMMAND} "${CYG_LOC}" &
75 tar jxf
"${BINUTILS}.tar.bz2"
79 tar jxf
"${GCC}.tar.bz2"
82 (rm -rf cygwin-snapshot-
${CYGWIN_SNAP}-1/
83 tar jxf cygwin-src-
${CYGWIN_SNAP}.
tar.bz2
89 CONF_SHELL
="${CONF_SHELL:-/bin/bash}"
90 # CONF_SHELL="${CONF_SHELL:-echo}"
98 export targ
=${arch}-tiano-pe
99 export pref
=${PREFIX}${targ}
100 export PATH
="${pref}/bin:$PATH"
102 ( mkdir
-p build-binutils-
$targ
103 cd build-binutils-
$targ
104 "${CONF_SHELL}" "../${BINUTILS}/configure" \
105 --disable-nls "--target=${targ}" "--prefix=${pref}"
108 ) >> ${targ}.log
2>&1
111 mkdir
-p $pref/$targ/sys-include
;
112 cp -fr cygwin-snapshot-
${CYGWIN_SNAP}-1/newlib
/libc
/include
/* $pref/$targ/sys-include
113 cp -fr cygwin-snapshot-
${CYGWIN_SNAP}-1/winsup
/cygwin
/include
/* $pref/$targ/sys-include
116 ( mkdir
-p build-gcc-
$targ
118 "${CONF_SHELL}" "../${GCC}/configure" "--target=${targ}" "--prefix=${pref}" \
119 --with-gnu-as --with-gnu-ld --with-newlib --verbose \
121 --disable-nls --enable-languages=c
124 ) >> ${targ}.log
2>&1
136 # Comment out any activities you wish to omit