git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@73
6f19259b-4bc3-4df7-8a09-
765794883524
- A recent version of gcc that is able to produce executables for the machine\r
- that you want to run this compiler on (the host machine).\r
+ A recent version (3.0 or later should be fine) of gcc that is able to produce\r
+ executables for the machine that you want to run this compiler on (the host\r
+ machine).\r
wget or curl\r
tar\r
bzip\r
wget or curl\r
tar\r
bzip\r
-You must have the directory mounted as binary, or the build will not succeed.\r
-In the example below, /workspace is mounted as binary.\r
+You should setup cygwin to use binmode on all mounts. When you initially\r
+install cygwin it gives you the choice of Unix file mode (recommended) or DOS\r
+file mode. Unix mode will cause all the cygwin directories to be mounted in\r
+binmode, while DOS will mount the dirs in textmode. Here is an example of a\r
+cygwin install where the dirs are (properly) mounted in binmode.\r
-C:\cygwin\bin on /usr/bin type user (textmode)\r
-C:\cygwin\lib on /usr/lib type user (textmode)\r
+C:\cygwin\bin on /usr/bin type user (binmode)\r
+C:\cygwin\lib on /usr/lib type user (binmode)\r
c:\workspace on /workspace type system (binmode)\r
c:\workspace on /workspace type system (binmode)\r
-C:\cygwin on / type user (textmode)\r
-c: on /cygdrive/c type user (textmode,noumount)\r
-n: on /cygdrive/n type user (textmode,noumount)\r
+C:\cygwin on / type user (binmode)\r
+If you use textmode, it is likely that the build will fail in a way that is\r
+hard to debug.\r
+\r
+Cygwin is pretty slow, so it is not recommended for large builds.\r
GCC=gcc-4.0.2
BINUTILS=binutils-2.16.1
CYGWIN_SNAP=20060120 # You may need to find a more recent one.
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
# Get, build and install the latest cross-development tools and libraries
#
# Get, build and install the latest cross-development tools and libraries
#
+###
+### CYGWIN :: Make sure that cygwin is mouting its file systems in binmode.
+###
+
#
# Specify the architectures for which the tools are to be built
# To build for single target: ARCHS="m68k"
#
# Specify the architectures for which the tools are to be built
# To build for single target: ARCHS="m68k"
BINUTILS=binutils-2.16.1
# BINUTILS=binutils-2.16.91-20060119-1
CYGWIN_SNAP=20060403 # You may need to find a more recent one.
BINUTILS=binutils-2.16.1
# BINUTILS=binutils-2.16.91-20060119-1
CYGWIN_SNAP=20060403 # You may need to find a more recent one.
+export PATH=/bin:/usr/bin
cd build-binutils-$targ
"${CONF_SHELL}" "../${BINUTILS}/configure" \
--disable-nls "--target=${targ}" "--prefix=${pref}"
cd build-binutils-$targ
"${CONF_SHELL}" "../${BINUTILS}/configure" \
--disable-nls "--target=${targ}" "--prefix=${pref}"
+ ) >> ${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 $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
( mkdir -p build-gcc-$targ
cd build-gcc-$targ
--with-gnu-as --with-gnu-ld --with-newlib --verbose \
--disable-libssp \
--disable-nls --enable-languages=c
--with-gnu-as --with-gnu-ld --with-newlib --verbose \
--disable-libssp \
--disable-nls --enable-languages=c
${MAKE} -w install
) >> ${targ}.log 2>&1
) &
${MAKE} -w install
) >> ${targ}.log 2>&1
) &