From 21de533377d494e437ac654b015b790ce841d977 Mon Sep 17 00:00:00 2001 From: bbahnsen Date: Fri, 28 Apr 2006 01:30:31 +0000 Subject: [PATCH] Updates for cygwin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@73 6f19259b-4bc3-4df7-8a09-765794883524 --- Tools/gcc/README.txt | 24 +++++++++++++++--------- Tools/gcc/tianoCross-gcc-4.0 | 1 + Tools/gcc/tianoCross-gcc-4.1 | 13 +++++++++---- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/Tools/gcc/README.txt b/Tools/gcc/README.txt index 71c31a8aa7..9e581f2c3e 100644 --- a/Tools/gcc/README.txt +++ b/Tools/gcc/README.txt @@ -5,8 +5,9 @@ system to make the scripts work. You will need - A recent version of gcc that is able to produce executables for the machine - that you want to run this compiler on (the host machine). + A recent version (3.0 or later should be fine) of gcc that is able to produce + executables for the machine that you want to run this compiler on (the host + machine). wget or curl tar bzip @@ -16,14 +17,19 @@ You will need CYGWIN Notes -You must have the directory mounted as binary, or the build will not succeed. -In the example below, /workspace is mounted as binary. +You should setup cygwin to use binmode on all mounts. When you initially +install cygwin it gives you the choice of Unix file mode (recommended) or DOS +file mode. Unix mode will cause all the cygwin directories to be mounted in +binmode, while DOS will mount the dirs in textmode. Here is an example of a +cygwin install where the dirs are (properly) mounted in binmode. -C:\cygwin\bin on /usr/bin type user (textmode) -C:\cygwin\lib on /usr/lib type user (textmode) +C:\cygwin\bin on /usr/bin type user (binmode) +C:\cygwin\lib on /usr/lib type user (binmode) c:\workspace on /workspace type system (binmode) -C:\cygwin on / type user (textmode) -c: on /cygdrive/c type user (textmode,noumount) -n: on /cygdrive/n type user (textmode,noumount) +C:\cygwin on / type user (binmode) +If you use textmode, it is likely that the build will fail in a way that is +hard to debug. + +Cygwin is pretty slow, so it is not recommended for large builds. diff --git a/Tools/gcc/tianoCross-gcc-4.0 b/Tools/gcc/tianoCross-gcc-4.0 index ed950e3b2a..99fceb8086 100644 --- a/Tools/gcc/tianoCross-gcc-4.0 +++ b/Tools/gcc/tianoCross-gcc-4.0 @@ -22,6 +22,7 @@ set -ex 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 diff --git a/Tools/gcc/tianoCross-gcc-4.1 b/Tools/gcc/tianoCross-gcc-4.1 index 6b1dcc2c78..1a050e62e5 100644 --- a/Tools/gcc/tianoCross-gcc-4.1 +++ b/Tools/gcc/tianoCross-gcc-4.1 @@ -4,6 +4,10 @@ # 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" @@ -23,6 +27,7 @@ GCC=gcc-4.1.0 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 # # Where to install @@ -103,15 +108,15 @@ build() { cd build-binutils-$targ "${CONF_SHELL}" "../${BINUTILS}/configure" \ --disable-nls "--target=${targ}" "--prefix=${pref}" - ${MAKE} -j5 -w all + ${MAKE} -j1 -w all ${MAKE} -w install - ) >> ${targ}.log 2>&1 + ) >> ${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 @@ -119,7 +124,7 @@ build() { --with-gnu-as --with-gnu-ld --with-newlib --verbose \ --disable-libssp \ --disable-nls --enable-languages=c - ${MAKE} -j5 -w all + ${MAKE} -j1 -w all ${MAKE} -w install ) >> ${targ}.log 2>&1 ) &