├── .gitignore ├── Readmes ├── clang │ └── Readme.txt ├── source │ └── Readme.txt └── top │ └── Readme.txt ├── buildall.sh ├── buildcygwin32mingw32.sh ├── buildcygwin32mingw64.sh ├── buildlinux32mingw32-dw2.sh ├── buildlinux32mingw32.sh ├── buildlinux32mingw64.sh ├── buildlinux64mingw32-dw2.sh ├── buildlinux64mingw32.sh ├── buildlinux64mingw64.sh ├── buildmac32mingw32.sh ├── buildmac32mingw64.sh ├── buildmac64mingw32.sh ├── buildmac64mingw64.sh ├── buildmingw-w64-update.sh ├── buildmingw32clang32.sh ├── buildmingw32mingw32-dw2.sh ├── buildmingw32mingw32.sh ├── buildmingw32mingw64.sh ├── buildmingw64clang64.sh ├── buildmingw64mingw32.sh ├── buildmingw64mingw64.sh ├── envsetup ├── clang32env.cmd ├── clang64env.cmd ├── mingw32env.cmd └── mingw64env.cmd ├── patches ├── config_jobserver.patch.txt ├── gcc-4.6-posixthreadingandlibstdc++.patch.txt ├── gcc-4.7-gthread.patch.txt ├── gcc-4.8-build-with-c++.patch.txt ├── gcc-4.8-libstdc++export.patch.txt ├── gcc-cloog-0.17.patch.txt ├── make-PATH_SEPARATOR_CHAR.patch.txt ├── make-TLS_VAR.patch.txt ├── make-getopt.patch.txt └── make-windows-misc.patch.txt ├── scripts ├── LLVM-Clang.sh ├── binutils.sh ├── buildclangfromcross.sh ├── buildcrossfromnative.sh ├── buildfromcross.sh ├── cleanup.sh ├── cloog.sh ├── directories.sh ├── expat.sh ├── gcc-c.sh ├── gcc.sh ├── gcc_tag_releases.sh ├── gdb.sh ├── gmp.sh ├── isl.sh ├── libiconv.sh ├── licenses.sh ├── make.sh ├── mingw-w64-crt.sh ├── mingw-w64-headers.sh ├── mpc.sh ├── mpfr.sh ├── ppl.sh ├── python.sh ├── settings.sh ├── updatesources.sh ├── versions.sh ├── winpthreads.sh ├── winpthreads32multi.sh ├── winpthreads64multi.sh └── zipping.sh └── src ├── python-i686-w64-mingw32.zip └── python-x86_64-w64-mingw32.zip /.gitignore: -------------------------------------------------------------------------------- 1 | # temporary backups of text files (KDE) 2 | *~ 3 | -------------------------------------------------------------------------------- /Readmes/clang/Readme.txt: -------------------------------------------------------------------------------- 1 | Here you will find the latest Clang compiler releases. 2 | 3 | Currently, it is a functional compiler for 32-bit for C and C++. 4 | Clang is currently made to function with the gcc-dw2-4.6* package. 5 | I also provide 64-bit builds, but these are only useful for C. 6 | Compiling C++ to 64-bit object code will result in linker errors. 7 | You can still use if for its better diagnostics and static analysis. 8 | 9 | To use it, you should extract the Clang package in the same directory 10 | as the gcc-dw2 package, do that the ddirectories overlap. This ensures 11 | the C and C++ headers are found by Clang. 12 | 13 | To use clang, just replace "gcc" with "clang" and "g++" and "clang++". 14 | Clang currently imitates GCC as a frontend, and all options GCC accepts, 15 | Clang accepts. Some options that are unsupported by Clang are ignored. 16 | 17 | Some DLL-related issues remain, reporting these (if not done so already) 18 | to me or the LLVM bugtracker will help identifying and eventually fixing 19 | them. 20 | -------------------------------------------------------------------------------- /Readmes/source/Readme.txt: -------------------------------------------------------------------------------- 1 | Welcome to rubenvb's toolchain sources where all the source code is. 2 | 3 | The subdirectories contain the sources for all the binary toolchain packages. 4 | If you want to use MinGW-w64 and GCC, these are not for you. These are only 5 | provided for legal purposes and for those who want to build for a platform I 6 | cannot currently build binary packages for. 7 | 8 | The packages contain everything necessary, including all source code and the 9 | scripts used to build my packages on Arch Linux. 10 | 11 | The settings you will have to adjust for your system are in 12 | ./scripts/settings.sh 13 | 14 | To build all the packages I uploaded, just run 15 | ./buildall.sh 16 | 17 | To not run into any weird errors, you'll need the following programs installed: 18 | - flex 19 | - bison 20 | - texinfo 21 | - p7zip 22 | - make 23 | - gcc 24 | - unzip 25 | - tar 26 | - bzip2 27 | -... 28 | 29 | If any of these programs are not installed, you will get a very undescriptive error 30 | at best. Ideally, everything will go fine. If not, contact me via the mingw-w64-public 31 | mailing list or the mingw-w64 forums. -------------------------------------------------------------------------------- /Readmes/top/Readme.txt: -------------------------------------------------------------------------------- 1 | Welcome to the rubenvb MinGW-w64 download section. 2 | 3 | You will find the latest MinGW-w64 GCC toolchains here, which include: 4 | - GCC: compiler for (obj-)c(++), and fortran 5 | - binutils: linker and object file inspection 6 | - gdb: debugger 7 | - Clang: works great for 32-bit, aside from some minor DLL-related issues. 8 | 9 | There are packages for each release of GCC, from 4.5 to the current release. 10 | The latest release version is always recommended. 11 | 12 | Experimental packages provide certain features not yet considered stable, as 13 | a preview. 14 | 15 | What do you need to download? 16 | Packages are named as follows: 17 | 18 | [Target]-gcc-[Version]-release-[OS]-rubenvb.* 19 | [Target]-clang-[Version]-release-[OS]-rubenvb.* 20 | 21 | Target: GCC triplet for the system this toolchain builds code for: 22 | x86_64-w64-mingw32: 64-bit Windows 23 | i686-w64-mingw32: 32-bit Windows 24 | Version: GCC version 25 | OS: OS the toolchain is built for: 26 | linux64: 64-bit linux 27 | win64: 64-bit Windows 28 | win32: 32-bit Windows (also work on 64-bit Windows) 29 | cygwin: Cygwin (www.cygwin.com) 30 | 31 | You need an archive program like 7-zip (www.7-zip.org) to unpack these packages. 32 | -------------------------------------------------------------------------------- /buildall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | #echo "Checking sources' availability and up-to-dateness" 5 | #. ./scripts/updatesources.sh || exit 1 6 | 7 | echo "Building linux 64-bit to Windows 32-bit cross-compiler" 8 | sh ./buildlinux64mingw32.sh || exit 1 9 | echo "Building linux 64-bit to Windows 64-bit cross-compiler" 10 | sh ./buildlinux64mingw64.sh || exit 1 11 | #echo "Building linux 32-bit to Windows 32-bit cross-compiler" 12 | #sh ./buildlinux32mingw32.sh || exit 1 13 | #echo "Building linux 32-bit to Windows 64-bit cross-compiler" 14 | #sh ./buildlinux32mingw64.sh || exit 1 15 | 16 | export PATH=$PWD/linux64mingw32/mingw32/bin:$PWD/linux64mingw64/mingw64/bin:$PATH 17 | 18 | echo "Building Windows 64-bit to Windows 64-bit native compiler" 19 | sh ./buildmingw64mingw64.sh || exit 1 20 | echo "Building Windows 32-bit to Windows 32-bit native compiler" 21 | sh ./buildmingw32mingw32.sh || exit 1 22 | echo "Building Windows 32-bit to Windows 64-bit native cross-compiler" 23 | sh ./buildmingw32mingw64.sh || exit 1 24 | echo "Building Windows 64-bit to Windows 32-bit native cross-compiler" 25 | sh ./buildmingw64mingw32.sh || exit 1 26 | 27 | echo "Building Cygwin 32-bit to Windows 32-bit cross-compiler" 28 | sh ./buildcygwin32mingw32.sh || exit 1 29 | echo "Building Cygwin 32-bit to Windows 64-bit cross-compiler" 30 | sh ./buildcygwin32mingw64.sh || exit 1 31 | 32 | #echo "Building Mac 32-bit to Windows 32-bit cross-compiler" 33 | #sh ./buildmac32mingw32.sh || exit 1 34 | #echo "Building Mac 32-bit to Windows 64-bit cross-compiler" 35 | #sh ./buildmac32mingw64.sh || exit 1 36 | #echo "Building Mac 64-bit to Windows 32-bit cross-compiler" 37 | #sh ./buildmac64mingw32.sh || exit 1 38 | #echo "Building Mac 64-bit to Windows 64-bit cross-compiler" 39 | #sh ./buildmac64mingw64.sh || exit 1 40 | 41 | echo "Building linux 64-bit to Windows 32-bit dw2 cross-compiler" 42 | sh ./buildlinux64mingw32-dw2.sh 43 | #echo "Building linux 32-bit to Windows 32-bit dw2 cross-compiler" 44 | #sh ./buildlinux32mingw32-dw2.sh 45 | 46 | export PATH=$PWD/linux64mingw32-dw2/mingw32-dw2/bin:$PATH 47 | 48 | echo "Building Windows 32-bit to Windows 32-bit dw2 native compiler" 49 | sh ./buildmingw32mingw32-dw2.sh || exit 1 50 | #echo "Building Windows 64-bit to Windows 32-bit dw2 native compiler" 51 | #sh ./buildmingw64mingw32-dw2.sh || exit 1 52 | 53 | #echo "Building Windows 32-bit to Windows 32-bit native LLVM/Clang" 54 | #sh ./buildmingw32clang32.sh 55 | #echo "Building Windows 64-bit to Windows 64-bit native LLVM/Clang" 56 | #sh ./buildmingw64clang64.sh 57 | -------------------------------------------------------------------------------- /buildcygwin32mingw32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=pc 7 | export HOST_OS=cygwin 8 | export HOST=$HOST_ARCH-$HOST_VENDOR-$HOST_OS 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET=$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32 17 | export LONG_NAME=cygwin32mingw32 18 | 19 | # call main build script 20 | . ./scripts/buildfromcross.sh 21 | -------------------------------------------------------------------------------- /buildcygwin32mingw64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=pc 7 | export HOST_OS=cygwin 8 | export HOST=$HOST_ARCH-$HOST_VENDOR-$HOST_OS 9 | 10 | export TARGET_ARCH=x86_64 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET=$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS 14 | export CRT_CONFIG="--disable-lib32 --enable-lib64" 15 | 16 | export SHORT_NAME=mingw64 17 | export LONG_NAME=cygwin32mingw64 18 | 19 | # call main build script 20 | . ./scripts/buildfromcross.sh 21 | -------------------------------------------------------------------------------- /buildlinux32mingw32-dw2.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=linux 7 | export HOST_OS=gnu 8 | export HOST=$HOST_ARCH-$HOST_VENDOR-$HOST_OS 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET=$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32-dw2 17 | export LONG_NAME=linux32mingw32-dw2 18 | 19 | # call main build script 20 | . ./scripts/buildcrossfromnative.sh 21 | -------------------------------------------------------------------------------- /buildlinux32mingw32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=linux 7 | export HOST_OS=gnu 8 | export HOST=$HOST_ARCH-$HOST_VENDOR-$HOST_OS 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET=$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32 17 | export LONG_NAME=linux32mingw32 18 | 19 | # call main build script 20 | . ./scripts/buildcrossfromnative.sh 21 | -------------------------------------------------------------------------------- /buildlinux32mingw64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=linux 7 | export HOST_OS=gnu 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=x86_64 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--disable-lib32 --enable-lib64" 15 | 16 | export SHORT_NAME=mingw64 17 | export LONG_NAME=linux32mingw64 18 | 19 | # call main build script 20 | . ./scripts/buildcrossfromnative.sh 21 | 22 | -------------------------------------------------------------------------------- /buildlinux64mingw32-dw2.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=x86_64 6 | export HOST_VENDOR=linux 7 | export HOST_OS=gnu 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32-dw2 17 | export LONG_NAME=linux64mingw32-dw2 18 | 19 | # call main build script 20 | . ./scripts/buildcrossfromnative.sh 21 | -------------------------------------------------------------------------------- /buildlinux64mingw32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=x86_64 6 | export HOST_VENDOR=linux 7 | export HOST_OS=gnu 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32 17 | export LONG_NAME=linux64mingw32 18 | 19 | # call main build script 20 | . ./scripts/buildcrossfromnative.sh 21 | -------------------------------------------------------------------------------- /buildlinux64mingw64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=x86_64 6 | export HOST_VENDOR=linux 7 | export HOST_OS=gnu 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=x86_64 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--disable-lib32 --enable-lib64" 15 | 16 | export SHORT_NAME=mingw64 17 | export LONG_NAME=linux64mingw64 18 | 19 | # call main build script 20 | . ./scripts/buildcrossfromnative.sh 21 | -------------------------------------------------------------------------------- /buildmac32mingw32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=apple 7 | export HOST_OS=darwin11 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET=$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32 17 | export LONG_NAME=mac32mingw32 18 | 19 | # call main build script 20 | . ./scripts/buildfromcross.sh 21 | -------------------------------------------------------------------------------- /buildmac32mingw64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=apple 7 | export HOST_OS=darwin11 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=x86_64 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--disable-lib32 --enable-lib64" 15 | 16 | export SHORT_NAME=mingw64 17 | export LONG_NAME=mac32mingw64 18 | 19 | # call main build script 20 | . ./scripts/buildfromcross.sh 21 | -------------------------------------------------------------------------------- /buildmac64mingw32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=x86_64 6 | export HOST_VENDOR=apple 7 | export HOST_OS=darwin11 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32 17 | export LONG_NAME=mac64mingw32 18 | 19 | # call main build script 20 | . ./scripts/buildfromcross.sh 21 | -------------------------------------------------------------------------------- /buildmac64mingw64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=x86_64 6 | export HOST_VENDOR=apple 7 | export HOST_OS=darwin11 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=x86_64 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--disable-lib32 --enable-lib64" 15 | 16 | export SHORT_NAME=mingw64 17 | export LONG_NAME=mac64mingw64 18 | 19 | # call main build script 20 | . ./scripts/buildfromcross.sh 21 | -------------------------------------------------------------------------------- /buildmingw-w64-update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | echo "Building MinGW-w64 CRT/headers update package" 5 | 6 | export UPDATE_VERSION="trunk-20130115" 7 | export PACKAGE_NAME=mingw-w64-update-${UPDATE_VERSION}_rubenvb 8 | 9 | export MAKE_OPTS="-j4" 10 | 11 | export TOP_DIR=`pwd` 12 | export SRC_DIR=$TOP_DIR/src 13 | export BUILD_DIR=$TOP_DIR/mingw-w64-update 14 | export PACKAGE_DIR=$TOP_DIR/packages 15 | export LOG_DIR=$BUILD_DIR/logs 16 | 17 | dirs_to_make="$BUILD_DIR 18 | $BUILD_DIR/mingw64 19 | $BUILD_DIR/mingw32 20 | $BUILD_DIR/mingw64-build 21 | $BUILD_DIR/mingw32-build 22 | $BUILD_DIR/winpthreads64 23 | $BUILD_DIR/winpthreads32 24 | $LOG_DIR 25 | $PACKAGE_DIR" 26 | 27 | mkdir -p $dirs_to_make 28 | 29 | #export PATH=$TOP_DIR/linux64mingw64/mingw64/bin:$TOP_DIR/linux64mingw32/mingw32/bin:$PATH 30 | 31 | echo "-> Building 64-bit MinGW-w64" 32 | cd $BUILD_DIR/mingw64-build 33 | sh $SRC_DIR/mingw-w64/configure --host=x86_64-w64-mingw32 --build=x86_64-linux-gnu --target=x86_64-w64-mingw32 \ 34 | --prefix=$BUILD_DIR/mingw64/x86_64-w64-mingw32 \ 35 | --enable-sdks=all --enable-wildcard --enable-secure-api \ 36 | --enable-lib64 --disable-lib32 \ 37 | > $LOG_DIR/mingw-w64-64-bit_configure.log 2>&1 || exit 1 38 | make ${MAKE_OPTS} > $LOG_DIR/mingw-w64-64-bit_build.log 2>&1 || exit 1 39 | make install > $LOG_DIR/mingw-w64-64-bit_install.log 2>&1 || exit 1 40 | 41 | echo "-> Building 32-bit MinGW-w64" 42 | cd $BUILD_DIR/mingw32-build 43 | sh $SRC_DIR/mingw-w64/configure --host=i686-w64-mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 \ 44 | --prefix=$BUILD_DIR/mingw32/i686-w64-mingw32 \ 45 | --enable-sdks=all --enable-wildcard --enable-secure-api \ 46 | --enable-lib32 --disable-lib64 \ 47 | > $LOG_DIR/mingw-w64-32-bit_configure.log 2>&1 || exit 1 48 | make ${MAKE_OPTS} > $LOG_DIR/mingw-w64-32-bit_build.log 2>&1 || exit 1 49 | make install > $LOG_DIR/mingw-w64-32-bit_install.log 2>&1 || exit 1 50 | 51 | echo "-> Building 64-bit winpthreads" 52 | cd $BUILD_DIR/winpthreads64 53 | sh $SRC_DIR/winpthreads/configure --host=x86_64-w64-mingw32 --prefix=$BUILD_DIR/mingw64/x86_64-w64-mingw32 \ 54 | --enable-shared --enable-static \ 55 | > $LOG_DIR/winpthreads-64-bit_configure.log 2>&1 || exit 1 56 | make ${MAKE_OPTS} > $LOG_DIR/winpthreads-64-bit_build.log 2>&1 || exit 1 57 | make install > $LOG_DIR/winpthreads-32-bit_install.log 2>&1 || exit 1 58 | 59 | echo "-> Building 32-bit winpthreads" 60 | cd $BUILD_DIR/winpthreads64 61 | sh $SRC_DIR/winpthreads/configure --host=i686-w64-mingw32 --prefix=$BUILD_DIR/mingw32/i686-w64-mingw32 \ 62 | --enable-shared --enable-static \ 63 | > $LOG_DIR/winpthreads-32-bit_configure.log 2>&1 || exit 1 64 | make ${MAKE_OPTS} > $LOG_DIR/winpthreads-64-bit_build.log 2>&1 || exit 1 65 | make install > $LOG_DIR/winpthreads-64-bit_install.log 2>&1 || exit 1 66 | 67 | cd $BUILD_DIR 68 | TAR_COMPRESS="tar -Jhcf" 69 | BIN_COMPRESS="7za -l -bd -mx9 a" 70 | 71 | echo "-> Creating 64-bit packages" 72 | $TAR_COMPRESS $PACKAGE_DIR/x86_64-w64-mingw32-$PACKAGE_NAME.tar.xz mingw64 > $LOG_DIR/package-64-bit-tar.log 2>&1 || exit 1 73 | $BIN_COMPRESS $PACKAGE_DIR/x86_64-w64-mingw32-$PACKAGE_NAME.7z mingw64 > $LOG_DIR/package-64-bit-7z.log 2>&1 || exit 1 74 | 75 | echo "-> Creating 32-bit packages" 76 | $TAR_COMPRESS $PACKAGE_DIR/i686-w64-mingw32-$PACKAGE_NAME.tar.xz mingw32 > $LOG_DIR/package-32-bit-tar.log 2>&1 || exit 1 77 | $BIN_COMPRESS $PACKAGE_DIR/i686-w64-mingw32-$PACKAGE_NAME.7z mingw32 > $LOG_DIR/package-32-bit-7z.log 2>&1 || exit 1 78 | -------------------------------------------------------------------------------- /buildmingw32clang32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=w64 7 | export HOST_OS=mingw32 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | 15 | export SHORT_NAME=mingw32-dw2 16 | export LONG_NAME=mingw32clang32 17 | 18 | # call main build script 19 | . ./scripts/buildclangfromcross.sh 20 | -------------------------------------------------------------------------------- /buildmingw32mingw32-dw2.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=w64 7 | export HOST_OS=mingw32 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32-dw2 17 | export LONG_NAME=mingw32mingw32-dw2 18 | 19 | # call main build script 20 | . ./scripts/buildfromcross.sh 21 | -------------------------------------------------------------------------------- /buildmingw32mingw32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=w64 7 | export HOST_OS=mingw32 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32 17 | export LONG_NAME=mingw32mingw32 18 | 19 | # call main build script 20 | . ./scripts/buildfromcross.sh 21 | -------------------------------------------------------------------------------- /buildmingw32mingw64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=i686 6 | export HOST_VENDOR=w64 7 | export HOST_OS=mingw32 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=x86_64 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--disable-lib32 --enable-lib64" 15 | 16 | export SHORT_NAME=mingw64 17 | export LONG_NAME=mingw32mingw64 18 | 19 | # call main build script 20 | . ./scripts/buildfromcross.sh 21 | -------------------------------------------------------------------------------- /buildmingw64clang64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=x86_64 6 | export HOST_VENDOR=w64 7 | export HOST_OS=mingw32 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=x86_64 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | 15 | export SHORT_NAME=mingw64 16 | export LONG_NAME=mingw64clang64 17 | 18 | # call main build script 19 | . ./scripts/buildclangfromcross.sh 20 | -------------------------------------------------------------------------------- /buildmingw64mingw32.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=x86_64 6 | export HOST_VENDOR=w64 7 | export HOST_OS=mingw32 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=i686 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--enable-lib32 --disable-lib64" 15 | 16 | export SHORT_NAME=mingw32 17 | export LONG_NAME=mingw64mingw32 18 | export GDB_PYTHON_WIN64_WORKAROUND='-DMS_WIN64' 19 | 20 | # call main build script 21 | . ./scripts/buildfromcross.sh 22 | -------------------------------------------------------------------------------- /buildmingw64mingw64.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # platform information 5 | export HOST_ARCH=x86_64 6 | export HOST_VENDOR=w64 7 | export HOST_OS=mingw32 8 | export HOST="$HOST_ARCH-$HOST_VENDOR-$HOST_OS" 9 | 10 | export TARGET_ARCH=x86_64 11 | export TARGET_VENDOR=w64 12 | export TARGET_OS=mingw32 13 | export TARGET="$TARGET_ARCH-$TARGET_VENDOR-$TARGET_OS" 14 | export CRT_CONFIG="--disable-lib32 --enable-lib64" 15 | 16 | export SHORT_NAME=mingw64 17 | export LONG_NAME=mingw64mingw64 18 | export GDB_PYTHON_WIN64_WORKAROUND='-DMS_WIN64' 19 | 20 | # call main build script 21 | . ./scripts/buildfromcross.sh 22 | -------------------------------------------------------------------------------- /envsetup/clang32env.cmd: -------------------------------------------------------------------------------- 1 | @title MinGW-w64 32-bit Clang build environment 2 | 3 | @echo Setting up environment for MinGW-w64 Clang 32-bit... 4 | 5 | @set PATH=%CD%\bin;%PATH% 6 | 7 | @call cmd 8 | -------------------------------------------------------------------------------- /envsetup/clang64env.cmd: -------------------------------------------------------------------------------- 1 | @title MinGW-w64 64-bit Clang build environment 2 | 3 | @echo Setting up environment for MinGW-w64 Clang 64-bit... 4 | 5 | @set PATH=%CD%\bin;%PATH% 6 | 7 | @call cmd 8 | -------------------------------------------------------------------------------- /envsetup/mingw32env.cmd: -------------------------------------------------------------------------------- 1 | @title MinGW-w64 32-bit GCC build environment 2 | 3 | @echo Setting up environment for MinGW-w64 GCC 32-bit... 4 | 5 | @set PATH=%CD%\bin;%PATH% 6 | 7 | @call cmd 8 | -------------------------------------------------------------------------------- /envsetup/mingw64env.cmd: -------------------------------------------------------------------------------- 1 | @title MinGW-w64 64-bit GCC build environment 2 | 3 | @echo Setting up environment for MinGW-w64 GCC 64-bit... 4 | 5 | @set PATH=%CD%\bin;%PATH% 6 | 7 | @call cmd 8 | -------------------------------------------------------------------------------- /patches/config_jobserver.patch.txt: -------------------------------------------------------------------------------- 1 | --- config.h~ 2 | +++ config.h 3 | @@ -328,5 +328,5 @@ 4 | 5 | /* Define to 1 to enable job server support in GNU make. */ 6 | -/* #undef MAKE_JOBSERVER */ 7 | +#define MAKE_JOBSERVER 1 8 | 9 | /* Define to 1 to enable symbolic link timestamp checking. */ 10 | -------------------------------------------------------------------------------- /patches/gcc-4.6-posixthreadingandlibstdc++.patch.txt: -------------------------------------------------------------------------------- 1 | diff --git a/gcc/config.gcc b/gcc/config.gcc 2 | index 39d9a19..df59618 100644 3 | --- a/gcc/config.gcc 4 | +++ b/gcc/config.gcc 5 | @@ -1484,7 +1484,7 @@ i[34567]86-*-pe | i[34567]86-*-cygwin*) 6 | use_gcc_stdint=wrap 7 | ;; 8 | i[34567]86-*-mingw* | x86_64-*-mingw*) 9 | - tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/mingw32.h" 10 | + tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h" 11 | xm_file=i386/xm-mingw32.h 12 | case ${target} in 13 | x86_64-*-* | *-w64-*) 14 | @@ -1494,6 +1494,10 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) 15 | *) 16 | ;; 17 | esac 18 | + if test x$enable_threads = xposix ; then 19 | + tm_file="${tm_file} i386/mingw-pthread.h" 20 | + fi 21 | + tm_file="${tm_file} i386/mingw32.h" 22 | # This makes the logic if mingw's or the w64 feature set has to be used 23 | case ${target} in 24 | *-w64-*) 25 | @@ -1562,8 +1566,12 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) 26 | use_gcc_stdint=wrap 27 | case ${enable_threads} in 28 | "" | yes | win32) thread_file='win32' 29 | - tmake_file="${tmake_file} i386/t-gthr-win32" 30 | - ;; 31 | + tmake_file="${tmake_file} i386/t-gthr-win32" 32 | + ;; 33 | + posix) 34 | + thread_file='posix' 35 | + tmake_file="i386/t-mingw-pthread ${tmake_file}" 36 | + ;; 37 | esac 38 | case ${target} in 39 | x86_64-*-mingw*) 40 | diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt 41 | index 0fb325b..2d23523 100644 42 | --- a/gcc/config/i386/cygming.opt 43 | +++ b/gcc/config/i386/cygming.opt 44 | @@ -52,3 +52,5 @@ Compile code that relies on Cygwin DLL wrappers to support C++ operator new/dele 45 | 46 | posix 47 | Driver 48 | + 49 | +; Retain blank line above 50 | diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h 51 | index f84434a..62a72ef 100644 52 | --- a/gcc/config/i386/mingw-w64.h 53 | +++ b/gcc/config/i386/mingw-w64.h 54 | @@ -1,8 +1,8 @@ 55 | /* Operating system specific defines to be used when targeting GCC for 56 | hosting on Windows 32/64 via mingw-w64 runtime, using GNU tools and 57 | the Windows API Library. 58 | - Copyright (C) 2009, 59 | - 2010 Free Software Foundation, Inc. 60 | + Copyright (C) 2009, 2010, 61 | + 2011 Free Software Foundation, Inc. 62 | 63 | This file is part of GCC. 64 | 65 | @@ -20,11 +20,13 @@ You should have received a copy of the GNU General Public License 66 | along with GCC; see the file COPYING3. If not see 67 | . */ 68 | 69 | -/* Enable -municode feature. */ 70 | +/* Enable -municode feature and support optional pthread support. */ 71 | 72 | #undef CPP_SPEC 73 | -#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} \ 74 | - %{municode:-DUNICODE}" 75 | +#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} " \ 76 | + "%{municode:-DUNICODE} " \ 77 | + "%{" SPEC_PTHREAD1 ":-D_REENTRANCE} " \ 78 | + "%{" SPEC_PTHREAD2 ":-U_REENTRANCE} " 79 | 80 | #undef STARTFILE_SPEC 81 | #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \ 82 | @@ -38,6 +40,12 @@ along with GCC; see the file COPYING3. If not see 83 | #undef ASM_SPEC 84 | #define ASM_SPEC "%{m32:--32} %{m64:--64}" 85 | 86 | +#undef LIB_SPEC 87 | +#define LIB_SPEC "%{pg:-lgmon} %{" SPEC_PTHREAD1 ":-lpthread} " \ 88 | + "%{" SPEC_PTHREAD2 ": } " \ 89 | + "%{mwindows:-lgdi32 -lcomdlg32} " \ 90 | + "-ladvapi32 -lshell32 -luser32 -lkernel32" 91 | + 92 | #undef SPEC_32 93 | #undef SPEC_64 94 | #if TARGET_64BIT_DEFAULT 95 | diff --git a/gcc/config/i386/mingw-w64.opt b/gcc/config/i386/mingw-w64.opt 96 | index 965f4c0..4eebce6 100644 97 | --- a/gcc/config/i386/mingw-w64.opt 98 | +++ b/gcc/config/i386/mingw-w64.opt 99 | @@ -21,3 +21,5 @@ 100 | municode 101 | Target 102 | Use unicode startup and define UNICODE macro 103 | + 104 | +; Retain blank line above. 105 | diff --git a/gcc/config/i386/mingw.opt b/gcc/config/i386/mingw.opt 106 | index bd9a4b6..f7ae189 100644 107 | --- a/gcc/config/i386/mingw.opt 108 | +++ b/gcc/config/i386/mingw.opt 109 | @@ -18,6 +18,12 @@ 110 | ; along with GCC; see the file COPYING3. If not see 111 | ; . 112 | 113 | +pthread 114 | +Driver 115 | + 116 | +no-pthread 117 | +Driver 118 | + 119 | Wpedantic-ms-format 120 | C ObjC C++ ObjC++ Var(warn_pedantic_ms_format) Init(1) Warning 121 | Warn about none ISO msvcrt scanf/printf width extensions 122 | @@ -25,3 +31,5 @@ Warn about none ISO msvcrt scanf/printf width extensions 123 | fset-stack-executable 124 | Common Report Var(flag_setstackexecutable) Init(1) Optimization 125 | For nested functions on stack executable permission is set. 126 | + 127 | +; Need to retain blank line above. 128 | diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h 129 | index 27da92b..4e5665f 100644 130 | --- a/gcc/config/i386/mingw32.h 131 | +++ b/gcc/config/i386/mingw32.h 132 | @@ -47,6 +47,14 @@ along with GCC; see the file COPYING3. If not see 133 | } \ 134 | while (0) 135 | 136 | +#ifndef TARGET_USE_PTHREAD_BY_DEFAULT 137 | +#define SPEC_PTHREAD1 "pthread" 138 | +#define SPEC_PTHREAD2 "!no-pthread" 139 | +#else 140 | +#define SPEC_PTHREAD1 "!no-pthread" 141 | +#define SPEC_PTHREAD2 "pthread" 142 | +#endif 143 | + 144 | #undef SUB_LINK_ENTRY32 145 | #undef SUB_LINK_ENTRY64 146 | #define SUB_LINK_ENTRY32 "-e _DllMainCRTStartup@12" 147 | @@ -71,13 +79,17 @@ along with GCC; see the file COPYING3. If not see 148 | #define STANDARD_INCLUDE_COMPONENT "MINGW" 149 | 150 | #undef CPP_SPEC 151 | -#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT}" 152 | +#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} " \ 153 | + "%{" SPEC_PTHREAD1 ":-D_REENTRANCE} " \ 154 | + "%{" SPEC_PTHREAD2 ": } " 155 | 156 | /* For Windows applications, include more libraries, but always include 157 | kernel32. */ 158 | #undef LIB_SPEC 159 | -#define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \ 160 | - -ladvapi32 -lshell32 -luser32 -lkernel32" 161 | +#define LIB_SPEC "%{pg:-lgmon} %{" SPEC_PTHREAD1 ":-lpthread} " \ 162 | + "%{" SPEC_PTHREAD2 ": } " \ 163 | + "%{mwindows:-lgdi32 -lcomdlg32} " \ 164 | + "-ladvapi32 -lshell32 -luser32 -lkernel32" 165 | 166 | /* Weak symbols do not get resolved if using a Windows dll import lib. 167 | Make the unwind registration references strong undefs. */ 168 | diff --git a/gcc/config/i386/t-cygming b/gcc/config/i386/t-cygming 169 | index ccae237..c4807a0 100644 170 | --- a/gcc/config/i386/t-cygming 171 | +++ b/gcc/config/i386/t-cygming 172 | @@ -77,16 +77,23 @@ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ 173 | ifndef SHLIB_DLLDIR 174 | $(error SHLIB_DLLDIR must be defined) 175 | endif 176 | +ifndef SHLIB_PTHREAD_CFLAG 177 | +SHLIB_PTHREAD_CFLAG = 178 | +endif 179 | +ifndef SHLIB_PTHREAD_LDFLAG 180 | +SHLIB_PTHREAD_LDFLAG = 181 | +endif 182 | 183 | SHLIB_LINK = $(LN_S) -f $(SHLIB_MAP) $(SHLIB_MAP).def && \ 184 | if [ ! -d $(SHLIB_DIR) ]; then \ 185 | mkdir $(SHLIB_DIR); \ 186 | else true; fi && \ 187 | - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ 188 | + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(SHLIB_PTHREAD_CFLAG) \ 189 | + -shared -nodefaultlibs \ 190 | $(SHLIB_MAP).def \ 191 | -Wl,--out-implib,$(SHLIB_DIR)/$(SHLIB_IMPLIB).tmp \ 192 | -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ 193 | - $(SHLIB_OBJS) $(SHLIB_LC) && \ 194 | + $(SHLIB_OBJS) ${SHLIB_PTHREAD_LDFLAG} $(SHLIB_LC) && \ 195 | if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \ 196 | mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \ 197 | $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \ 198 | diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h 199 | index ecb06e2..fa48ddc 100644 200 | --- a/gcc/gthr-posix.h 201 | +++ b/gcc/gthr-posix.h 202 | @@ -65,7 +65,7 @@ typedef struct timespec __gthread_time_t; 203 | #define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER 204 | #define __GTHREAD_TIME_INIT {0,0} 205 | 206 | -#if SUPPORTS_WEAK && GTHREAD_USE_WEAK 207 | +#if SUPPORTS_WEAK && GTHREAD_USE_WEAK && !defined(__MINGW32__) 208 | # ifndef __gthrw_pragma 209 | # define __gthrw_pragma(pragma) 210 | # endif 211 | diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 212 | index d6735e9..222258a 100644 213 | --- a/libstdc++-v3/acinclude.m4 214 | +++ b/libstdc++-v3/acinclude.m4 215 | @@ -1697,7 +1697,9 @@ AC_DEFUN([GLIBCXX_CHECK_SYSTEM_ERROR], [ 216 | m4_pushdef([n_syserr], [1])dnl 217 | m4_foreach([syserr], [EOWNERDEAD, ENOTRECOVERABLE, ENOLINK, EPROTO, ENODATA, 218 | ENOSR, ENOSTR, ETIME, EBADMSG, ECANCELED, 219 | - EOVERFLOW, ENOTSUP, EIDRM, ETXTBSY], 220 | + EOVERFLOW, ENOTSUP, EIDRM, ETXTBSY, 221 | + ECHILD, ENOSPC, EPERM, 222 | + ETIMEDOUT, EWOULDBLOCK], 223 | [m4_pushdef([SYSERR], m4_toupper(syserr))dnl 224 | AC_MSG_CHECKING([for syserr]) 225 | AC_CACHE_VAL([glibcxx_cv_system_error[]n_syserr], [ 226 | diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in 227 | index 6ab257f..75810fc 100644 228 | --- a/libstdc++-v3/config.h.in 229 | +++ b/libstdc++-v3/config.h.in 230 | @@ -60,6 +60,9 @@ 231 | /* Define if ECANCELED exists. */ 232 | #undef HAVE_ECANCELED 233 | 234 | +/* Define if ECHILD exists. */ 235 | +#undef HAVE_ECHILD 236 | + 237 | /* Define if EIDRM exists. */ 238 | #undef HAVE_EIDRM 239 | 240 | @@ -72,6 +75,9 @@ 241 | /* Define if ENOLINK exists. */ 242 | #undef HAVE_ENOLINK 243 | 244 | +/* Define if ENOSPC exists. */ 245 | +#undef HAVE_ENOSPC 246 | + 247 | /* Define if ENOSR exists. */ 248 | #undef HAVE_ENOSR 249 | 250 | @@ -90,15 +96,24 @@ 251 | /* Define if EOWNERDEAD exists. */ 252 | #undef HAVE_EOWNERDEAD 253 | 254 | +/* Define if EPERM exists. */ 255 | +#undef HAVE_EPERM 256 | + 257 | /* Define if EPROTO exists. */ 258 | #undef HAVE_EPROTO 259 | 260 | /* Define if ETIME exists. */ 261 | #undef HAVE_ETIME 262 | 263 | +/* Define if ETIMEDOUT exists. */ 264 | +#undef HAVE_ETIMEDOUT 265 | + 266 | /* Define if ETXTBSY exists. */ 267 | #undef HAVE_ETXTBSY 268 | 269 | +/* Define if EWOULDBLOCK exists. */ 270 | +#undef HAVE_EWOULDBLOCK 271 | + 272 | /* Define to 1 if you have the header file. */ 273 | #undef HAVE_EXECINFO_H 274 | 275 | diff --git a/libstdc++-v3/config/os/mingw32/error_constants.h b/libstdc++-v3/config/os/mingw32/error_constants.h 276 | index f2a9116..da2d311 100644 277 | --- a/libstdc++-v3/config/os/mingw32/error_constants.h 278 | +++ b/libstdc++-v3/config/os/mingw32/error_constants.h 279 | @@ -1,6 +1,6 @@ 280 | // Specific definitions for mingw32 platform -*- C++ -*- 281 | 282 | -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 283 | +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. 284 | // 285 | // This file is part of the GNU ISO C++ Library. This library is free 286 | // software; you can redistribute it and/or modify it under the 287 | @@ -33,7 +33,6 @@ 288 | #include 289 | #include 290 | 291 | - 292 | namespace std _GLIBCXX_VISIBILITY(default) 293 | { 294 | _GLIBCXX_BEGIN_NAMESPACE_VERSION 295 | @@ -79,13 +78,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION 296 | // network_reset = ENETRESET, 297 | // network_unreachable = ENETUNREACH, 298 | // no_buffer_space = ENOBUFS, 299 | -// no_child_process = ECHILD, 300 | +#ifdef _GLIBCXX_HAVE_ECHILD 301 | + no_child_process = ECHILD, 302 | +#endif 303 | // no_link = ENOLINK, 304 | no_lock_available = ENOLCK, 305 | // no_message_available = ENODATA, 306 | // no_message = ENOMSG, 307 | // no_protocol_option = ENOPROTOOPT, 308 | -// no_space_on_device = ENOSPC, 309 | +#ifdef _GLIBCXX_HAVE_ENOSPC 310 | + no_space_on_device = ENOSPC, 311 | +#endif 312 | // no_stream_resources = ENOSR, 313 | no_such_device_or_address = ENXIO, 314 | no_such_device = ENODEV, 315 | @@ -96,12 +99,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION 316 | // not_a_stream = ENOSTR, 317 | // not_connected = ENOTCONN, 318 | not_enough_memory = ENOMEM, 319 | -// not_supported = ENOTSUP, 320 | +#ifdef _GLIBCXX_HAVE_ENOTSUP 321 | + not_supported = ENOTSUP, 322 | +#endif 323 | // operation_canceled = ECANCELED, 324 | // operation_in_progress = EINPROGRESS, 325 | -// operation_not_permitted = EPERM, 326 | +#ifdef _GLIBCXX_HAVE_EPERM 327 | + operation_not_permitted = EPERM, 328 | +#endif 329 | // operation_not_supported = EOPNOTSUPP, 330 | -// operation_would_block = EWOULDBLOCK, 331 | +#ifdef _GLIBCXX_HAVE_EWOULDBLOCK 332 | + operation_would_block = EWOULDBLOCK, 333 | +#endif 334 | // owner_dead = EOWNERDEAD, 335 | permission_denied = EACCES, 336 | // protocol_error = EPROTO, 337 | @@ -113,13 +122,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION 338 | // state_not_recoverable = ENOTRECOVERABLE, 339 | // stream_timeout = ETIME, 340 | // text_file_busy = ETXTBSY, 341 | -// timed_out = ETIMEDOUT, 342 | +#ifdef _GLIBCXX_HAVE_ETIMEDOUT 343 | + timed_out = ETIMEDOUT, 344 | +#endif 345 | too_many_files_open_in_system = ENFILE, 346 | too_many_files_open = EMFILE, 347 | too_many_links = EMLINK 348 | - // too_many_symbolic_link_levels = ELOOP, 349 | - // value_too_large = EOVERFLOW, 350 | - // wrong_protocol_type = EPROTOTYPE 351 | +// too_many_symbolic_link_levels = ELOOP, 352 | +#ifdef _GLIBCXX_HAVE_EOVERFLOW 353 | + , 354 | + value_too_large = EOVERFLOW 355 | +#endif 356 | +// wrong_protocol_type = EPROTOTYPE 357 | }; 358 | 359 | _GLIBCXX_END_NAMESPACE_VERSION 360 | diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure 361 | index c6a0336..50a049d 100755 362 | --- a/libstdc++-v3/configure 363 | +++ b/libstdc++-v3/configure 364 | @@ -17624,6 +17624,171 @@ if test x"$glibcxx_cv_system_error14" = x"yes"; then 365 | $as_echo "#define HAVE_ETXTBSY 1" >>confdefs.h 366 | 367 | fi 368 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHILD" >&5 369 | +$as_echo_n "checking for ECHILD... " >&6; } 370 | +if test "${glibcxx_cv_system_error15+set}" = set; then : 371 | + $as_echo_n "(cached) " >&6 372 | +else 373 | + 374 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 375 | +/* end confdefs.h. */ 376 | +#include 377 | +int 378 | +main () 379 | +{ 380 | +int i = ECHILD; 381 | + ; 382 | + return 0; 383 | +} 384 | +_ACEOF 385 | +if ac_fn_c_try_compile "$LINENO"; then : 386 | + glibcxx_cv_system_error15=yes 387 | +else 388 | + glibcxx_cv_system_error15=no 389 | +fi 390 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 391 | + 392 | +fi 393 | + 394 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error15" >&5 395 | +$as_echo "$glibcxx_cv_system_error15" >&6; } 396 | +if test x"$glibcxx_cv_system_error15" = x"yes"; then 397 | + 398 | +$as_echo "#define HAVE_ECHILD 1" >>confdefs.h 399 | + 400 | +fi 401 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOSPC" >&5 402 | +$as_echo_n "checking for ENOSPC... " >&6; } 403 | +if test "${glibcxx_cv_system_error16+set}" = set; then : 404 | + $as_echo_n "(cached) " >&6 405 | +else 406 | + 407 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 408 | +/* end confdefs.h. */ 409 | +#include 410 | +int 411 | +main () 412 | +{ 413 | +int i = ENOSPC; 414 | + ; 415 | + return 0; 416 | +} 417 | +_ACEOF 418 | +if ac_fn_c_try_compile "$LINENO"; then : 419 | + glibcxx_cv_system_error16=yes 420 | +else 421 | + glibcxx_cv_system_error16=no 422 | +fi 423 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 424 | + 425 | +fi 426 | + 427 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error16" >&5 428 | +$as_echo "$glibcxx_cv_system_error16" >&6; } 429 | +if test x"$glibcxx_cv_system_error16" = x"yes"; then 430 | + 431 | +$as_echo "#define HAVE_ENOSPC 1" >>confdefs.h 432 | + 433 | +fi 434 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EPERM" >&5 435 | +$as_echo_n "checking for EPERM... " >&6; } 436 | +if test "${glibcxx_cv_system_error17+set}" = set; then : 437 | + $as_echo_n "(cached) " >&6 438 | +else 439 | + 440 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 441 | +/* end confdefs.h. */ 442 | +#include 443 | +int 444 | +main () 445 | +{ 446 | +int i = EPERM; 447 | + ; 448 | + return 0; 449 | +} 450 | +_ACEOF 451 | +if ac_fn_c_try_compile "$LINENO"; then : 452 | + glibcxx_cv_system_error17=yes 453 | +else 454 | + glibcxx_cv_system_error17=no 455 | +fi 456 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 457 | + 458 | +fi 459 | + 460 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error17" >&5 461 | +$as_echo "$glibcxx_cv_system_error17" >&6; } 462 | +if test x"$glibcxx_cv_system_error17" = x"yes"; then 463 | + 464 | +$as_echo "#define HAVE_EPERM 1" >>confdefs.h 465 | + 466 | +fi 467 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETIMEDOUT" >&5 468 | +$as_echo_n "checking for ETIMEDOUT... " >&6; } 469 | +if test "${glibcxx_cv_system_error18+set}" = set; then : 470 | + $as_echo_n "(cached) " >&6 471 | +else 472 | + 473 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 474 | +/* end confdefs.h. */ 475 | +#include 476 | +int 477 | +main () 478 | +{ 479 | +int i = ETIMEDOUT; 480 | + ; 481 | + return 0; 482 | +} 483 | +_ACEOF 484 | +if ac_fn_c_try_compile "$LINENO"; then : 485 | + glibcxx_cv_system_error18=yes 486 | +else 487 | + glibcxx_cv_system_error18=no 488 | +fi 489 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 490 | + 491 | +fi 492 | + 493 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error18" >&5 494 | +$as_echo "$glibcxx_cv_system_error18" >&6; } 495 | +if test x"$glibcxx_cv_system_error18" = x"yes"; then 496 | + 497 | +$as_echo "#define HAVE_ETIMEDOUT 1" >>confdefs.h 498 | + 499 | +fi 500 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EWOULDBLOCK" >&5 501 | +$as_echo_n "checking for EWOULDBLOCK... " >&6; } 502 | +if test "${glibcxx_cv_system_error19+set}" = set; then : 503 | + $as_echo_n "(cached) " >&6 504 | +else 505 | + 506 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 507 | +/* end confdefs.h. */ 508 | +#include 509 | +int 510 | +main () 511 | +{ 512 | +int i = EWOULDBLOCK; 513 | + ; 514 | + return 0; 515 | +} 516 | +_ACEOF 517 | +if ac_fn_c_try_compile "$LINENO"; then : 518 | + glibcxx_cv_system_error19=yes 519 | +else 520 | + glibcxx_cv_system_error19=no 521 | +fi 522 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 523 | + 524 | +fi 525 | + 526 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error19" >&5 527 | +$as_echo "$glibcxx_cv_system_error19" >&6; } 528 | +if test x"$glibcxx_cv_system_error19" = x"yes"; then 529 | + 530 | +$as_echo "#define HAVE_EWOULDBLOCK 1" >>confdefs.h 531 | + 532 | +fi 533 | 534 | 535 | 536 | -------------------------------------------------------------------------------- /patches/gcc-4.7-gthread.patch.txt: -------------------------------------------------------------------------------- 1 | diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h 2 | index a935e92..4e4eea0 100644 3 | --- a/libgcc/gthr-posix.h 4 | +++ b/libgcc/gthr-posix.h 5 | @@ -88,7 +88,7 @@ typedef struct timespec __gthread_time_t; 6 | # define __GTHREAD_COND_INIT_FUNCTION __gthread_cond_init_function 7 | #endif 8 | 9 | -#if SUPPORTS_WEAK && GTHREAD_USE_WEAK 10 | +#if SUPPORTS_WEAK && GTHREAD_USE_WEAK && !defined(__MINGW32__) 11 | # ifndef __gthrw_pragma 12 | # define __gthrw_pragma(pragma) 13 | # endif 14 | -------------------------------------------------------------------------------- /patches/gcc-4.8-build-with-c++.patch.txt: -------------------------------------------------------------------------------- 1 | --- gcc/gcc/cp/class.c 2012-07-20 10:17:08.000000000 +0200 2 | +++ gcc/gcc/cp/class.c 2012-07-20 16:29:20.466161900 +0200 3 | @@ -7588,7 +7588,7 @@ 4 | indented = maybe_indent_hierarchy (stream, indent, 0); 5 | fprintf (stream, "%s (0x%lx) ", 6 | type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER), 7 | - (unsigned long) binfo); 8 | + (uintptr_t) binfo); 9 | if (binfo != igo) 10 | { 11 | fprintf (stream, "alternative-path\n"); 12 | @@ -7613,7 +7613,7 @@ 13 | fprintf (stream, " primary-for %s (0x%lx)", 14 | type_as_string (BINFO_TYPE (BINFO_INHERITANCE_CHAIN (binfo)), 15 | TFF_PLAIN_IDENTIFIER), 16 | - (unsigned long)BINFO_INHERITANCE_CHAIN (binfo)); 17 | + (uintptr_t)BINFO_INHERITANCE_CHAIN (binfo)); 18 | } 19 | if (BINFO_LOST_PRIMARY_P (binfo)) 20 | { 21 | @@ -7746,7 +7746,7 @@ 22 | if (ctor_vtbl_p) 23 | { 24 | if (!BINFO_VIRTUAL_P (binfo)) 25 | - fprintf (stream, " (0x%lx instance)", (unsigned long)binfo); 26 | + fprintf (stream, " (0x%lx instance)", (uintptr_t)binfo); 27 | fprintf (stream, " in %s", type_as_string (t, TFF_PLAIN_IDENTIFIER)); 28 | } 29 | fprintf (stream, "\n"); 30 | --- gcc/gcc/ggc-common.c 2011-02-15 19:12:46.000000000 +0100 31 | +++ gcc/gcc/ggc-common.c 2012-07-20 10:26:20.767175200 +0200 32 | @@ -308,7 +308,7 @@ 33 | enum gt_types_enum type; 34 | }; 35 | 36 | -#define POINTER_HASH(x) (hashval_t)((long)x >> 3) 37 | +#define POINTER_HASH(x) (hashval_t)((uintptr_t)x >> 3) 38 | 39 | /* Register an object in the hash table. */ 40 | 41 | --- gcc/gcc/pointer-set.c 2008-11-04 10:26:03.000000000 +0100 42 | +++ gcc/gcc/pointer-set.c 2012-07-20 10:26:20.767175200 +0200 43 | @@ -64,7 +64,7 @@ 44 | #endif 45 | const unsigned long shift = HOST_BITS_PER_LONG - logmax; 46 | 47 | - return ((A * (unsigned long) p) >> shift) & (max - 1); 48 | + return ((A * (uintptr_t) p) >> shift) & (max - 1); 49 | } 50 | 51 | /* Allocate an empty pointer set. */ 52 | --- gcc/gcc/prefix.c 2011-06-30 16:53:59.000000000 +0200 53 | +++ gcc/gcc/prefix.c 2012-07-20 10:26:20.767175200 +0200 54 | @@ -157,12 +157,12 @@ 55 | } 56 | 57 | size = 32; 58 | - dst = xmalloc (size); 59 | + dst = (char *) xmalloc (size); 60 | 61 | res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size); 62 | if (res == ERROR_MORE_DATA && type == REG_SZ) 63 | { 64 | - dst = xrealloc (dst, size); 65 | + dst = (char *) xrealloc (dst, size); 66 | res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size); 67 | } 68 | 69 | --- gcc/gcc/print-tree.c 2012-07-16 16:37:16.000000000 +0200 70 | +++ gcc/gcc/print-tree.c 2012-07-20 10:26:20.767175200 +0200 71 | @@ -255,7 +255,7 @@ 72 | /* Allow this function to be called if the table is not there. */ 73 | if (table) 74 | { 75 | - hash = ((unsigned long) node) % HASH_SIZE; 76 | + hash = ((uintptr_t) node) % HASH_SIZE; 77 | 78 | /* If node is in the table, just mention its address. */ 79 | for (b = table[hash]; b; b = b->next) 80 | --- gcc/gcc/tree-dump.c 2012-07-16 16:36:57.000000000 +0200 81 | +++ gcc/gcc/tree-dump.c 2012-07-20 10:26:20.767175200 +0200 82 | @@ -168,7 +168,7 @@ 83 | dump_pointer (dump_info_p di, const char *field, void *ptr) 84 | { 85 | dump_maybe_newline (di); 86 | - fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr); 87 | + fprintf (di->stream, "%-4s: %-8lx ", field, (uintptr_t) ptr); 88 | di->column += 15; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /patches/gcc-4.8-libstdc++export.patch.txt: -------------------------------------------------------------------------------- 1 | diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver 2 | index cd0be4e..759dcfb 100644 3 | --- a/libstdc++-v3/config/abi/pre/gnu.ver 4 | +++ b/libstdc++-v3/config/abi/pre/gnu.ver 5 | @@ -1513,7 +1513,7 @@ CXXABI_1.3.6 { 6 | __cxa_allocate_dependent_exception; 7 | __cxa_free_dependent_exception; 8 | __cxa_deleted_virtual; 9 | - 10 | + _ZTC*; 11 | } CXXABI_1.3.5; 12 | 13 | 14 | -------------------------------------------------------------------------------- /patches/gcc-cloog-0.17.patch.txt: -------------------------------------------------------------------------------- 1 | diff -Naur gcc-4.6-20120120-orig/configure gcc-4.6-20120120/configure 2 | --- gcc-4.6-20120120-orig/configure 2011-12-18 20:03:44.000000000 +1000 3 | +++ gcc-4.6-20120120/configure 2012-02-03 17:55:14.885990135 +1000 4 | @@ -6049,8 +6049,8 @@ 5 | LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs} ${ppllibs}" 6 | 7 | if test "${cloog_org}" = yes ; then 8 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.16.1 of CLooG" >&5 9 | -$as_echo_n "checking for version 0.16.1 of CLooG... " >&6; } 10 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.17 of CLooG" >&5 11 | +$as_echo_n "checking for version 0.17 of CLooG... " >&6; } 12 | if test "${gcc_cv_cloog_ct_0_14_0+set}" = set; then : 13 | $as_echo_n "(cached) " >&6 14 | else 15 | @@ -6061,8 +6061,7 @@ 16 | main () 17 | { 18 | #if CLOOG_VERSION_MAJOR != 0 \ 19 | - || CLOOG_VERSION_MINOR != 16 \ 20 | - || CLOOG_VERSION_REVISION < 1 21 | + || CLOOG_VERSION_MINOR != 17 22 | choke me 23 | #endif 24 | ; 25 | -------------------------------------------------------------------------------- /patches/make-PATH_SEPARATOR_CHAR.patch.txt: -------------------------------------------------------------------------------- 1 | https://savannah.gnu.org/bugs/?34818 2 | 3 | Index: make.h 4 | =================================================================== 5 | RCS file: /sources/make/make/make.h,v 6 | retrieving revision 1.149 7 | diff -u -p -r1.149 make.h 8 | --- make.h 14 Nov 2011 02:26:00 -0000 1.149 9 | +++ make.h 14 Nov 2011 10:37:41 -0000 10 | @@ -316,10 +316,14 @@ char *strsignal (int signum); 11 | #define S_(msg1,msg2,num) ngettext (msg1,msg2,num) 12 | 13 | /* Handle other OSs. */ 14 | -#ifndef PATH_SEPARATOR_CHAR 15 | -# if defined(HAVE_DOS_PATHS) 16 | -# define PATH_SEPARATOR_CHAR ';' 17 | -# elif defined(VMS) 18 | +/* To overcome an issue parsing paths in a DOS/Windows environment when 19 | + built in a unix based environment, override the PATH_SEPARATOR_CHAR 20 | + definition unless being built for Cygwin. */ 21 | +#if defined(HAVE_DOS_PATHS) && !defined(__CYGWIN__) 22 | +# undef PATH_SEPARATOR_CHAR 23 | +# define PATH_SEPARATOR_CHAR ';' 24 | +#elif !defined(PATH_SEPARATOR_CHAR) 25 | +# if defined (VMS) 26 | # define PATH_SEPARATOR_CHAR ',' 27 | # else 28 | # define PATH_SEPARATOR_CHAR ':' 29 | -------------------------------------------------------------------------------- /patches/make-TLS_VAR.patch.txt: -------------------------------------------------------------------------------- 1 | https://savannah.gnu.org/bugs/?34832 2 | 3 | Index: w32/include/w32err.h 4 | =================================================================== 5 | RCS file: /sources/make/make/w32/include/w32err.h,v 6 | retrieving revision 1.9 7 | diff -u -p -r1.9 w32err.h 8 | --- w32/include/w32err.h 13 Jul 2010 01:20:43 -0000 1.9 9 | +++ w32/include/w32err.h 15 Nov 2011 12:51:01 -0000 10 | @@ -22,6 +22,6 @@ this program. If not, see 4) \ 38 | + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) 39 | +/* gcc >= 4.3, also needs binutils >= 2.19 */ 40 | +#define __TLS_VAR __thread 41 | #else 42 | -static char szMessageBuffer[128]; 43 | +#define __TLS_VAR /* default to none */ 44 | #endif 45 | + 46 | +const char * 47 | +map_windows32_error_to_string (DWORD ercode) { 48 | +/* __declspec(thread) necessary if you will use multiple threads */ 49 | + static __TLS_VAR char szMessageBuffer[128]; 50 | /* Fill message buffer with a default message in 51 | * case FormatMessage fails 52 | */ 53 | - wsprintf (szMessageBuffer, "Error %ld\n", ercode); 54 | + wsprintf (szMessageBuffer, "Error %ld\n", ercode); 55 | 56 | /* 57 | * Special code for winsock error handling. 58 | @@ -58,13 +65,14 @@ static char szMessageBuffer[128]; 59 | /* 60 | * Default system message handling 61 | */ 62 | - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 63 | - NULL, 64 | - ercode, 65 | - LANG_NEUTRAL, 66 | - szMessageBuffer, 67 | - sizeof(szMessageBuffer), 68 | - NULL); 69 | + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 70 | + NULL, 71 | + ercode, 72 | + LANG_NEUTRAL, 73 | + szMessageBuffer, 74 | + sizeof(szMessageBuffer), 75 | + NULL); 76 | } 77 | - return szMessageBuffer; 78 | + 79 | + return szMessageBuffer; 80 | } 81 | -------------------------------------------------------------------------------- /patches/make-getopt.patch.txt: -------------------------------------------------------------------------------- 1 | Fixes the following warnings: 2 | 3 | getopt.c: In function '_getopt_initialize': 4 | getopt.c:382: warning: unused parameter 'argc' 5 | getopt.c:382: warning: unused parameter 'argv' 6 | getopt.c: In function '_getopt_internal': 7 | getopt.c:681: warning: suggest explicit braces to avoid ambiguous 'else' 8 | 9 | Index: getopt.c 10 | =================================================================== 11 | RCS file: /sources/make/make/getopt.c,v 12 | retrieving revision 1.22 13 | diff -u -p -r1.22 getopt.c 14 | --- getopt.c 25 Oct 2009 18:56:45 -0000 1.22 15 | +++ getopt.c 5 Jul 2010 20:05:22 -0000 16 | @@ -436,6 +436,9 @@ _getopt_initialize (int argc, char *cons 17 | } 18 | else 19 | nonoption_flags_len = 0; 20 | +#else 21 | + (void)argc; 22 | + (void)argv; 23 | #endif 24 | 25 | return optstring; 26 | @@ -678,7 +681,7 @@ _getopt_internal (int argc, char *const 27 | optarg = nameend + 1; 28 | else 29 | { 30 | - if (opterr) 31 | + if (opterr) { 32 | if (argv[optind - 1][1] == '-') 33 | /* --option */ 34 | fprintf (stderr, 35 | @@ -689,7 +692,7 @@ _getopt_internal (int argc, char *const 36 | fprintf (stderr, 37 | _("%s: option `%c%s' doesn't allow an argument\n"), 38 | argv[0], argv[optind - 1][0], pfound->name); 39 | - 40 | + } 41 | nextchar += strlen (nextchar); 42 | 43 | optopt = pfound->val; 44 | -------------------------------------------------------------------------------- /patches/make-windows-misc.patch.txt: -------------------------------------------------------------------------------- 1 | https://savannah.gnu.org/bugs/?34830 2 | 3 | Index: main.c 4 | =================================================================== 5 | RCS file: /sources/make/make/main.c,v 6 | retrieving revision 1.249 7 | diff -u -p -r1.249 main.c 8 | --- main.c 14 Nov 2011 00:42:50 -0000 1.249 9 | +++ main.c 14 Nov 2011 10:37:41 -0000 10 | @@ -36,6 +36,7 @@ this program. If not, see 12 | # include "pathstuff.h" 13 | # include "sub_proc.h" 14 | +# include "w32err.h" 15 | #endif 16 | #ifdef __EMX__ 17 | # include 18 | @@ -988,7 +989,7 @@ main (int argc, char **argv, char **envp 19 | fatal_signal_mask = 0; 20 | #define ADD_SIG(sig) fatal_signal_mask |= sigmask (sig) 21 | #else 22 | -#define ADD_SIG(sig) (void)sig /* Needed to avoid warnings in MSVC. */ 23 | +#define ADD_SIG(sig) (void)sig 24 | #endif 25 | #endif 26 | 27 | @@ -1728,7 +1729,7 @@ main (int argc, char **argv, char **envp 28 | if (! open_jobserver_semaphore(cp)) 29 | { 30 | DWORD err = GetLastError(); 31 | - fatal (NILF,_("internal error: unable to open jobserver semaphore `%s': (Error %d: %s)"), 32 | + fatal (NILF,_("internal error: unable to open jobserver semaphore `%s': (Error %ld: %s)"), 33 | cp, err, map_windows32_error_to_string(err)); 34 | } 35 | DB (DB_JOBS, (_("Jobserver client (semaphore %s)\n"), cp)); 36 | @@ -1804,7 +1805,7 @@ main (int argc, char **argv, char **envp 37 | if (! create_jobserver_semaphore(job_slots - 1)) 38 | { 39 | DWORD err = GetLastError(); 40 | - fatal (NILF,_("creating jobserver semaphore: (Error %d: %s)"), 41 | + fatal (NILF,_("creating jobserver semaphore: (Error %ld: %s)"), 42 | err, map_windows32_error_to_string(err)); 43 | } 44 | #else 45 | Index: job.c 46 | =================================================================== 47 | RCS file: /sources/make/make/job.c,v 48 | retrieving revision 1.214 49 | diff -u -p -r1.214 job.c 50 | --- job.c 14 Nov 2011 00:58:49 -0000 1.214 51 | +++ job.c 14 Nov 2011 10:37:41 -0000 52 | @@ -946,7 +946,7 @@ free_child (struct child *child) 53 | if (! release_jobserver_semaphore()) 54 | { 55 | DWORD err = GetLastError(); 56 | - fatal (NILF,_("release jobserver semaphore: (Error %d: %s)"), 57 | + fatal (NILF,_("release jobserver semaphore: (Error %ld: %s)"), 58 | err, map_windows32_error_to_string(err)); 59 | } 60 | 61 | @@ -1775,9 +1775,11 @@ new_job (struct file *file) 62 | #endif 63 | while (1) 64 | { 65 | - char token; 66 | int got_token; 67 | +#ifndef WINDOWS32 68 | + char token; 69 | int saved_errno; 70 | +#endif 71 | 72 | DB (DB_JOBS, ("Need a job token; we %shave children\n", 73 | children ? "" : "don't ")); 74 | @@ -1842,7 +1844,7 @@ new_job (struct file *file) 75 | if (got_token < 0) 76 | { 77 | DWORD err = GetLastError(); 78 | - fatal (NILF,_("semaphore or child process wait: (Error %d: %s)"), 79 | + fatal (NILF,_("semaphore or child process wait: (Error %ld: %s)"), 80 | err, map_windows32_error_to_string(err)); 81 | } 82 | #else 83 | Index: w32/include/sub_proc.h 84 | =================================================================== 85 | RCS file: /sources/make/make/w32/include/sub_proc.h,v 86 | retrieving revision 1.13 87 | diff -u -p -r1.13 sub_proc.h 88 | --- w32/include/sub_proc.h 14 Nov 2011 00:42:50 -0000 1.13 89 | +++ w32/include/sub_proc.h 14 Nov 2011 10:37:41 -0000 90 | @@ -58,7 +58,7 @@ EXTERN_DECL(int process_errcnt, (HANDLE 91 | EXTERN_DECL(void process_pipes, (HANDLE proc, int pipes[3])); 92 | 93 | /* jobserver routines */ 94 | -EXTERN_DECL(int open_jobserver_semaphore, (char* name)); 95 | +EXTERN_DECL(int open_jobserver_semaphore, (const char* name)); 96 | EXTERN_DECL(int create_jobserver_semaphore, (int tokens)); 97 | EXTERN_DECL(void free_jobserver_semaphore, (VOID_DECL)); 98 | EXTERN_DECL(int acquire_jobserver_semaphore, (VOID_DECL)); 99 | Index: w32/subproc/sub_proc.c 100 | =================================================================== 101 | RCS file: /sources/make/make/w32/subproc/sub_proc.c,v 102 | retrieving revision 1.25 103 | diff -u -p -r1.25 sub_proc.c 104 | --- w32/subproc/sub_proc.c 14 Nov 2011 00:42:50 -0000 1.25 105 | +++ w32/subproc/sub_proc.c 14 Nov 2011 10:37:41 -0000 106 | @@ -63,7 +63,7 @@ static char jobserver_semaphore_name[MAX 107 | static HANDLE jobserver_semaphore = NULL; 108 | 109 | /* Open existing jobserver semaphore */ 110 | -int open_jobserver_semaphore(char* name) 111 | +int open_jobserver_semaphore(const char* name) 112 | { 113 | jobserver_semaphore = OpenSemaphore( 114 | SEMAPHORE_ALL_ACCESS, // Semaphore access setting 115 | 116 | -------------------------------------------------------------------------------- /scripts/LLVM-Clang.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/LLVM/configure --host=$HOST --build=$BUILD --with-sysroot=$PREFIX --prefix=$PREFIX \ 10 | --enable-optimized --disable-assertions --disable-pthreads \ 11 | CXX=$HOST-g++ CFLAGS="$HOST_CFLAGS" \ 12 | > $LOG_DIR/LLVM-Clang_configure.log 2>&1 || exit 1 13 | echo "--> Configured" 14 | fi 15 | touch configure.marker 16 | 17 | if [ -f build.marker ] 18 | then 19 | echo "--> Already built" 20 | else 21 | echo "--> Building" 22 | make $MAKE_OPTS > $LOG_DIR/LLVM-Clang_build.log 2>&1 || 23 | exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> Already installed" 30 | else 31 | echo "--> Installing" 32 | make $MAKE_OPTS install > $LOG_DIR/LLVM-Clang_install.log 2>&1 || exit 1 33 | fi 34 | touch install.marker 35 | -------------------------------------------------------------------------------- /scripts/binutils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/binutils/configure --host=$HOST --build=$BUILD --target=$TARGET --with-sysroot=$PREFIX --prefix=$PREFIX \ 10 | --enable-64-bit-bfd --disable-multilib --disable-nls \ 11 | $GNU_WIN32_OPTIONS \ 12 | $RUBENVB_PACKAGE_OPTIONS \ 13 | CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS_BINUTILS" \ 14 | > $LOG_DIR/binutils_configure.log 2>&1 || exit 1 15 | echo "--> Configured" 16 | fi 17 | touch configure.marker 18 | 19 | if [ -f build.marker ] 20 | then 21 | echo "--> Already built" 22 | else 23 | echo "--> Building" 24 | make $MAKE_OPTS > $LOG_DIR/binutils_build.log 2>&1 || 25 | exit 1 26 | fi 27 | touch build.marker 28 | 29 | if [ -f install.marker ] 30 | then 31 | echo "--> Already installed" 32 | else 33 | echo "--> Installing" 34 | make $MAKE_OPTS install > $LOG_DIR/binutils_install.log 2>&1 || exit 1 35 | fi 36 | touch install.marker 37 | -------------------------------------------------------------------------------- /scripts/buildclangfromcross.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # common settings 5 | echo "Executing preliminary setup" 6 | # build settings 7 | . ./scripts/settings.sh || exit 1 8 | # version info 9 | echo "-> Loading version info" 10 | . ./scripts/versions.sh || exit 1 11 | # set up and create directories 12 | echo "-> Setting up directories" 13 | . ./scripts/directories.sh || exit 1 14 | 15 | # build directory 16 | mkdir -p $BUILD_DIR/LLVM-Clang 17 | mkdir -p $BUILD_DIR/licenses 18 | mkdir -p $BUILD_DIR/cleanup 19 | 20 | # build LLVM-Clang 21 | echo "-> Building LLVM/Clang" 22 | cd $BUILD_DIR/LLVM-Clang 23 | . $SCRIPTS/LLVM-Clang.sh || exit 1 24 | 25 | # copy licenses 26 | echo "-> Copying LLVM/Clang licenses" 27 | cd $BUILD_DIR/licenses 28 | if [ -f licenses.marker ] 29 | then 30 | echo "--> Licenses already installed." 31 | else 32 | echo "--> Installing LLVM/Clang licenses." 33 | mkdir -p LLVM 34 | cp $SRC_DIR/LLVM/CREDITS.TXT LLVM/CREDITS.TXT 35 | cp $SRC_DIR/LLVM/LICENSE.TXT LLVM/LICENSE.TXT 36 | 37 | mkdir -p clang 38 | cp $SRC_DIR/LLVM/tools/clang/LICENSE.TXT clang/LICENSE.TXT 39 | 40 | mkdir -p $PREFIX/licenses 41 | cp -r . $PREFIX/licenses 42 | 43 | echo "--> Done!" 44 | fi 45 | touch licenses.marker 46 | 47 | # copy environment setup 48 | if [ "$TARGET_ARCH" = "i686" ] 49 | then 50 | cp $TOP_DIR/envsetup/clang32env.cmd $PREFIX/ 51 | else 52 | cp $TOP_DIR/envsetup/clang64env.cmd $PREFIX/ 53 | fi 54 | # cleanup 55 | echo "-> Cleanup" 56 | cd $BUILD_DIR/cleanup 57 | if [ -f cleanup.marker ] 58 | then 59 | echo "Already cleaned up." 60 | else 61 | cd $PREFIX 62 | echo "--> Removing libtool files" 63 | find . -name \*.la -exec rm -f {} \; 64 | echo "--> Stripping executables" 65 | find . -name \*.exe -exec $HOST-strip {} \; 66 | cd $BUILD_DIR/cleanup 67 | echo "--> Done!" 68 | fi 69 | touch cleanup.marker 70 | 71 | # zipping 72 | echo "-> Packaging Clang addon package" 73 | export XZ_OPT="-9" 74 | SRC_COMPRESS="tar -Jhcf" 75 | BIN_COMPRESS="7za -l -bd -mx9 a" 76 | if [ "$HOST_ARCH" = "i686" ] 77 | then 78 | BIN_FILE_CLANG=$PACKAGE_DIR/$HOST/$TARGET-clang-${RUBENVB_CLANG_VERSION}-win32_rubenvb.7z 79 | else 80 | BIN_FILE_CLANG=$PACKAGE_DIR/$HOST/$TARGET-clang-${RUBENVB_CLANG_VERSION}-win64_rubenvb.7z 81 | fi 82 | CLANG_SRC_FILE=$PACKAGE_DIR/clang-${RUBENVB_CLANG_VERSION}_rubenvb.tar.xz 83 | 84 | cd $BUILD_DIR 85 | $BIN_COMPRESS $BIN_FILE_CLANG $SHORT_NAME > $LOG_DIR/zipping.log 86 | cd $TOP_DIR 87 | $SRC_COMPRESS $CLANG_SRC_FILE --exclude='*.git*' --exclude='*.svn*' build*clang??.sh scripts/buildclangfromcross.sh scripts/LLVM-Clang.sh src/LLVM 88 | -------------------------------------------------------------------------------- /scripts/buildcrossfromnative.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # common settings 5 | echo "Executing preliminary setup" 6 | # build settings 7 | . ./scripts/settings.sh || exit 1 8 | # version info 9 | echo "-> Loading version info" 10 | . ./scripts/versions.sh || exit 1 11 | # set up and create directories 12 | echo "-> Setting up directories" 13 | . ./scripts/directories.sh || exit 1 14 | 15 | # Projects to be built, in the right order 16 | PREGCC_STEPS="mingw-w64-headers 17 | binutils" 18 | GNU_PREREQ="gmp mpfr mpc 19 | isl cloog" 20 | POSTGCC_STEPS="cleanup 21 | licenses 22 | zipping" 23 | cd $PREREQ_DIR 24 | mkdir -p $GNU_PREREQ 25 | cd $BUILD_DIR 26 | mkdir -p $PREGCC_STEPS 27 | mkdir -p gcc 28 | mkdir -p mingw-w64-crt 29 | mkdir -p winpthreads 30 | mkdir -p $POSTGCC_STEPS 31 | cd $TOP_DIR 32 | 33 | 34 | # GCC prerequisites 35 | for step in $GNU_PREREQ 36 | do 37 | echo "-> $step for $HOST" 38 | cd $PREREQ_DIR/$step 39 | . $SCRIPTS/$step.sh || exit 1 40 | done 41 | # headers and binutils 42 | for step in $PREGCC_STEPS 43 | do 44 | echo "-> $step" 45 | cd $BUILD_DIR/$step 46 | . $SCRIPTS/$step.sh || exit 1 47 | done 48 | # point PATH to new tools 49 | export PATH=$PREFIX/bin:$PATH 50 | # build GCC C compiler 51 | echo "-> GCC: C compiler" 52 | cd $BUILD_DIR/gcc 53 | . $SCRIPTS/gcc-c.sh || exit 1 54 | # build mingw-w64 crt 55 | echo "-> MinGW-w64 CRT" 56 | cd $BUILD_DIR/mingw-w64-crt 57 | . $SCRIPTS/mingw-w64-crt.sh || exit 1 58 | # build winpthreads 59 | echo "-> Winpthreads" 60 | cd $BUILD_DIR/winpthreads 61 | . $SCRIPTS/winpthreads.sh || exit 1 62 | #if [ "$TARGET_ARCH" = "x86_64" ] 63 | #then 64 | # . $SCRIPTS/winpthreads64multi.sh || exit 1 65 | #else 66 | # . $SCRIPTS/winpthreads32multi.sh || exit 1 67 | #fi 68 | # build the rest of GCC 69 | echo "-> GCC: Full compiler suite" 70 | cd $BUILD_DIR/gcc 71 | . $SCRIPTS/gcc.sh || exit 1 72 | # build the rest 73 | for step in $POSTGCC_STEPS 74 | do 75 | echo "-> $step" 76 | cd $BUILD_DIR/$step 77 | . $SCRIPTS/$step.sh || exit 1 78 | done 79 | -------------------------------------------------------------------------------- /scripts/buildfromcross.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # common settings 5 | echo "Executing preliminary setup" 6 | # build settings 7 | . ./scripts/settings.sh || exit 1 8 | # version info 9 | echo "-> Loading version info" 10 | . ./scripts/versions.sh || exit 1 11 | # set up and create directories 12 | echo "-> Setting up directories" 13 | . ./scripts/directories.sh || exit 1 14 | 15 | # native compiler options 16 | export MAKE_AR="AR=$HOST-ar" # necessary for libiconv+x86_64-apple-darwin10 17 | if [ "$HOST" = "i686-w64-mingw32" ] || [ "$HOST" = "i686-pc-cygwin" ] 18 | then 19 | export HOST_LDFLAGS_BINUTILS="$HOST_LDFLAGS -Wl,--large-address-aware" 20 | fi 21 | 22 | export GNU_WIN32_OPTIONS="--disable-win32-registry --disable-rpath --disable-werror --with-libiconv-prefix=$PREREQ_INSTALL" 23 | 24 | # Projects to be built, in the right order 25 | PREGCC_STEPS="mingw-w64-headers 26 | binutils 27 | mingw-w64-crt 28 | winpthreads" 29 | GNU_PREREQ="libiconv 30 | gmp mpfr mpc 31 | isl cloog" 32 | if [ "$HOST" = "i686-w64-mingw32" ] || [ "$HOST" = "x86_64-w64-mingw32" ] 33 | then 34 | GNU_PREREQ="expat $GNU_PREREQ" 35 | POSTGCC_STEPS="python 36 | gdb 37 | make" 38 | fi 39 | POSTGCC_STEPS="$POSTGCC_STEPS 40 | cleanup 41 | licenses 42 | zipping" 43 | cd $PREREQ_DIR 44 | mkdir -p $GNU_PREREQ 45 | cd $BUILD_DIR 46 | mkdir -p $PREGCC_STEPS 47 | mkdir -p gcc 48 | mkdir -p $POSTGCC_STEPS 49 | 50 | #copy GCC environment setup script 51 | if [ "$TARGET_ARCH" = "i686" ] 52 | then 53 | cp $TOP_DIR/envsetup/mingw32env.cmd $PREFIX/ 54 | elif [ "$TARGET_ARCH" = "x86_64" ] 55 | then 56 | cp $TOP_DIR/envsetup/mingw64env.cmd $PREFIX/ 57 | fi 58 | 59 | # Build 60 | for step in $GNU_PREREQ 61 | do 62 | echo "-> $step for $HOST" 63 | cd $PREREQ_DIR/$step 64 | . $SCRIPTS/$step.sh || exit 1 65 | done 66 | for step in $PREGCC_STEPS 67 | do 68 | cd $BUILD_DIR/$step 69 | echo "-> $step" 70 | . $SCRIPTS/$step.sh || exit 1 71 | done 72 | # build GCC 73 | cd $BUILD_DIR/gcc 74 | echo "-> GCC: Full compiler suite" 75 | . $SCRIPTS/gcc.sh || exit 1 76 | # build the rest 77 | for step in $POSTGCC_STEPS 78 | do 79 | cd $BUILD_DIR/$step 80 | echo "-> $step" 81 | . $SCRIPTS/$step.sh || exit 1 82 | done 83 | -------------------------------------------------------------------------------- /scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f cleanup.marker ] 5 | then 6 | echo "--> Already cleaned up" 7 | else 8 | echo "--> Cleaning up" 9 | cd $PREFIX 10 | rm -rf mingw/ || exit 1 11 | find . -name \*.la -exec rm -f {} \; 12 | 13 | # move libgcc dll to $PREFIX/bin instead of 14 | if [ -f "$PREFIX/lib/libgcc_s_sjlj-1.dll" ] 15 | then 16 | mv $PREFIX/lib/libgcc_s_sjlj-1.dll $PREFIX/bin/ || exit 1 17 | elif [ -f "$PREFIX/lib/libgcc_s_dw2-1.dll" ] 18 | then 19 | mv $PREFIX/lib/libgcc_s_dw2-1.dll $PREFIX/bin/ || exit 1 20 | elif [ -f "$PREFIX/lib/libgcc_s_seh-1.dll" ] 21 | then 22 | mv $PREFIX/lib/libgcc_s_seh-1.dll $PREFIX/bin/ || exit 1 23 | fi 24 | 25 | echo "---> Stripping Executables" 26 | find . -name \*.exe -exec strip {} \; 27 | 28 | 29 | if [ "$TARGET" = "$HOST" ] 30 | then 31 | echo "---> Copying and stripping DLL's" 32 | $HOST-strip $PREFIX/bin/*.dll || exit 1 33 | # recopy python dll, stripping it breaks it 34 | cp $BUILD_DIR/python/bin/python27.dll $PREFIX/bin/python27.dll || exit 1 35 | else 36 | echo "---> No DLL's to copy for cross-compiler" 37 | fi 38 | 39 | cd $BUILD_DIR/cleanup 40 | fi 41 | touch cleanup.marker 42 | -------------------------------------------------------------------------------- /scripts/cloog.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/cloog/configure --host=$HOST --build=$BUILD --prefix=$PREREQ_INSTALL \ 10 | --disable-shared --enable-static \ 11 | --with-gmp-prefix=$PREREQ_INSTALL --with-bits=gmp --with-isl=system \ 12 | CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 13 | > $LOG_DIR/cloog_configure.log 2>&1 || exit 1 14 | echo "--> Configured" 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> Already built" 21 | else 22 | echo "--> Building" 23 | make $MAKE_OPTS > $LOG_DIR/cloog_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> Already installed" 30 | else 31 | echo "--> Installing" 32 | make $MAKE_OPTS install > $LOG_DIR/cloog_install.log 2>&1 || exit 1 33 | fi 34 | touch install.marker 35 | -------------------------------------------------------------------------------- /scripts/directories.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # sets and creates directories used elsewhere 3 | # requires LONG_NAME, SHORT_NAME, HOST, MINGW_W64_VERSION 4 | set -e 5 | 6 | # directories 7 | export TOP_DIR=`pwd` 8 | export SRC_DIR=$TOP_DIR/src 9 | export BUILD_DIR="$TOP_DIR/$LONG_NAME" 10 | export PACKAGE_DIR=$TOP_DIR/packages 11 | export LOG_DIR=$BUILD_DIR/logs 12 | 13 | if [ "$HOST" = "i686-w64-mingw32" ] && [ "$SHORT_NAME" = "mingw32-dw2" ] 14 | then 15 | export PREREQ_DIR="$TOP_DIR/prereq/$HOST-dw2" 16 | else 17 | export PREREQ_DIR="$TOP_DIR/prereq/$HOST" 18 | fi 19 | export PREREQ_INSTALL="$PREREQ_DIR/install" 20 | 21 | export SCRIPTS=$TOP_DIR/scripts 22 | 23 | export PREFIX=$BUILD_DIR/$SHORT_NAME 24 | 25 | DIRS_TO_MAKE="$BUILD_DIR $LOG_DIR 26 | $PREFIX $PREFIX/mingw $PREFIX/mingw/include $PREFIX/$TARGET/include $PREFIX/$TARGET/lib 27 | $PREREQ_INSTALL $PREREQ_INSTALL/lib $PREREQ_INSTALL/include 28 | $PACKAGE_DIR $PACKAGE_DIR/$HOST" 29 | mkdir -p $DIRS_TO_MAKE 30 | 31 | # if [ "$TARGET_ARCH" = "i686" ] 32 | # then 33 | # mkdir -p $PREFIX/$TARGET/lib64 34 | # rm -f $PREFIX/mingw/include 35 | # rm -f $PREFIX/mingw/lib64 36 | # rm -f $PREFIX/mingw/lib 37 | # ln -s $PREFIX/$TARGET/include $PREFIX/mingw/include 38 | # ln -s $PREFIX/$TARGET/lib $PREFIX/mingw/lib 39 | # ln -s $PREFIX/$TARGET/lib64 $PREFIX/mingw/lib64 40 | # elif [ "$TARGET_ARCH" = "x86_64" ] 41 | # then 42 | # mkdir -p $PREFIX/$TARGET/lib32 43 | # rm -f $PREFIX/mingw/include 44 | # rm -f $PREFIX/mingw/lib32 45 | # rm -f $PREFIX/mingw/lib 46 | # ln -s $PREFIX/$TARGET/include $PREFIX/mingw/include 47 | # ln -s $PREFIX/$TARGET/lib $PREFIX/mingw/lib 48 | # ln -s $PREFIX/$TARGET/lib32 $PREFIX/mingw/lib32 49 | # else 50 | # echo "ERROR, unknown target architecture." 51 | # exit 1 52 | # fi -------------------------------------------------------------------------------- /scripts/expat.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/expat/configure --host=$HOST --build=$BUILD --prefix=$PREREQ_INSTALL \ 10 | --disable-shared --enable-static \ 11 | CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 12 | > $LOG_DIR/expat_configure.log 2>&1 || exit 1 13 | echo "--> Configured" 14 | fi 15 | touch configure.marker 16 | 17 | if [ -f build.marker ] 18 | then 19 | echo "--> Already built" 20 | else 21 | echo "--> Building" 22 | make $MAKE_OPTS > $LOG_DIR/expat_build.log 2>&1 || exit 1 23 | fi 24 | touch build.marker 25 | 26 | if [ -f install.marker ] 27 | then 28 | echo "--> Already installed" 29 | else 30 | echo "--> Installing" 31 | make $MAKE_OPTS install > $LOG_DIR/expat_install.log 2>&1 || exit 1 32 | fi 33 | touch install.marker 34 | -------------------------------------------------------------------------------- /scripts/gcc-c.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/gcc/configure --host=$HOST --build=$BUILD --target=$TARGET --with-sysroot=$PREFIX --prefix=$PREFIX \ 10 | --with-gmp=$PREREQ_INSTALL --with-mpfr=$PREREQ_INSTALL --with-mpc=$PREREQ_INSTALL \ 11 | --with-cloog=$PREREQ_INSTALL --disable-cloog-version-check --with-isl=$PREREQ_INSTALL \ 12 | --enable-cloog-backend=isl --with-host-libstdcxx='-static -lstdc++ -lm' \ 13 | --enable-shared --enable-static --enable-threads=win32 \ 14 | --enable-plugins --disable-multilib \ 15 | --enable-languages=$GCC_LANGUAGES --enable-libgomp \ 16 | $EXTRA_OPTIONS --enable-fully-dynamic-string --enable-libstdcxx-time \ 17 | --disable-nls --disable-werror --enable-checking=release \ 18 | --with-gnu-as --with-gnu-ld \ 19 | $GNU_WIN32_OPTIONS \ 20 | $RUBENVB_PACKAGE_OPTIONS \ 21 | CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" CXXFLAGS="$HOST_CXXFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 22 | BOOT_CFLAGS="$HOST_CFLAGS" BOOT_CXXFLAGS="$HOST_CXXFLAGS" BOOT_LDFLAGS="$HOST_LDFLAGS" \ 23 | CFLAGS_FOR_TARGET="$TARGET_CFLAGS" CXXFLAGS_FOR_TARGET="$TARGET_CXXFLAGS" LDFLAGS_FOR_TARGET="$TARGET_LDFLAGS" \ 24 | > $LOG_DIR/gcc_configure.log 2>&1 || exit 1 25 | echo "--> Configured" 26 | fi 27 | touch configure.marker 28 | 29 | if [ -f build-c.marker ] 30 | then 31 | echo "--> Already built" 32 | else 33 | echo "--> Building gcc" 34 | make $MAKE_OPTS all-gcc > $LOG_DIR/gcc-c_build.log 2>&1 || exit 1 35 | fi 36 | touch build-c.marker 37 | 38 | if [ -f install-c.marker ] 39 | then 40 | echo "--> Already installed" 41 | else 42 | echo "--> Installing gcc" 43 | make $MAKE_OPTS install-gcc > $LOG_DIR/gcc-c_install.log 2>&1 || exit 1 44 | fi 45 | touch install-c.marker 46 | -------------------------------------------------------------------------------- /scripts/gcc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/gcc/configure --host=$HOST --build=$BUILD --target=$TARGET --with-sysroot=$PREFIX --prefix=$PREFIX \ 10 | --with-gmp=$PREREQ_INSTALL --with-mpfr=$PREREQ_INSTALL --with-mpc=$PREREQ_INSTALL \ 11 | --with-cloog=$PREREQ_INSTALL --disable-cloog-version-check --with-isl=$PREREQ_INSTALL \ 12 | --enable-cloog-backend=isl --with-host-libstdcxx='-static -lstdc++ -lm' \ 13 | --enable-shared --enable-static --enable-threads=win32 \ 14 | --enable-plugins --disable-multilib \ 15 | --enable-languages=$GCC_LANGUAGES --enable-libgomp \ 16 | $EXTRA_OPTIONS --enable-fully-dynamic-string --enable-libstdcxx-time \ 17 | --disable-nls --disable-werror --enable-checking=release \ 18 | --with-gnu-as --with-gnu-ld \ 19 | $GNU_WIN32_OPTIONS \ 20 | $RUBENVB_PACKAGE_OPTIONS \ 21 | CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" CXXFLAGS="$HOST_CXXFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 22 | BOOT_CFLAGS="$HOST_CFLAGS" BOOT_CXXFLAGS="$HOST_CXXFLAGS" BOOT_LDFLAGS="$HOST_LDFLAGS" \ 23 | CFLAGS_FOR_TARGET="$TARGET_CFLAGS" CXXFLAGS_FOR_TARGET="$TARGET_CXXFLAGS" LDFLAGS_FOR_TARGET="$TARGET_LDFLAGS" \ 24 | > $LOG_DIR/gcc_configure.log 2>&1 || exit 1 25 | echo "--> Configured" 26 | fi 27 | touch configure.marker 28 | 29 | if [ -f build.marker ] 30 | then 31 | echo "--> Already built" 32 | else 33 | echo "--> Building" 34 | #libada and libgomp need libgcc installed first to work 35 | make $MAKE_OPTS all-target-libgcc > $LOG_DIR/gcc-libgcc_build.log 2>&1 || exit 1 36 | make $MAKE_OPTS install-target-libgcc > $LOG_DIR/gcc-libgcc_install.log 2>&1 || exit 1 37 | make $MAKE_OPTS > $LOG_DIR/gcc_build.log 2>&1 || exit 1 38 | fi 39 | touch build.marker 40 | 41 | if [ -f install.marker ] 42 | then 43 | echo "--> Already installed" 44 | else 45 | echo "--> Installing" 46 | make $MAKE_OPTS install-strip > $LOG_DIR/gcc_install.log 2>&1 || exit 1 47 | fi 48 | touch install.marker 49 | -------------------------------------------------------------------------------- /scripts/gcc_tag_releases.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # git clone git://gcc.gnu.org/git/gcc.git && cd gcc 3 | s=svn://gcc.gnu.org/svn/gcc 4 | # git svn init $s 5 | 6 | if [ -f release_tags.marker ] 7 | then 8 | echo "--> GCC release tags already present" 9 | else 10 | echo 'Creating tags.db (This takes several seconds.)' 11 | git log --grep=git-svn-id: --remotes \ 12 | | egrep '(^commit |git-svn-id: )' \ 13 | | sed -e 's/^ *git-svn-id:[^@]*@\([0-9]*\).*/\1/' \ 14 | | awk 'BEGIN { RS = "commit " ; FS = "\n" } { print $1, $2 }' \ 15 | > tags.db 16 | 17 | echo 'Reading tags.db' 18 | while read cid rev ; do commit[$rev]=$cid ; done < tags.db 19 | 20 | echo 'Fetching SVN revisions and tagging' 21 | echo ' SVN rev' 22 | echo ' Git commit ID in git SVN rev Tag' 23 | echo ' ======================================== ======= ======= ======= = = =' 24 | echo ' (Waiting for remote svn info. This takes a few seconds.)' 25 | for t in `svn ls $s/tags | fgrep release | sed -e 's@/$@@'` 26 | do 27 | rev=`svn info $s/tags/$t | grep '^Last Changed Rev: ' | awk '{ print $4 }'` 28 | # Scan the svn log for the first SVN revision mirrored in GIT. 29 | # This is required because git-svn does not mirror SVN tag/branch revisions. 30 | for r in `svn log -l 2 $s/tags/$t \ 31 | | grep '^r[0-9][0-9]* | ' \ 32 | | awk '{ print $1 }' \ 33 | | sed -e 's/r//'` 34 | do 35 | if [ x"${commit[$r]}" = x ] ; then continue ; fi 36 | printf " %40s %7s %7s %s\n" "${commit[$r]}" "$r" "$rev" "$t" 37 | if [ x"${commit[$r]}" != x ] ; then 38 | git tag -f "$t" "${commit[$r]}" 39 | fi 40 | break 41 | done 42 | done 43 | 44 | echo 'Removing tags.db' 45 | rm tags.db 46 | echo 'Done.' 47 | fi 48 | touch release_tags.marker 49 | -------------------------------------------------------------------------------- /scripts/gdb.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/gdb/configure --host=$HOST --build=$BUILD --target=$TARGET --prefix=$PREFIX \ 10 | --with-libexpat-prefix=$PREREQ_INSTALL --disable-nls \ 11 | --with-python --disable-multilib --enable-64-bit-bfd \ 12 | $GNU_WIN32_OPTIONS \ 13 | $RUBENVB_PACKAGE_OPTIONS \ 14 | CFLAGS="$HOST_CFLAGS $GDB_PYTHON_WIN64_WORKAROUND -I$BUILD_DIR/python/include" LDFLAGS="$HOST_LDFLAGS -static -L$BUILD_DIR/python" \ 15 | > $LOG_DIR/gdb_configure.log 2>&1 || exit 1 16 | echo "--> Configured" 17 | fi 18 | touch configure.marker 19 | 20 | if [ -f build.marker ] 21 | then 22 | echo "--> Already built" 23 | else 24 | echo "--> Building" 25 | make $MAKE_OPTS > $LOG_DIR/gdb_build.log 2>&1 || exit 1 26 | fi 27 | touch build.marker 28 | 29 | if [ -f install.marker ] 30 | then 31 | echo "--> Already installed" 32 | else 33 | echo "--> Installing" 34 | make $MAKE_OPTS install > $LOG_DIR/gdb_install.log 2>&1 || 35 | exit 1 36 | fi 37 | touch install.marker 38 | -------------------------------------------------------------------------------- /scripts/gmp.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh ../../../src/gmp/configure --host=$HOST --build=$BUILD --prefix=$PREREQ_INSTALL \ 10 | --disable-shared --enable-static \ 11 | --enable-cxx \ 12 | CC="$HOST_CC" CXX="$HOST_CXX" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 13 | > $LOG_DIR/gmp_configure.log 2>&1 || exit 1 14 | echo "--> Configured" 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> Already built" 21 | else 22 | echo "--> Building" 23 | make $MAKE_OPTS > $LOG_DIR/gmp_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> Already installed" 30 | else 31 | echo "--> Installing" 32 | make $MAKE_OPTS install > $LOG_DIR/gmp_install.log 2>&1 || exit 1 33 | fi 34 | touch install.marker 35 | -------------------------------------------------------------------------------- /scripts/isl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/isl/configure --host=$HOST --build=$BUILD --prefix=$PREREQ_INSTALL \ 10 | --disable-shared --enable-static \ 11 | --with-gmp-prefix=$PREREQ_INSTALL \ 12 | CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 13 | > $LOG_DIR/isl_configure.log 2>&1 || exit 1 14 | echo "--> Configured" 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> Already built" 21 | else 22 | echo "--> Building" 23 | make $MAKE_OPTS > $LOG_DIR/isl_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> Already installed" 30 | else 31 | echo "--> Installing" 32 | make $MAKE_OPTS install > $LOG_DIR/isl_install.log 2>&1 || exit 1 33 | fi 34 | touch install.marker 35 | -------------------------------------------------------------------------------- /scripts/libiconv.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/libiconv/configure --host=$HOST --build=$BUILD --prefix=$PREREQ_INSTALL \ 10 | --disable-shared --enable-static \ 11 | CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 12 | > $LOG_DIR/libiconv_configure.log 2>&1 || exit 1 13 | echo "--> Configured" 14 | fi 15 | touch configure.marker 16 | 17 | if [ -f build.marker ] 18 | then 19 | echo "--> Already built" 20 | else 21 | echo "--> Building" 22 | make $MAKE_OPTS $MAKE_AR > $LOG_DIR/libiconv_build.log 2>&1 || exit 1 23 | fi 24 | touch build.marker 25 | 26 | if [ -f install.marker ] 27 | then 28 | echo "--> Already installed" 29 | else 30 | echo "--> Installing" 31 | make $MAKE_OPTS $MAKE_AR install > $LOG_DIR/libiconv_install.log 2>&1 || exit 1 32 | fi 33 | touch install.marker 34 | -------------------------------------------------------------------------------- /scripts/licenses.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f licenses.marker ] 5 | then 6 | echo "--> Licenses already installed" 7 | else 8 | echo "--> Copying licenses" 9 | echo "---> Binutils/GDB" 10 | mkdir -p binutils 11 | mkdir -p gdb 12 | LICENSES="COPYING COPYING.LIB COPYING.LIBGLOSS COPYING.NEWLIB COPYING3 COPYING3.LIB" 13 | for file in $LICENSES 14 | do 15 | cp $SRC_DIR/binutils/$file binutils/$file 16 | if [ "$HOST" = "x86_64-w64-mingw32" ] || [ "$HOST" = "i686-w64-mingw32" ] 17 | then 18 | cp $SRC_DIR/gdb/$file gdb/$file 19 | fi 20 | done 21 | 22 | echo "---> CLooG" 23 | mkdir -p cloog 24 | echo "http://www.gnu.org/licenses/lgpl-2.1.html" > cloog/license.txt 25 | 26 | echo "---> ISL" 27 | mkdir -p isl 28 | echo "http://www.gnu.org/licenses/lgpl-2.1.html" > isl/license.txt 29 | 30 | echo "---> GCC" 31 | mkdir -p gcc 32 | LICENSES="COPYING COPYING.LIB COPYING.RUNTIME COPYING3 COPYING3.LIB" 33 | for file in $LICENSES 34 | do 35 | cp $SRC_DIR/gcc/$file gcc/$file 36 | done 37 | 38 | echo "---> GMP" 39 | mkdir -p gmp 40 | cp $SRC_DIR/gmp/COPYING gmp/COPYING 41 | cp $SRC_DIR/gmp/COPYING.LIB gmp/COPYING.LIB 42 | 43 | echo "---> libiconv" 44 | mkdir -p libiconv 45 | cp $SRC_DIR/libiconv/COPYING libiconv/COPYING 46 | cp $SRC_DIR/libiconv/COPYING.LIB libiconv/COPYING.LIB 47 | 48 | echo "---> mingw-w64" 49 | mkdir -p mingw-w64 50 | cp $SRC_DIR/mingw-w64/COPYING.MinGW-w64/COPYING.MinGW-w64.txt mingw-w64/COPYING.MinGW-w64.txt 51 | cp $SRC_DIR/mingw-w64/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt mingw-w64/COPYING.MinGW-w64-runtime.txt 52 | cp $SRC_DIR/mingw-w64/COPYING mingw-w64/COPYING 53 | cp $SRC_DIR/mingw-w64/DISCLAIMER mingw-w64/DISCLAIMER 54 | cp $SRC_DIR/mingw-w64/DISCLAIMER.PD mingw-w64/DISCLAIMER.PD 55 | cp $SRC_DIR/mingw-w64/mingw-w64-headers/ddk/readme.txt mingw-w64/ddk-readme.txt 56 | cp $SRC_DIR/mingw-w64/mingw-w64-headers/direct-x/COPYING.LIB mingw-w64/direct-x-COPYING.lib 57 | cp $SRC_DIR/mingw-w64/mingw-w64-headers/direct-x/readme.txt mingw-w64/direct-x-readme.txt 58 | 59 | echo "---> MPC" 60 | mkdir -p mpc 61 | cp $SRC_DIR/mpc/COPYING.LESSER mpc/COPYING.LESSER 62 | 63 | echo "---> MPFR" 64 | mkdir -p mpfr 65 | cp $SRC_DIR/mpfr/COPYING mpfr/COPYING 66 | cp $SRC_DIR/mpfr/COPYING.LESSER mpfr/COPYING.LESSER 67 | 68 | echo "---> PPL" 69 | mkdir -p ppl 70 | cp $SRC_DIR/ppl/COPYING ppl/COPYING 71 | 72 | echo "---> Winpthreads" 73 | mkdir -p winpthreads 74 | cp $SRC_DIR/winpthreads/COPYING winpthreads/COPYING 75 | 76 | if [ "$HOST" != "x86_64-w64-mingw32" ] && [ "$HOST" != "i686-w64-mingw32" ] 77 | then 78 | echo "---> Skipping Make, expat, and Python" 79 | else 80 | echo "---> Make" 81 | mkdir -p make 82 | cp $SRC_DIR/make/COPYING make/COPYING 83 | 84 | echo "---> Expat" 85 | mkdir -p expat 86 | cp $SRC_DIR/expat/COPYING expat/COPYING 87 | 88 | echo "---> Python" 89 | mkdir -p python 90 | cp $BUILD_DIR/python/LICENSE.txt python/LICENSE.txt 91 | fi 92 | 93 | mkdir -p $PREFIX/licenses 94 | cp -r . $PREFIX/licenses 95 | echo "---> Done!" 96 | fi 97 | touch licenses.marker 98 | -------------------------------------------------------------------------------- /scripts/make.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/make/configure --host=$HOST --build=$BUILD --prefix=$PREFIX \ 10 | --enable-job-server \ 11 | --enable-case-insensitive-file-system --program-prefix='mingw32-' \ 12 | CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 13 | > $LOG_DIR/make_configure.log 2>&1 || exit 1 14 | echo "--> Configured" 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> Already built" 21 | else 22 | echo "--> Building" 23 | /usr/bin/make $MAKE_OPTS > $LOG_DIR/make_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> Already installed" 30 | else 31 | echo "--> Installing" 32 | /usr/bin/make $MAKE_OPTS install > $LOG_DIR/make_install.log 2>&1 || exit 1 33 | fi 34 | touch install.marker 35 | -------------------------------------------------------------------------------- /scripts/mingw-w64-crt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/mingw-w64/mingw-w64-crt/configure --host=$TARGET --build=$BUILD --target=$TARGET \ 10 | --prefix=$PREFIX/$TARGET \ 11 | $CRT_CONFIG \ 12 | --enable-wildcard \ 13 | > $LOG_DIR/mingw-w64-crt_configure.log 2>&1 || exit 1 14 | echo "--> Configured" 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> Already built" 21 | else 22 | echo "--> Building" 23 | make $MAKE_OPTS > $LOG_DIR/mingw-w64-crt_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> Already installed" 30 | else 31 | echo "--> Installing" 32 | make $MAKE_OPTS install > $LOG_DIR/mingw-w64-crt_install.log 2>&1 || exit 1 33 | fi 34 | touch install.marker 35 | -------------------------------------------------------------------------------- /scripts/mingw-w64-headers.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/mingw-w64/mingw-w64-headers/configure --host=$TARGET --build=$BUILD --target=$TARGET \ 10 | --prefix=$PREFIX/$TARGET \ 11 | --enable-sdk=all --enable-secure-api \ 12 | > $LOG_DIR/mingw-w64-headers_configure.log 2>&1 || exit 1 13 | echo "--> Configured" 14 | fi 15 | touch configure.marker 16 | 17 | if [ -f install.marker ] 18 | then 19 | echo "--> Already installed" 20 | else 21 | echo "--> Installing" 22 | make $MAKE_OPTS install > $LOG_DIR/mingw-w64-headers_install.log 2>&1 || exit 1 23 | fi 24 | touch install.marker 25 | -------------------------------------------------------------------------------- /scripts/mpc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/mpc/configure --host=$HOST --build=$BUILD --prefix=$PREREQ_INSTALL \ 10 | --disable-shared --enable-static \ 11 | --with-gmp=$PREREQ_INSTALL --with-mpfr=$PREREQ_INSTALL \ 12 | CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 13 | > $LOG_DIR/mpc_configure.log 2>&1 || exit 1 14 | echo "--> Configured" 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> Already built" 21 | else 22 | echo "--> Building" 23 | make $MAKE_OPTS > $LOG_DIR/mpc_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> Already installed" 30 | else 31 | echo "--> Installing" 32 | make $MAKE_OPTS install > $LOG_DIR/mpc_install.log 2>&1 || exit 1 33 | fi 34 | touch install.marker 35 | -------------------------------------------------------------------------------- /scripts/mpfr.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/mpfr/configure --host=$HOST --build=$BUILD --prefix=$PREREQ_INSTALL \ 10 | --disable-shared --enable-static \ 11 | --with-gmp=$PREREQ_INSTALL \ 12 | CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 13 | > $LOG_DIR/mpfr_configure.log 2>&1 || exit 1 14 | echo "--> Configured" 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> Already built" 21 | else 22 | echo "--> Building" 23 | make $MAKE_OPTS > $LOG_DIR/mpfr_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> Already installed" 30 | else 31 | echo "--> Installing" 32 | make $MAKE_OPTS install > $LOG_DIR/mpfr_install.log 2>&1 || exit 1 33 | fi 34 | touch install.marker 35 | -------------------------------------------------------------------------------- /scripts/ppl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/ppl/configure --host=$HOST --build=$BUILD --prefix=$PREREQ_INSTALL \ 10 | --disable-shared --enable-static \ 11 | --with-gmp=$PREREQ_INSTALL \ 12 | CC="$HOST_CC" CXX="$HOST_CXX" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" \ 13 | > $LOG_DIR/ppl_configure.log 2>&1 || exit 1 14 | echo "--> Configured" 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> Already built" 21 | else 22 | echo "--> Building" 23 | make $MAKE_OPTS > $LOG_DIR/ppl_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> Already installed" 30 | else 31 | echo "--> Installing" 32 | make $MAKE_OPTS install > $LOG_DIR/ppl_install.log 2>&1 || exit 1 33 | fi 34 | touch install.marker 35 | -------------------------------------------------------------------------------- /scripts/python.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f install.marker ] 5 | then 6 | echo "--> Already installed" 7 | else 8 | echo "--> Unzipping" 9 | unzip -o $SRC_DIR/python-$HOST.zip -d . > $LOG_DIR/python.log 2>&1 || exit 1 10 | 11 | echo "--> Copying files" 12 | cp bin/python27.dll $PREFIX/bin/python27.dll 13 | mkdir -p $PREFIX/bin/lib 14 | cp -r lib/python27/* $PREFIX/bin/lib 15 | fi 16 | touch install.marker 17 | -------------------------------------------------------------------------------- /scripts/settings.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # build options - for my system only, change if you want/need 5 | export BUILD="x86_64-linux-gnu" 6 | export MAKE_OPTS="-j4" 7 | export HOST_CFLAGS="-O2 -march=nocona -mtune=core2" 8 | if [ "$HOST" = "i686-w64-mingw32" ] || [ "$HOST" = "i686-pc-cygwin" ] 9 | then 10 | HOST_LDFLAGS="$HOST_LDFLAGS -Wl,--large-address-aware" 11 | fi 12 | if [ "$HOST_VENDOR" = "apple" ] 13 | then 14 | HOST_CC="$HOST-gcc --sysroot /home/ruben/darwin/MacOSX10.7.sdk" 15 | HOST_CXX="$HOST-g++ --sysroot /home/ruben/darwin/MacOSX10.7.sdk" 16 | HOST_LDFLAGS="$HOST_LDFLAGS --sysroot /home/ruben/darwin/MacOSX10.7.sdk" 17 | elif [ "$HOST_OS" = "cygwin" ] 18 | then 19 | export HOST_CFLAGS="$HOST_CFLAGS -fomit-frame-pointer -momit-leaf-frame-pointer" 20 | else 21 | export HOST_CFLAGS="$HOST_CFLAGS -fomit-frame-pointer -momit-leaf-frame-pointer" # -fgraphite-identity -floop-interchange -floop-block -floop-parallelize-all" 22 | fi 23 | 24 | case `$HOST-gcc -dumpversion` in 25 | "4.5.?") 26 | if [ "$HOST_OS" != "cygwin" ] 27 | then 28 | export HOST_CFLAGS="$HOST_CFLAGS -fgraphite-identity -floop-interchange -floop-block -floop-parallelize-all" 29 | fi 30 | ;; 31 | "4.6.?") 32 | export HOST_CFLAGS="$HOST_CFLAGS -fgraphite-identity -floop-interchange -floop-block -floop-parallelize-all" 33 | ;; 34 | "4.7.?") 35 | export HOST_CFLAGS="$HOST_CFLAGS -fgraphite-identity -floop-interchange -floop-block -floop-parallelize-all" 36 | ;; 37 | "4.8.?") 38 | export HOST_CFLAGS="$HOST_CFLAGS -fgraphite-identity -floop-interchange -floop-block -floop-parallelize-all" #-flto 39 | export HOST_LDFLAGS="$HOST_LDFLAGS" #-flto 40 | ;; 41 | esac 42 | export HOST_CXXFLAGS="$HOST_CFLAGS" 43 | export TARGET_CFLAGS="$TARGET_CFLAGS -O2 -march=nocona -mtune=core2 -fgraphite-identity -floop-interchange -floop-block -floop-parallelize-all" #-flto 44 | export TARGET_CXXFLAGS="$TARGET_CFLAGS" 45 | export TARGET_LDFLAGS="$TARGET_LDFLAGS" #-flto 46 | 47 | # GCC languages to be built 48 | export GCC_LANGUAGES='c,lto,c++,objc,obj-c++,fortran,java' #go, ada 49 | # extra options to GCC 50 | #if [ "$TARGET_ARCH" = "i686" ] 51 | #then 52 | # EXTRA_OPTIONS="$EXTRA_OPTIONS --enable-libgcj" 53 | #fi 54 | if [ "$SHORT_NAME" = "mingw32-dw2" ] 55 | then 56 | EXTRA_OPTIONS="$EXTRA_OPTIONS --enable-dw2-exceptions --disable-sjlj-exceptions" 57 | elif [ "$SHORT_NAME" = "mingw64" ] 58 | then 59 | EXTRA_OPTIONS=$EXTRA_OPTIONS 60 | else 61 | EXTRA_OPTIONS="$EXTRA_OPTIONS --disable-dw2-exceptions --enable-sjlj-exceptions" 62 | fi 63 | -------------------------------------------------------------------------------- /scripts/updatesources.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # get version info 5 | . ./scripts/versions.sh 6 | 7 | # make and enter source and downloads dir 8 | TOP_DIR=`pwd` 9 | SOURCE_DIR="$TOP_DIR/src" 10 | DOWNLOADS_DIR="$TOP_DIR/downloads" 11 | mkdir -p "$SOURCE_DIR" "$DOWNLOADS_DIR" 12 | cd "$SOURCE_DIR" 13 | 14 | # fixed version downloads 15 | function update() 16 | { 17 | NAME=$1 18 | VERSION=$2 19 | EXTENSION=$3 20 | URL=$4 21 | echo "-> $NAME, version $VERSION" 22 | if [ ! -d "$SOURCE_DIR/$NAME-$VERSION" ] 23 | then 24 | echo "--> Removing old versions" 25 | rm -rf "$SOURCE_DIR/$NAME-*" 26 | echo "--> Downloading version $VERSION" 27 | wget -v "$URL/$NAME-$VERSION$EXTENSION" -O "$DOWNLOADS_DIR/$NAME-$VERSION$EXTENSION" > /dev/null 2>&1 || exit 1 28 | echo "--> Extracting" 29 | tar -xf "$DOWNLOADS_DIR/$NAME-$VERSION$EXTENSION" || exit 1 30 | fi 31 | echo "--> Up to date" 32 | } 33 | 34 | update "libiconv" "$LIBICONV_VERSION" ".tar.gz" "http://ftp.gnu.org/pub/gnu/libiconv" || exit 1 35 | update "expat" "$EXPAT_VERSION" ".tar.gz" "http://downloads.sourceforge.net/project/expat/expat/$EXPAT_VERSION" || exit 1 36 | update "gmp" "$GMP_VERSION" ".tar.bz2" "ftp://ftp.gmplib.org/pub/gmp-$GMP_VERSION" || exit 1 37 | update "mpfr" "$MPFR_VERSION" ".tar.xz" "http://www.mpfr.org/mpfr-$MPFR_VERSION" || exit 1 38 | update "mpc" "$MPC_VERSION" ".tar.gz" "http://www.multiprecision.org/mpc/download" || exit 1 39 | update "ppl" "$PPL_VERSION" ".tar.bz2" "ftp://ftp.cs.unipr.it/pub/ppl/releases/$PPL_VERSION" || exit 1 40 | update "cloog" "$CLOOG_VERSION" ".tar.gz" "http://www.bastoul.net/cloog/pages/download/count.php3?url=." || exit 1 41 | update "make" "$MAKE_VERSION" ".tar.bz2" "http://ftp.gnu.org/gnu/make" || exit 1 42 | 43 | echo "-> Removing temporary downloads" 44 | rm -rf "$DOWNLOADS_DIR" 45 | 46 | # Version control downloads 47 | # release revisions 48 | function gcc_svn_revision() 49 | { 50 | case $1 in 51 | "4.5.1") echo "162774" ;; 52 | "4.5.2") echo "167946" ;; 53 | "4.5.3") echo "173114" ;; 54 | "4.6.0") echo "171513" ;; 55 | "4.6.1") echo "175473" ;; 56 | "4.6.2") echo "184738" ;; 57 | "4.6.3") echo "184738" ;; 58 | "4.7.0") echo "185675" ;; 59 | esac 60 | } 61 | function vc() 62 | { 63 | local NAME=$1 64 | local VC=$2 65 | local URL=$3 66 | echo "-> $NAME, from version control" 67 | if [ ! -d "$SOURCE_DIR/$NAME" ] 68 | then 69 | mkdir "$SOURCE_DIR/$NAME" || exit 1 70 | cd "$SOURCE_DIR/$NAME" 71 | echo "--> Fetching $NAME sources from $VC" 72 | case $VC in 73 | "svn") 74 | svn co "$URL" . > /dev/null 2>&1 || exit 1 75 | ;; 76 | "git") 77 | git clone --depth=1 "$URL" . > /dev/null 2>&1 || exit 1 78 | if [ "$NAME" = "gcc" ] 79 | then 80 | . "$TOP_DIR/scripts/gcc_tag_releases.sh" 81 | fi 82 | ;; 83 | esac 84 | else 85 | cd $SOURCE_DIR/$NAME 86 | echo "--> Updating from $VC" 87 | case $VC in 88 | "svn") 89 | svn up > /dev/null 2>&1 || exit 1 90 | ;; 91 | "git") 92 | git pull > /dev/null 2>&1 || exit 1 93 | ;; 94 | esac 95 | fi 96 | } 97 | 98 | #always trunk 99 | vc "binutils" "git" "git://sourceware.org/git/binutils.git" || exit 1 100 | vc "gdb" "git" "git://sourceware.org/git/gdb.git" || exit 1 101 | 102 | vc "mingw-w64" "svn" "https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64" || exit 1 103 | vc "gcc" "git" "git://gcc.gnu.org/git/gcc.git" || exit 1 104 | vc "LLVM" "svn" "http://llvm.org/svn/llvm-project/llvm/trunk" || exit 1 105 | vc "LLVM/tools/clang" "svn" "http://llvm.org/svn/llvm-project/cfe/trunk" || exit 1 106 | 107 | # patches 108 | #todo 109 | 110 | cd $TOP_DIR 111 | -------------------------------------------------------------------------------- /scripts/versions.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # versions of different packages (prefix RUBENVB to prevent conflict with macros) 5 | export RUBENVB_GCC_VERSION="4.8pre" 6 | export RUBENVB_CLANG_VERSION="3.2pre" 7 | 8 | export RUBENVB_PACKAGE_OPTIONS="--with-pkgversion=rubenvb-$RUBENVB_GCC_VERSION --with-bugurl=mingw-w64-public@lists.sourceforge.net" 9 | -------------------------------------------------------------------------------- /scripts/winpthreads.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ -f configure.marker ] 5 | then 6 | echo "--> Already configured" 7 | else 8 | echo "--> Configuring" 9 | sh $SRC_DIR/winpthreads/configure --host=$TARGET --build=$BUILD \ 10 | --prefix=$PREFIX/$TARGET \ 11 | --enable-shared --enable-static \ 12 | > $LOG_DIR/winpthreads_configure.log 2>&1 || exit 1 13 | fi 14 | touch configure.marker 15 | 16 | if [ -f build.marker ] 17 | then 18 | echo "--> Already built" 19 | else 20 | echo "--> Building" 21 | make $MAKE_OPTS > $LOG_DIR/winpthreads_build.log 2>&1 || exit 1 22 | fi 23 | touch build.marker 24 | 25 | if [ -f install.marker ] 26 | then 27 | echo "--> Already installed" 28 | else 29 | echo "--> Installing" 30 | make $MAKE_OPTS install > $LOG_DIR/winpthreads_install.log 2>&1 || exit 1 31 | # mimic GCC runtime library behavior 32 | if [ "$HOST_OS" = "mingw32" ] 33 | then 34 | mv $PREFIX/$TARGET/bin/libwinpthread-1.dll $PREFIX/bin/libwinpthread-1.dll 35 | else 36 | mv $PREFIX/$TARGET/bin/libwinpthread-1.dll $PREFIX/$TARGET/lib/libwinpthread-1.dll 37 | fi 38 | fi 39 | touch install.marker 40 | -------------------------------------------------------------------------------- /scripts/winpthreads32multi.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | cd $BUILD_DIR/winpthreads32 5 | 6 | if [ -f configure.marker ] 7 | then 8 | echo "--> 32-bit winpthreads already configured" 9 | else 10 | echo "--> Configuring 32-bit build" 11 | sh $SRC_DIR/winpthreads/configure --host=i686-w64-mingw32 --build=$BUILD \ 12 | --prefix=$PREFIX/$TARGET \ 13 | --enable-shared --enable-static \ 14 | > $LOG_DIR/winpthreads32_configure.log 2>&1 || exit 1 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> 32-bit winpthreads already built" 21 | else 22 | echo "--> Building 32-bit winpthreads" 23 | make $MAKE_OPTS > $LOG_DIR/winpthreads32_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> 32-bit winpthreads already installed" 30 | else 31 | echo "--> Installing 32-bit winpthreads" 32 | make $MAKE_OPTS install > $LOG_DIR/winpthreads32_install.log 2>&1 || exit 1 33 | # mimic GCC runtime library behavior 34 | if [ "$HOST" == "i686-w64-mingw32" ] 35 | then 36 | mv $PREFIX/$TARGET/bin/libwinpthread-1.dll $PREFIX/bin/libwinpthread-1.dll 37 | else 38 | mv $PREFIX/$TARGET/bin/libwinpthread-1.dll $PREFIX/$TARGET/lib/libwinpthread-1.dll 39 | fi 40 | fi 41 | touch install.marker 42 | 43 | cd $BUILD_DIR/winpthreads64 44 | 45 | if [ -f configure.marker ] 46 | then 47 | echo "--> 64-bit winpthreads already configured" 48 | else 49 | echo "--> Configuring 64-bit build" 50 | sh $SRC_DIR/winpthreads/configure --host=x86_64-w64-mingw32 --build=$BUILD \ 51 | --prefix=$BUILD_DIR/winpthreads64/install \ 52 | --enable-shared --enable-static \ 53 | > $LOG_DIR/winpthreads64_configure.log 2>&1 || exit 1 54 | fi 55 | touch configure.marker 56 | 57 | if [ -f build.marker ] 58 | then 59 | echo "--> 64-bit winpthreads already built" 60 | else 61 | echo "--> Building 64-bit winpthreads" 62 | make $MAKE_OPTS > $LOG_DIR/winpthreads64_build.log 2>&1 || exit 1 63 | fi 64 | touch build.marker 65 | 66 | if [ -f install.marker ] 67 | then 68 | echo "--> 64-bit winpthreads already installed" 69 | else 70 | echo "--> Installing 64-bit winpthreads" 71 | make $MAKE_OPTS install > $LOG_DIR/winpthreads64_install.log 2>&1 || exit 1 72 | 73 | cp -r $BUILD_DIR/winpthreads64/install/lib/* $PREFIX/$TARGET/lib64/ 74 | cp $BUILD_DIR/winpthreads64/install/bin/libwinpthread-1.dll $PREFIX/$TARGET/lib64/libwinpthread-1.dll 75 | fi 76 | touch install.marker 77 | -------------------------------------------------------------------------------- /scripts/winpthreads64multi.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | cd $BUILD_DIR/winpthreads64 5 | 6 | if [ -f configure.marker ] 7 | then 8 | echo "--> 64-bit winpthreads already configured" 9 | else 10 | echo "--> Configuring 64-bit build" 11 | sh $SRC_DIR/winpthreads/configure --host=x86_64-w64-mingw32 --build=$BUILD \ 12 | --prefix=$PREFIX/$TARGET \ 13 | --enable-shared --enable-static \ 14 | > $LOG_DIR/winpthreads64_configure.log 2>&1 || exit 1 15 | fi 16 | touch configure.marker 17 | 18 | if [ -f build.marker ] 19 | then 20 | echo "--> 64-bit winpthreads already built" 21 | else 22 | echo "--> Building 64-bit winpthreads" 23 | make $MAKE_OPTS > $LOG_DIR/winpthreads64_build.log 2>&1 || exit 1 24 | fi 25 | touch build.marker 26 | 27 | if [ -f install.marker ] 28 | then 29 | echo "--> 64-bit winpthreads already installed" 30 | else 31 | echo "--> Installing 64-bit winpthreads" 32 | make $MAKE_OPTS install > $LOG_DIR/winpthreads64_install.log 2>&1 || exit 1 33 | # mimic GCC runtime library behavior 34 | if [ "$HOST" == "x86_64-w64-mingw32" ] 35 | then 36 | mv $PREFIX/$TARGET/bin/libwinpthread-1.dll $PREFIX/bin/libwinpthread-1.dll 37 | else 38 | mv $PREFIX/$TARGET/bin/libwinpthread-1.dll $PREFIX/$TARGET/lib/libwinpthread-1.dll 39 | fi 40 | fi 41 | touch install.marker 42 | 43 | cd $BUILD_DIR/winpthreads32 44 | 45 | if [ -f configure.marker ] 46 | then 47 | echo "--> 32-bit winpthreads already configured" 48 | else 49 | echo "--> Configuring 32-bit build" 50 | sh $SRC_DIR/winpthreads/configure --host=i686-w64-mingw32 --build=$BUILD \ 51 | --prefix=$BUILD_DIR/winpthreads32/install \ 52 | --enable-shared --enable-static \ 53 | > $LOG_DIR/winpthreads32_configure.log 2>&1 || exit 1 54 | fi 55 | touch configure.marker 56 | 57 | if [ -f build.marker ] 58 | then 59 | echo "--> 32-bit winpthreads already built" 60 | else 61 | echo "--> Building 32-bit winpthreads" 62 | make $MAKE_OPTS > $LOG_DIR/winpthreads32_build.log 2>&1 || exit 1 63 | fi 64 | touch build.marker 65 | 66 | if [ -f install.marker ] 67 | then 68 | echo "--> 32-bit winpthreads already installed" 69 | else 70 | echo "--> Installing 32-bit winpthreads" 71 | make $MAKE_OPTS install > $LOG_DIR/winpthreads32_install.log 2>&1 || exit 1 72 | 73 | cp -r $BUILD_DIR/winpthreads32/install/lib/* $PREFIX/$TARGET/lib32/ 74 | cp $BUILD_DIR/winpthreads32/install/bin/libwinpthread-1.dll $PREFIX/$TARGET/lib32/libwinpthread-1.dll 75 | fi 76 | touch install.marker 77 | -------------------------------------------------------------------------------- /scripts/zipping.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | SRC_FILE=$PACKAGE_DIR/gcc-${RUBENVB_GCC_VERSION}_rubenvb.tar.xz 5 | 6 | case $HOST in 7 | "i686-w64-mingw32") 8 | PLATFORM_SUFFIX="win32" 9 | ;; 10 | "x86_64-w64-mingw32") 11 | PLATFORM_SUFFIX="win64" 12 | ;; 13 | "x86_64-linux-gnu") 14 | PLATFORM_SUFFIX="linux64" 15 | ;; 16 | "i686-linux-gnu") 17 | PLATFORM_SUFFIX="linux32" 18 | ;; 19 | "x86_64-apple-darwin11") 20 | PLATFORM_SUFFIX="mac64" 21 | ;; 22 | "i686-apple-darwin11") 23 | PLATFORM_SUFFIX="mac32" 24 | ;; 25 | "i686-pc-cygwin") 26 | PLATFORM_SUFFIX="cygwin" 27 | ;; 28 | *) 29 | echo "-> unknown host set: $HOST" 30 | ;; 31 | esac 32 | 33 | export XZ_OPT="-9" 34 | SRC_COMPRESS="tar -Jhcf" 35 | if [ "$HOST_OS" = "mingw32" ] 36 | then 37 | BIN_COMPRESS="7za -l -bd -mx9 a" 38 | if [ "$SHORT_NAME" = "mingw32-dw2" ] 39 | then 40 | BIN_FILE=$PACKAGE_DIR/$HOST/$TARGET-gcc-dw2-${RUBENVB_GCC_VERSION}-${PLATFORM_SUFFIX}_rubenvb.7z 41 | else 42 | BIN_FILE=$PACKAGE_DIR/$HOST/$TARGET-gcc-${RUBENVB_GCC_VERSION}-${PLATFORM_SUFFIX}_rubenvb.7z 43 | fi 44 | else 45 | BIN_COMPRESS=$SRC_COMPRESS 46 | if [ "$SHORT_NAME" = "mingw32-dw2" ] 47 | then 48 | BIN_FILE=$PACKAGE_DIR/$HOST/$TARGET-gcc-dw2-${RUBENVB_GCC_VERSION}-${PLATFORM_SUFFIX}_rubenvb.tar.xz 49 | else 50 | BIN_FILE=$PACKAGE_DIR/$HOST/$TARGET-gcc-${RUBENVB_GCC_VERSION}-${PLATFORM_SUFFIX}_rubenvb.tar.xz 51 | fi 52 | fi 53 | 54 | if [ -f $BIN_FILE ] 55 | then 56 | echo "--> Binary file already exists" 57 | else 58 | echo "--> Zipping binaries" 59 | cd $PREFIX/.. 60 | $BIN_COMPRESS $BIN_FILE $SHORT_NAME > $LOG_DIR/zipping.log 61 | fi 62 | 63 | if [ -f $SRC_FILE ] 64 | then 65 | echo "--> Source file already exists" 66 | else 67 | echo "--> Zipping sources" 68 | cd $TOP_DIR 69 | $SRC_COMPRESS $SRC_FILE --exclude='*.git*' --exclude='*.svn*' --exclude='src/LLVM' \ 70 | --exclude='build*clang??.sh' --exclude='scripts/buildclangfromcross.sh' --exclude='scripts/LLVM-Clang.sh' \ 71 | src scripts patches envsetup *.sh 72 | fi 73 | 74 | cd $TOP_DIR 75 | -------------------------------------------------------------------------------- /src/python-i686-w64-mingw32.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubenvb/MinGW-w64-build-scripts/d8ae4e648909f692c5f0405dd81c056fb2801469/src/python-i686-w64-mingw32.zip -------------------------------------------------------------------------------- /src/python-x86_64-w64-mingw32.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubenvb/MinGW-w64-build-scripts/d8ae4e648909f692c5f0405dd81c056fb2801469/src/python-x86_64-w64-mingw32.zip --------------------------------------------------------------------------------