Various fixes. master
authorCarl Hetherington <cth@carlh.net>
Thu, 30 Nov 2017 13:06:40 +0000 (13:06 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 30 Nov 2017 13:06:40 +0000 (13:06 +0000)
build_all
build_binutils_linux.sh
build_binutils_windows.sh
build_gcc_core.sh
build_gcc_rest.sh
build_gdb.sh
build_mingw_headers.sh
build_mingw_runtime.sh
clean
fetch_all

index 708d868..18b3b39 100755 (executable)
--- a/build_all
+++ b/build_all
@@ -1,18 +1,27 @@
 #!/bin/bash -e
+set -e
 
-export MINGW_PARALLEL="-j4"
+export MINGW_PARALLEL="-j8"
 export MINGW_BUILD=x86_64-pc-linux-gnu
-export MINGW_GCC_VERSION=4.7.3
+export MINGW_GCC_VERSION=6.4.0
+export MINGW_VERSION=5.0.2
 
 export MINGW_PREFIX=/opt/mingw/32
 export MINGW_TARGET=i686-w64-mingw32
 
+echo "=== binutils linux"
 bash build_binutils_linux.sh
+echo "=== mingw headers"
 bash build_mingw_headers.sh
+echo "=== gcc core"
 bash build_gcc_core.sh
+echo "=== mingw runtime"
 bash build_mingw_runtime.sh
+echo "=== gcc rest"
 bash build_gcc_rest.sh
+echo "=== gdb"
 bash build_gdb.sh
+echo "=== binutils windows"
 bash build_binutils_windows.sh
 
 export MINGW_PREFIX=/opt/mingw/64
index bc1cdd3..a730ddb 100644 (file)
@@ -1,17 +1,14 @@
 #!/bin/bash -e
 #
 # Build binutils running on Linux and targeting Windows.
+set -e
 
-tar xjf Archives/binutils-2.23.2.tar.bz2
-cd binutils-2.23.2
-sed -i -e 's/@colophon/@@colophon/' \
-       -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo
-patch -p1 < ../binutils1.patch
-patch -p1 < ../binutils2.patch
+tar xzf Archives/binutils-2.28.tar.gz
+cd binutils-2.28
 cd ..
 mkdir -p binutils-linux-build-$MINGW_TARGET
 cd binutils-linux-build-$MINGW_TARGET
-../binutils-2.23.2/configure --with-sysroot=$MINGW_PREFIX --prefix=$MINGW_PREFIX --disable-multilib -target=$MINGW_TARGET --enable-targets=$MINGW_TARGET 
+../binutils-2.28/configure --with-sysroot=$MINGW_PREFIX --prefix=$MINGW_PREFIX --disable-multilib -target=$MINGW_TARGET --enable-targets=$MINGW_TARGET 
 make $MINGW_PARALLEL
 sudo make install
 
index 5fcbcf8..47737fb 100644 (file)
@@ -2,11 +2,12 @@
 #
 # Build binutils running on Windows and targeting Windows.
 # At the moment this is just for addr2line.exe
+set -e
 
-tar xjf Archives/binutils-2.24.tar.bz2
+tar xzf Archives/binutils-2.28.tar.gz
 mkdir -p binutils-windows-build-$MINGW_TARGET
 cd binutils-windows-build-$MINGW_TARGET
-PATH=$MINGW_PREFIX/bin:$PATH ../binutils-2.24/configure --with-sysroot=$MINGW_PREFIX --prefix=/tmp/frobozz --disable-multilib \
+PATH=$MINGW_PREFIX/bin:$PATH ../binutils-2.28/configure --with-sysroot=$MINGW_PREFIX --prefix=/tmp/frobozz --disable-multilib \
   --host=$MINGW_TARGET --target=$MINGW_TARGET --enable-targets=$MINGW_TARGET 
 PATH=$MINGW_PREFIX/bin:$PATH make $MINGW_PARALLEL
 sudo cp binutils/.libs/addr2line.exe $MINGW_PREFIX/bin
index b8ce18a..70e40d2 100644 (file)
@@ -1,11 +1,10 @@
 #!/bin/bash -e
+set -e
 
-tar xjf Archives/gcc-$MINGW_GCC_VERSION.tar.bz2
-cd gcc-$MINGW_GCC_VERSION
-patch -p1 < ../gcc1.patch
-cd ..
+tar xJf Archives/gcc-$MINGW_GCC_VERSION.tar.xz
 mkdir -p gcc-build-$MINGW_TARGET
 cd gcc-build-$MINGW_TARGET
-../gcc-$MINGW_GCC_VERSION/configure --with-sysroot=$MINGW_PREFIX --prefix=$MINGW_PREFIX --disable-multilib --target=$MINGW_TARGET --with-gnu-ld --with-gnu-as --enable-fully-dynamic-string
+../gcc-$MINGW_GCC_VERSION/configure --with-sysroot=$MINGW_PREFIX --prefix=$MINGW_PREFIX --disable-multilib --target=$MINGW_TARGET \
+    --with-gnu-ld --with-gnu-as --enable-fully-dynamic-string
 make $MINGW_PARALLEL all-gcc
 sudo make install-gcc
index c20c3a0..9236db8 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/bash -e
+set -e
 
 cd gcc-build-$MINGW_TARGET
 make $MINGW_PARALLEL
index bfc7695..b3bcaf7 100644 (file)
@@ -1,10 +1,11 @@
 #!/bin/bash -e
+set -e
 
-tar xjf Archives/gdb-7.5.1.tar.bz2
+tar xJf Archives/gdb-8.0.tar.xz
 mkdir -p gdb-build-$MINGW_TARGET
 cd gdb-build-$MINGW_TARGET
 export LDFLAGS=-L$MINGW_PREFIX/lib
-PATH=$MINGW_PREFIX/bin:$PATH ../gdb-7.5.1/configure --prefix=$MINGW_PREFIX --target=$MINGW_TARGET --host=$MINGW_TARGET
+PATH=$MINGW_PREFIX/bin:$PATH ../gdb-8.0/configure --prefix=$MINGW_PREFIX --target=$MINGW_TARGET --host=$MINGW_TARGET
 PATH=$MINGW_PREFIX/bin:$PATH make $MINGW_PARALLEL
 sudo PATH=$MINGW_PREFIX/bin:$PATH make install
 
index 7f20b7a..5ac9a42 100644 (file)
@@ -1,13 +1,16 @@
 #!/bin/bash
 
-tar xzf Archives/mingw-w64-v2.0.7.tar.gz
+tar xjf Archives/mingw-w64-v$MINGW_VERSION.tar.bz2
 mkdir -p mingw-headers-build-$MINGW_TARGET
 cd mingw-headers-build-$MINGW_TARGET
-../mingw-w64-v2.0.7/mingw-w64-headers/configure --prefix=$MINGW_PREFIX --build=$MINGW_BUILD --host=$MINGW_TARGET
+../mingw-w64-v$MINGW_VERSION/mingw-w64-headers/configure --prefix=$MINGW_PREFIX --build=$MINGW_BUILD --host=$MINGW_TARGET
 sudo make install
-sudo ln -s $MINGW_PREFIX/$MINGW_TARGET $MINGW_PREFIX/mingw
-sudo mkdir -p $MINGW_PREFIX/$MINGW_TARGET/lib
-sudo ln -s $MINGW_PREFIX/$MINGW_TARGET/lib $MINGW_PREFIX/$MINGW_TARGET/lib64
+sudo mkdir $MINGW_PREFIX/mingw
+sudo ln -s ../include $MINGW_PREFIX/mingw/include
+sudo ln -s ../lib $MINGW_PREFIX/mingw/lib
+#sudo ln -s $MINGW_PREFIX/$MINGW_TARGET $MINGW_PREFIX/mingw
+#sudo mkdir -p $MINGW_PREFIX/$MINGW_TARGET/lib
+#sudo ln -s $MINGW_PREFIX/$MINGW_TARGET/lib $MINGW_PREFIX/$MINGW_TARGET/lib64
 
 
 
index 542b880..f981119 100644 (file)
@@ -1,7 +1,8 @@
 #!/bin/bash
+set -e
 
 mkdir -p mingw-runtime-build-$MINGW_TARGET
 cd mingw-runtime-build-$MINGW_TARGET
-PATH=$PATH:$MINGW_PREFIX/bin ../mingw-w64-v2.0.7/mingw-w64-crt/configure --prefix=$MINGW_PREFIX --with-sysroot=$MINGW_PREFIX --host=$MINGW_TARGET
+PATH=$PATH:$MINGW_PREFIX/bin ../mingw-w64-v$MINGW_VERSION/mingw-w64-crt/configure --prefix=$MINGW_PREFIX --with-sysroot=$MINGW_PREFIX --host=$MINGW_TARGET
 PATH=$PATH:$MINGW_PREFIX/bin make $MINGW_PARALLEL
 sudo PATH=$PATH:$MINGW_PREFIX/bin make install
diff --git a/clean b/clean
index daa0515..775dabd 100755 (executable)
--- a/clean
+++ b/clean
@@ -2,18 +2,21 @@
 
 rm -rf binutils-2.23
 rm -rf binutils-2.23.2
+rm -rf binutils-2.28
 rm -rf binutils-windows-build-i686-w64-mingw32
 rm -rf binutils-windows-build-x86_64-w64-mingw32
 rm -rf binutils-linux-build-i686-w64-mingw32
 rm -rf binutils-linux-build-x86_64-w64-mingw32
 rm -rf gcc-4.7.3
-rm -rf gcc-build-i686-w64-mingw32
+rm -rf gcc-6.4.0
+sudo rm -rf gcc-build-i686-w64-mingw32
 rm -rf gcc-build-x86_64-w64-mingw32
 rm -rf mingw-headers-build-i686-w64-mingw32
 rm -rf mingw-headers-build-x86_64-w64-mingw32
 rm -rf mingw-runtime-build-i686-w64-mingw32
 rm -rf mingw-runtime-build-x86_64-w64-mingw32
 rm -rf mingw-w64-v2.0.7
+rm -rf mingw-w64-v5.0.2
 rm -rf gdb-7.5.1
 rm -rf gdb-build-i686-w64-mingw32
 rm -rf gdb-build-x86_64-w64-mingw32
index 91b1225..abb7281 100644 (file)
--- a/fetch_all
+++ b/fetch_all
@@ -3,8 +3,11 @@ mkdir Archives
 cd Archives
 wget http://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2
 wget http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2
+wget http://ftp.gnu.org/gnu/binutils/binutils-2.28.tar.gz
 wget http://ftp.gnu.org/gnu/gcc/gcc-4.7.3/gcc-4.7.3.tar.bz2
+wget http://ftp.gnu.org/gnu/gcc/gcc-6.4.0/gcc-6.4.0.tar.xz
 wget http://ftp.gnu.org/gnu/gdb/gdb-7.5.1.tar.bz2
+wget https://ftp.gnu.org/gnu/gdb/gdb-8.0.tar.xz
 wget http://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
 curl -L -O http://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v2.0.7.tar.gz
-
+curl -L -O http://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v5.0.2.tar.bz2