diff --git a/COPYING.TXT b/COPYING.TXT index 80d3d4ae5..df7e1e42d 100644 --- a/COPYING.TXT +++ b/COPYING.TXT @@ -1,9 +1,9 @@ # # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # -# This file is part of 'MinGW-W64' project. -# Copyright (c) 2011,2012,2013,2014 by niXman (i dotty nixman doggy gmail dotty com) -# Copyright (c) 2012,2013,2014 by Alexpux (alexpux doggy gmail dotty com) +# This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) +# Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com) # All rights reserved. # # Project: MinGW-W64 ( http://sourceforge.net/projects/mingw-w64/ ) diff --git a/README b/README.md similarity index 60% rename from README rename to README.md index 18e8c0005..757958b10 100644 --- a/README +++ b/README.md @@ -1,7 +1,9 @@ -The scripts provided by the MinGW-W64 project[1] are designed +The scripts provided by the +[MinGW-W64 project](http://sourceforge.net/projects/mingw-w64/) are designed for building the dual-target(i686/x86_64) MinGW-W64 compiler for i686/x86_64 hosts. -The scripts are distributed under the 'BSD 3' license[2]. +The scripts are distributed under the +['BSD 3' license](http://www.opensource.org/licenses/BSD-3-Clause). In order to use the scripts provided by the MinGW-W64 project it is needed: @@ -11,8 +13,10 @@ In order to use the scripts provided by the MinGW-W64 project it is needed: http://sourceforge.net/projects/msys2/ (MSYS2 wiki: http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/) -3. Get the scripts into '/home//mingw-builds': - "cd && git clone " +3. Get the scripts into '/home//mingw-builds' + ``` + cd && git clone + ``` (see the diff between the 'master' and 'develop' branches, maybe you need the 'develop' branch exactly) @@ -22,56 +26,68 @@ In order to use the scripts provided by the MinGW-W64 project it is needed: environment variable. 6. Go into the MinGW-builds root directory. - "cd && cd mingw-builds" + ``` + cd && cd mingw-builds + ``` 7. Options: - '--mode=[gcc|python|clang]-version' - what package to build with version. - '--arch=' - build architecture. - '--buildroot=' - using '' as build directory. + ``` + `--mode=[gcc|python|clang]-version` - what package to build with version. + `--arch=` - build architecture. + + `--buildroot=` - using '' as build directory. By default used MSYS user home directory. - '--fetch-only' - only download all the sources without start building. - '--update-sources' - try to update sources from repositories before build. - '--exceptions=' - exceptions handling model. + `--fetch-only` - only download all the sources without start building. + `--update-sources` - try to update sources from repositories before build. + `--exceptions=` - exceptions handling model. Available: dwarf, seh(gcc>=4.8.0 only), sjlj. - '--use-lto' - building with using LTO. - '--no-strip' - don't strip executables during install. - '--no-multilib' - build GCC without multilib support (default for DWARF and SEH exception models). - '--static-gcc' - build static GCC. - '--dyn-deps' - build GCC with dynamically dependencies. - '--rt-version=' - version of mingw-w64 runtime to build. - '--rev=N' - number of the build revision. - '--with-testsuite' - run testsuite for packages that contain flags for it. - '--threads=' - used threads model. - '--enable-languages=' - comma separated list(without spaces) of gcc supported languages. + `--use-lto` - building with using LTO. + `--no-strip` - don't strip executables during install. + `--no-multilib` - build GCC without multilib support (default for DWARF and SEH exception models). + `--static-gcc` - build static GCC. + `--dyn-deps` - build GCC with dynamically dependencies. + `--rt-version=` - version of mingw-w64 runtime to build. + `--rev=N` - number of the build revision. + `--with-testsuite` - run testsuite for packages that contain flags for it. + `--threads=` - used threads model. + `--enable-languages=` - comma separated list(without spaces) of gcc supported languages. available languages: ada,c,c++,fortran,objc,obj-c++ - For more options run: "./build --help" - + + ``` + For more options run: `./build --help` + 8. Run: - "./build --mode=gcc-4.8.1 --arch=i686" for building i686-MinGW-w64 - "./build --mode=gcc-4.8.1 --arch=x86_64" for building x86_64-MinGW-w64 - "./build --mode=gcc-4.8.1 --arch=x86_64 --preload" for preload sources and building x86_64-MinGW-w64 - "./build --mode=gcc-4.8.1 --arch=i686 --exceptions=dwarf" for building i686-MinGW-w64 with DWARF exception handling +``` + `./build --mode=gcc-4.8.1 --arch=i686` for building i686-MinGW-w64 + `./build --mode=gcc-4.8.1 --arch=x86_64` for building x86_64-MinGW-w64 + `./build --mode=gcc-4.8.1 --arch=x86_64 --preload` for preload sources and building x86_64-MinGW-w64 + `./build --mode=gcc-4.8.1 --arch=i686 --exceptions=dwarf` for building i686-MinGW-w64 with DWARF exception handling +``` For example, during the process of building of the i686-gcc-4.7.2 will be created the following directories: +``` /i686-4.7.2-release-posix-sjlj-rev1/build /i686-4.7.2-release-posix-sjlj-rev1/libs /i686-4.7.2-release-posix-sjlj-rev1/logs /i686-4.7.2-release-posix-sjlj-rev1/prefix - +``` For x86_64: +``` /x86_64-4.7.2-release-posix-sjlj-rev1/build /x86_64-4.7.2-release-posix-sjlj-rev1/libs /x86_64-4.7.2-release-posix-sjlj-rev1/logs /x86_64-4.7.2-release-posix-sjlj-rev1/prefix - +``` And the sources directory: +``` /mingw-sources - +``` The archives with the built MinGW will be created in '/archives/' At the moment, successfully building the following versions: +``` gcc-4.6.2 gcc-4.6.3 gcc-4.6.4 @@ -94,11 +110,11 @@ At the moment, successfully building the following versions: gcc-4_9-branch (currently 4.9.4 prerelease) gcc-5-branch (currently 5.3.0 prerelease) gcc-trunk (currently 6.0.0 snapshot) +``` Builds also contains patches for building Python 2.7.9 and 3.4.3 versions for support gdb pretty printers. Big thanks for these patches to: +``` 2010-2013 Roumen Petrov, Руслан Ижбулатов 2012-2015 Ray Donnelly, Alexey Pavlov - -[1] http://sourceforge.net/projects/mingw-w64/ -[2] http://www.opensource.org/licenses/BSD-3-Clause +``` diff --git a/build b/build index e52dca8c0..1e3ca1155 100755 --- a/build +++ b/build @@ -3,9 +3,9 @@ # # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # -# This file is part of 'MinGW-W64' project. -# Copyright (c) 2011-2015 by niXman (i dotty nixman doggy gmail dotty com) -# ,by Alexpux (alexpux doggy gmail dotty com) +# This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) +# Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com) # All rights reserved. # # Project: MinGW-W64 ( http://sourceforge.net/projects/mingw-w64/ ) @@ -60,15 +60,16 @@ readonly RUN_ARGS="$@" echo " available: dwarf, seh, sjlj, dwarfseh (picks by architecture)" echo " --use-lto - build with LTO using" echo " --bootstrap - bootstraping GCC" + echo " --bootstrapall - bootstraping GCC & all prerequisites" echo " --no-multilib - build GCC without multilib support" echo " --no-extras - don't build extra packages, only build GCC/clang and the runtime" echo " --no-strip - don't strip dll's & executables on install" echo " --static-gcc - build static GCC" echo " --dyn-deps - build GCC with dynamically dependencies" echo " --jobs=N - specifies number of parallel make threads" - echo " --rt-version=> - specifies mingw-w64 runtime version to build" - echo " v3, v4, trunk specify specific branches in the git repo" - echo " is a specific release version, uses the tarball" + echo " --rt-version= - specifies mingw-w64 runtime version to build" + echo " v3, v4, v5, v6, trunk specifies specific branches in the git repo" + echo " v3.3.0, v4.0.6, v5.0.4, v6.0.0 is a specific release versions, uses the tarball" echo " --rev=N - specifies number of the build revision" echo " --threads= - specifies the threads model for GCC/libstdc++" echo " available: win32, posix" @@ -94,41 +95,57 @@ readonly RUN_ARGS="$@" echo " supported languages. available languages:" echo " ada,c,c++,fortran,objc,obj-c++" echo " --show-subtargets - show list of subtargets for selected '--mode'" + echo " --short-output - reduce output by not printing skipped subtargets" echo " --logviewer-command - use this command for the log viewer" + echo " --no-colors - disable colorized output, useful when logging to a file" + echo " --wait-for-logviewer - wait until after logviewer completes, e.g. for echo" echo " available Python versions: 2, 3" echo " available clang versions: 3.4, git" echo " available gcc versions:" - echo " gcc-4.6.2 (4.6.2 release)" - echo " gcc-4.6.3 (4.6.3 release)" + #echo " gcc-4.6.2 (4.6.2 release)" + #echo " gcc-4.6.3 (4.6.3 release)" echo " gcc-4.6.4 (4.6.4 release)" - #echo " gcc-4.6.5 (4.6.5 release)" - #echo " gcc-4.6.6 (4.6.6 release)" + echo " gcc-4_6-branch (currently 4.6.5-prerelease)" echo " gcc-4.7.0 (4.7.0 release)" echo " gcc-4.7.1 (4.7.1 release)" echo " gcc-4.7.2 (4.7.2 release)" echo " gcc-4.7.3 (4.7.3 release)" - #echo " gcc-4.7.4 (4.7.4 release)" + echo " gcc-4.7.4 (4.7.4 release)" + echo " gcc-4_7-branch (currently 4.7.5-prerelease)" echo " gcc-4.8.0 (4.8.0 release)" echo " gcc-4.8.1 (4.8.1 release)" echo " gcc-4.8.2 (4.8.2 release)" echo " gcc-4.8.3 (4.8.3 release)" echo " gcc-4.8.4 (4.8.4 release)" echo " gcc-4.8.5 (4.8.5 release)" - #echo " gcc-4.8.6 (4.8.6 release)" + echo " gcc-4_8-branch (currently 4.8.6-prerelease)" echo " gcc-4.9.0 (4.9.0 release)" echo " gcc-4.9.1 (4.9.1 release)" echo " gcc-4.9.2 (4.9.2 release)" echo " gcc-4.9.3 (4.9.3 release)" - #echo " gcc-4.9.4 (4.9.4 release)" + echo " gcc-4.9.4 (4.9.4 release)" + echo " gcc-4_9-branch (currently 4.9.5-prerelease)" echo " gcc-5.1.0 (5.1.0 release)" echo " gcc-5.2.0 (5.2.0 release)" echo " gcc-5.3.0 (5.3.0 release)" - echo " gcc-4_6-branch (currently 4.6.5-prerelease)" - echo " gcc-4_7-branch (currently 4.7.4-prerelease)" - echo " gcc-4_8-branch (currently 4.8.6-prerelease)" - echo " gcc-4_9-branch (currently 4.9.4-prerelease)" - echo " gcc-5-branch (currently 5.3.0-prerelease)" - echo " gcc-trunk (currently 6.0.0-snapshot)" + echo " gcc-5.4.0 (5.4.0 release)" + echo " gcc-5.5.0 (5.5.0 release)" + echo " gcc-5-branch (currently 5.6.0-prerelease)" + echo " gcc-6.1.0 (6.1.0 release)" + echo " gcc-6.2.0 (6.2.0 release)" + echo " gcc-6.3.0 (6.3.0 release)" + echo " gcc-6.4.0 (6.4.0 release)" + echo " gcc-6.5.0 (6.5.0 release)" + echo " gcc-6-branch (currently 6.6.0-prerelease)" + echo " gcc-7.1.0 (7.1.0 release)" + echo " gcc-7.2.0 (7.2.0 release)" + echo " gcc-7.3.0 (7.3.0 release)" + echo " gcc-7.4.0 (7.4.0 release)" + echo " gcc-7-branch (currently 7.5.0-prerelease)" + echo " gcc-8.1.0 (8.1.0 release)" + echo " gcc-8.2.0 (8.2.0 release)" + echo " gcc-8-branch (currently 8.3.0-prerelease)" + echo " gcc-trunk (currently 9-snapshot)" exit 0 } @@ -189,6 +206,7 @@ while [[ $# > 0 ]]; do popd > /dev/null ;; --bootstrap) BOOTSTRAPING=yes ;; + --bootstrapall) BOOTSTRAPINGALL=yes ;; --fetch-only) FETCH_MODE=yes ;; --patch-on-fetch) FETCH_MODE=yes; FETCH_PATCH_MODE=yes ;; --update-sources) UPDATE_SOURCES=yes ;; @@ -209,12 +227,12 @@ while [[ $# > 0 ]]; do esac ;; --use-lto) - BASE_CFLAGS="$BASE_CFLAGS -flto -fno-use-linker-plugin" - BASE_CXXFLAGS="$BASE_CXXFLAGS -flto -fno-use-linker-plugin" - BASE_LDFLAGS="$BASE_LDFLAGS -flto -fno-use-linker-plugin" + BASE_CFLAGS="$BASE_CFLAGS -flto -fuse-linker-plugin" + BASE_CXXFLAGS="$BASE_CXXFLAGS -flto -fuse-linker-plugin" + BASE_LDFLAGS="$BASE_LDFLAGS -flto -fuse-linker-plugin" ;; --no-multilib) USE_MULTILIB=no ;; - --no-extras) BUILD_EXTRAS=no ;; + --no-extras) [[ $BUILD_MODE != python ]] && { BUILD_EXTRAS=no; };; --no-strip) STRIP_ON_INSTALL=no ;; --static-gcc) BOOTSTRAPING=yes @@ -239,13 +257,39 @@ while [[ $# > 0 ]]; do RUNTIME_VERSION=${1/--rt-version=/} case $RUNTIME_VERSION in v3) + RUNTIME_VERSION=v3 RUNTIME_BRANCH="v3.x" ;; - v4|trunk) + v4) RUNTIME_VERSION=v4 + RUNTIME_BRANCH="v4.x" + ;; + v5) + RUNTIME_VERSION=v5 + RUNTIME_BRANCH="v5.x" + ;; + v6) + RUNTIME_VERSION=v6 + RUNTIME_BRANCH="v6.x" + ;; + trunk) + RUNTIME_VERSION=v7 RUNTIME_BRANCH="master" ;; - v?.?.?) + v3.3.0) + RUNTIME_VERSION=v3.3.0 + RUNTIME_BRANCH="release" + ;; + v4.0.6) + RUNTIME_VERSION=v4.0.6 + RUNTIME_BRANCH="release" + ;; + v5.0.4) + RUNTIME_VERSION=v5.0.4 + RUNTIME_BRANCH="release" + ;; + v6.0.0) + RUNTIME_VERSION=v6.0.0 RUNTIME_BRANCH="release" ;; *) @@ -274,7 +318,14 @@ while [[ $# > 0 ]]; do --sf-user=*) SF_USER=${1/--sf-user=/} ;; --sf-pass=*) SF_PASSWORD=${1/--sf-pass=/} ;; --debug-upload) DEBUG_UPLOAD=yes ;; + --short-output) SHORT_OUTPUT=yes ;; --logviewer-command=*) LOGVIEWER=${1/--logviewer-command=/} ;; + --no-colors) + COLOR_RESET="" + COLOR_PKG_NAME="" + COLOR_STATUS="" + ;; + --wait-for-logviewer) LOGVIEWER_WAIT=yes ;; *) die "bad command line: \"$1\". terminate." ;; @@ -356,6 +407,11 @@ case $EXCEPTIONS_MODEL in [[ ${BUILD_ARCHITECTURE} == i686 && ${FETCH_MODE} == no ]] && { die "SEH exceptions not allowed on i686 architecture. terminate." } + + [[ ${GCC_NAME} == gcc-4.6* || ${GCC_NAME} == gcc-4.7* ]] && { + die "SEH exceptions supported in 64-bit GCC since version 4.8. terminate." + } + readonly EXCEPTIONS_MODEL_I686=dwarf readonly EXCEPTIONS_MODEL_X86_64=seh ;; @@ -443,6 +499,7 @@ func_install_toolchain \ readonly BUILDS_DIR=$BASE_BUILD_DIR/build readonly LOGS_DIR=$BASE_BUILD_DIR/logs + readonly TESTS_ROOT_DIR=$BUILDS_DIR/tests mkdir -p \ $ARCHIVES_DIR \ @@ -462,8 +519,8 @@ func_install_toolchain \ } readonly COMMON_CFLAGS="$BASE_CFLAGS -I$LIBS_DIR/include -I$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib-$LINK_TYPE_SUFFIX/include -I$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/include" -readonly COMMON_CXXFLAGS="$COMMON_CFLAGS" -readonly COMMON_CPPFLAGS="$BASE_CPPFLAGS" +readonly COMMON_CXXFLAGS="$BASE_CXXFLAGS -I$LIBS_DIR/include -I$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib-$LINK_TYPE_SUFFIX/include -I$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/include" +readonly COMMON_CPPFLAGS="$BASE_CPPFLAGS -I$LIBS_DIR/include -I$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib-$LINK_TYPE_SUFFIX/include -I$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/include" readonly COMMON_LDFLAGS="$BASE_LDFLAGS -L$LIBS_DIR/lib -L$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib-$LINK_TYPE_SUFFIX/lib -L$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/lib" #echo "PROCESSOR_OPTIMIZATION=\"$PROCESSOR_OPTIMIZATION\"" @@ -481,12 +538,18 @@ case $BUILD_ARCHITECTURE in die "gcc is not exists in the \"$i686_HOST_MINGW_PATH/bin\" directory. terminate." } export PATH=$LIBS_DIR/bin:$i686_HOST_MINGW_PATH/bin:$ORIGINAL_PATH + [[ $BOOTSTRAPINGALL == yes && -f $PREFIX/bin/gcc ]] && { + export PATH=$PREFIX/bin:$LIBS_DIR/bin:$ORIGINAL_PATH + } ;; x86_64) [[ ! -f $x86_64_HOST_MINGW_PATH/bin/gcc ]] && { die "gcc is not exists in the \"$x86_64_HOST_MINGW_PATH/bin\" directory. terminate." } export PATH=$LIBS_DIR/bin:$x86_64_HOST_MINGW_PATH/bin:$ORIGINAL_PATH + [[ $BOOTSTRAPINGALL == yes && -f $PREFIX/bin/gcc ]] && { + export PATH=$PREFIX/bin:$LIBS_DIR/bin:$ORIGINAL_PATH + } ;; esac @@ -550,18 +613,24 @@ for rule in ${SUBTARGETS[@]}; do rule_arr=( ${rule//|/ } ) sub=${rule_arr[0]} PKG_ARCHITECTURE=${rule_arr[1]} + [[ -z $PKG_ARCHITECTURE ]] && { PKG_ARCHITECTURE=$BUILD_ARCHITECTURE - echo -e "-> \E[32;40m$sub\E[37;40m" + PKG_DISPLAY_NAME=$sub } || { - echo -e "-> \E[32;40m$sub-$PKG_ARCHITECTURE\E[37;40m" + PKG_DISPLAY_NAME=$sub-$PKG_ARCHITECTURE } [[ ! -f $TOP_DIR/scripts/$sub.sh ]] && { die "script for subtarget \"$sub\" is not exists. terminate." } [[ $FETCH_MODE == yes ]] && { - [[ -z $( grep 'PKG_URLS=' $TOP_DIR/scripts/${sub}.sh ) ]] && continue + [[ -z $( grep 'PKG_URLS=' $TOP_DIR/scripts/${sub}.sh ) ]] && { + [[ $SHORT_OUTPUT != "yes" ]] && { + echo -e "-> ${COLOR_PKG_NAME}$PKG_DISPLAY_NAME${COLOR_RESET}" + } + continue + } } [[ "$PKG_ARCHITECTURE" == "$REVERSE_ARCHITECTURE" ]] && { @@ -569,12 +638,21 @@ for rule in ${SUBTARGETS[@]}; do } source $TOP_DIR/scripts/$sub.sh - - [[ -z $PKG_NAME ]] && continue + + [[ -z $PKG_NAME ]] && { + echo -e "-> ${COLOR_PKG_NAME}$PKG_DISPLAY_NAME${COLOR_RESET}" + continue + } + [[ ($BUILD_EXTRAS == "no") && ($PKG_PRIORITY == "extra") ]] && { - echo -e "--> Skipping" + [[ $SHORT_OUTPUT != "yes" ]] && { + echo -e "-> ${COLOR_PKG_NAME}$PKG_DISPLAY_NAME${COLOR_RESET}" + echo "--> Skipping" + } continue } + + echo -e "-> ${COLOR_PKG_NAME}$PKG_DISPLAY_NAME${COLOR_RESET}" case $PKG_PRIORITY in prereq|runtime) @@ -596,7 +674,7 @@ for rule in ${SUBTARGETS[@]}; do INSTALL_LOG=$CURR_LOGS_DIR/$PKG_NAME/install.log TESTSUITE_LOG=$CURR_LOGS_DIR/$PKG_NAME/testsuite.log - [[ $PKG_TYPE != git && $PKG_TYPE != svn ]] && { + [[ -n $PKG_URLS && $PKG_TYPE != git && $PKG_TYPE != svn ]] && { mkdir -p $SRCS_DIR/$PKG_DIR_NAME } [[ $FETCH_MODE == no ]] && { @@ -688,6 +766,21 @@ for rule in ${SUBTARGETS[@]}; do $PKG_SUBDIR_NAME } + [[ $PKG_RUN_TESTSUITE == yes ]] && { + [[ ${#PKG_TESTSUITE_FLAGS[@]} >0 ]] && { + testsuite_flags="$PKG_MAKE_PROG ${PKG_TESTSUITE_FLAGS[@]}" + func_make \ + $PKG_NAME \ + $PKG_DIR_NAME \ + "$testsuite_flags" \ + $TESTSUITE_LOG \ + "run testsuite..." \ + "tested" \ + $CURR_BUILD_DIR \ + $PKG_SUBDIR_NAME + } + } + [[ ${#PKG_INSTALL_FLAGS[@]} >0 ]] && { install_flags="$PKG_MAKE_PROG ${PKG_INSTALL_FLAGS[@]}" func_make \ @@ -709,20 +802,21 @@ for rule in ${SUBTARGETS[@]}; do "after_install" \ PKG_EXECUTE_AFTER_INSTALL[@] } - - [[ $PKG_RUN_TESTSUITE == yes ]] && { - [[ ${#PKG_TESTSUITE_FLAGS[@]} >0 ]] && { - testsuite_flags="$PKG_MAKE_PROG ${PKG_TESTSUITE_FLAGS[@]}" - func_make \ - $PKG_NAME \ - $PKG_DIR_NAME \ - "$testsuite_flags" \ - $TESTSUITE_LOG \ - "run testsuite..." \ - "tested" \ - $CURR_BUILD_DIR \ - $PKG_SUBDIR_NAME + + [[ ${#PKG_TESTS[@]} >0 ]] && { + mkdir -p $TESTS_ROOT_DIR/$BUILD_ARCHITECTURE + [[ $USE_MULTILIB == yes ]] && { + _reverse_arch=$(func_get_reverse_arch $BUILD_ARCHITECTURE) + _reverse_bits=$(func_get_reverse_arch_bit $BUILD_ARCHITECTURE) + mkdir -p $TESTS_ROOT_DIR/${_reverse_arch} + [[ $BUILD_SHARED_GCC == yes ]] && { + cp -f $( find $PREFIX/$TARGET/lib${_reverse_bits} -type f \( -iname *.dll \) ) \ + $TESTS_ROOT_DIR/${_reverse_arch}/ + } } + for test in "${!PKG_TESTS[@]}"; do + func_test $test ${PKG_TESTS[$test]} $TESTS_ROOT_DIR + done } } @@ -743,7 +837,7 @@ func_clear_env # *************************************************************************** [[ $COMPRESSING_SRCS == yes ]] && { - echo -e "-> \E[32;40mcompress mingw sources\E[37;40m" + echo -e "-> ${COLOR_STATUS}compress mingw sources${COLOR_RESET}" source $TOP_DIR/scripts/srcs-compress.sh } @@ -773,7 +867,7 @@ func_clear_env $EXCEPTIONS_MODEL \ ) mingw_archive_size=$(du -h $mingw_archive_name | cut -f 1) - echo -e -n "-> \E[32;40mupload $(basename $mingw_archive_name) ($mingw_archive_size) ...\E[37;40m" + echo -e -n "-> ${COLOR_STATUS}upload $(basename $mingw_archive_name) ($mingw_archive_size) ...${COLOR_RESET}" [[ $DEBUG_UPLOAD == yes ]] && { echo "bin_cmd:${upload_cmd}" } || { @@ -789,7 +883,7 @@ func_clear_env } [[ $(func_map_gcc_name_to_gcc_type $GCC_NAME) == release ]] && { - echo -e -n "--> \E[32;40mdownload repository file...\E[37;40m" + echo -e -n "--> ${COLOR_STATUS}download repository file...${COLOR_RESET}" [[ $DEBUG_UPLOAD == yes ]] && { echo "rep_cmd:wget "$REPOSITORY_FILE" -O $TMP/$(basename "$REPOSITORY_FILE")" func_res=0 @@ -804,7 +898,7 @@ func_clear_env echo " done" } - echo -e -n "--> \E[32;40mupdate repository file...\E[37;40m" + echo -e -n "--> ${COLOR_STATUS}update repository file...${COLOR_RESET}" [[ $DEBUG_UPLOAD == no ]] && { func_update_repository_file \ $TMP/$(basename "$REPOSITORY_FILE") \ @@ -830,7 +924,7 @@ func_clear_env $SF_USER \ $SF_PASSWORD \ ) - echo -e -n "--> \E[32;40mupload repository file...\E[37;40m" + echo -e -n "--> ${COLOR_STATUS}upload repository file...${COLOR_RESET}" [[ $DEBUG_UPLOAD == yes ]] && { echo "rep_cmd:${upload_cmd}" } || { @@ -863,7 +957,7 @@ func_clear_env $sources_archive_name \ ) sources_archive_size=$(du -h $sources_archive_name | cut -f 1) - echo -e -n "-> \E[32;40mupload $(basename $sources_archive_name) ($sources_archive_size) ...\E[37;40m" + echo -e -n "-> ${COLOR_STATUS}upload $(basename $sources_archive_name) ($sources_archive_size) ...${COLOR_RESET}" [[ $DEBUG_UPLOAD == yes ]] && { echo "src_cmd:${upload_cmd}" } || { diff --git a/buildall b/buildall old mode 100644 new mode 100755 index e60c4979e..90c1433f5 --- a/buildall +++ b/buildall @@ -13,7 +13,7 @@ shift VERNUM=$(echo $GCC_NAME | sed 's|gcc-||;s|\.||g') [[ $VERNUM == trunk ]] && { - VERNUM=600 + VERNUM=800 } BUILDROOT=/c/mingw${VERNUM} diff --git a/clean b/clean new file mode 100755 index 000000000..b1ba98f7d --- /dev/null +++ b/clean @@ -0,0 +1,160 @@ +#!/bin/bash + +# +# The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause +# +# This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) +# Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com) +# All rights reserved. +# +# Project: MinGW-W64 ( http://sourceforge.net/projects/mingw-w64/ ) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the distribution. +# - Neither the name of the 'MinGW-W64' nor the names of its contributors may +# be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# ************************************************************************** + +CLEAN_INSTALLED=no +CLEAN_RUNTIME=no +CLEAN_PREREQS=no +CLEAN_EXTRACTED_SOURCES=no +CLEAN_ARCHIVES=no +CLEAN_ALL_SOURCES=no +PRINT_VERBOSE_ARG= + +# ************************************************************************** + +[[ $# == 1 && $1 == --help || $[ $# == 0 ] == 1 ]] && { + echo "usage:" + echo " ./${0##*/} [OPTIONS]" + echo " help:" + echo " --buildroot= - specifies the build root directory" + echo " --installed - cleans the prerequisite installs" + echo " --sources - deletes the extracted sources" + echo " --archives - cleans the archives directory" + echo " --generated - cleans everything except the compressed sources" + echo " --full - remove the buildroot folder itself" + + exit 0 +} + +# ************************************************************************** + +while [[ $# > 0 ]]; do + case $1 in + --buildroot=*) + ROOT_DIR=${1/--buildroot=/} + ROOT_DIR=${ROOT_DIR//:/:\/} + ROOT_DIR=${ROOT_DIR//\/\//\/} + mkdir -p ${ROOT_DIR} || die "incorrect buildroot directory: \"${ROOT_DIR}\". terminate." + pushd ${ROOT_DIR} > /dev/null + ROOT_DIR=$PWD + popd > /dev/null + ;; + --installed) CLEAN_INSTALLED=yes ;; + --prereqs) CLEAN_PREREQS=yes ;; + --sources) CLEAN_EXTRACTED_SOURCES=yes ;; + --archives) CLEAN_ARCHIVES=yes ;; + --generated) + CLEAN_OUTPUT=yes + CLEAN_INSTALLED=yes + CLEAN_RUNTIME=yes + CLEAN_PREREQS=yes + CLEAN_EXTRACTED_SOURCES=yes + CLEAN_ARCHIVES=yes + ;; + --full) + CLEAN_OUTPUT=yes + CLEAN_INSTALLED=yes + CLEAN_RUNTIME=yes + CLEAN_PREREQS=yes + CLEAN_ALL_SOURCES=yes + CLEAN_ARCHIVES=yes + ;; + --verbose) + PRINT_VERBOSE_ARG=-print + ;; + *) + >&2 echo "bad command line: \"$1\". terminate." + exit 1 + ;; + esac + shift +done + +# ************************************************************************** + +readonly PREREQ_DIR=$ROOT_DIR/prerequisites +readonly RUNTIME_DIR=$ROOT_DIR/runtime +readonly ARCHIVES_DIR=$ROOT_DIR/archives +readonly PREREQ_BUILD_DIR=$ROOT_DIR/prerequisites-build +readonly PREREQ_LOGS_DIR=$ROOT_DIR/prerequisites-logs +readonly SRCS_DIR=$ROOT_DIR/src +readonly MARKERS_DIR=$SRCS_DIR/MARKERS + +# ************************************************************************** + +[[ $CLEAN_OUTPUT == "yes" ]] && { + echo "Deleting main output directories" + + find $ROOT_DIR -mindepth 1 -maxdepth 1 -type d -name i686* $PRINT_VERBOSE_ARG -exec rm -rf {} \; + find $ROOT_DIR -mindepth 1 -maxdepth 1 -type d -name x86_64* $PRINT_VERBOSE_ARG -exec rm -rf {} \; +} + +[[ $CLEAN_RUNTIME == "yes" ]] && { + echo "Deleting runtime directory" + rm -Rf $RUNTIME_DIR +} + +[[ $CLEAN_INSTALLED == "yes" ]] && { + echo "Deleting _installed.marker files" + [[ -d $PREREQ_BUILD_DIR ]] && { + find $PREREQ_BUILD_DIR -name _installed.marker $PRINT_VERBOSE_ARG -delete + } + + echo "Deleting prerequisites install directory" + rm -Rf $PREREQ_DIR +} + +[[ $CLEAN_PREREQS == "yes" ]] && { + echo "Deleting the prereq build and log directories" + rm -Rf $PREREQ_BUILD_DIR + rm -Rf $PREREQ_LOGS_DIR +} + +[[ $CLEAN_EXTRACTED_SOURCES == "yes" ]] && { + echo "Deleting extracted source directories" + find $SRCS_DIR -mindepth 1 -maxdepth 1 -type d ! -name MARKERS ! -name mingw-w64 ! -name "gcc-*-branch" ! -name gcc-trunk $PRINT_VERBOSE_ARG -exec rm -rf {} \; +} + +[[ $CLEAN_ALL_SOURCES == "yes" ]] && { + echo "Deleting entire src directory" + rm -Rf $SRCS_DIR +} + +[[ $CLEAN_ARCHIVES == "yes" ]] && { + echo "Deleting archives folder" + rm -Rf $ARCHIVES_DIR +} diff --git a/codestyle.txt b/codestyle.txt index 76262a08d..0a74902e8 100644 --- a/codestyle.txt +++ b/codestyle.txt @@ -1,4 +1,4 @@ -1. As indentation TAB is used. +1. As indentation four spaces is used. 2. Global variables should mainly consist of uppercase characters. 3. Global variables that should not be changed, should be defined with the 'readonly' keyword. 4. Functions are defined using the 'function' keyword. diff --git a/library/config-nix.sh b/library/config-nix.sh index 184fad4dc..465cfa776 100644 --- a/library/config-nix.sh +++ b/library/config-nix.sh @@ -3,8 +3,8 @@ # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # # This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. -# Copyright (c) 2011-2015 by niXman (i dotty nixman doggy gmail dotty com) -# ,by Alexpux (alexpux doggy gmail dotty com) +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) +# Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com) # All rights reserved. # # Project: MinGW-W64 ( http://sourceforge.net/projects/mingw-w64/ ) @@ -44,7 +44,6 @@ HOST=$(gcc -dumpmachine) BUILD=$(gcc -dumpmachine) TARGET=$BUILD_ARCHITECTURE-w64-mingw32 -readonly HOST_TOOLS="" readonly CROSS_BUILDS=yes readonly PKG_RUN_TESTSUITE=no diff --git a/library/config-osx.sh b/library/config-osx.sh index 656db1063..eac64c5e6 100644 --- a/library/config-osx.sh +++ b/library/config-osx.sh @@ -3,8 +3,8 @@ # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # # This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. -# Copyright (c) 2011-2015 by niXman (i dotty nixman doggy gmail dotty com) -# ,by Alexpux (alexpux doggy gmail dotty com) +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) +# Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com) # All rights reserved. # # Project: MinGW-W64 ( http://sourceforge.net/projects/mingw-w64/ ) @@ -44,7 +44,6 @@ HOST=$(gcc -dumpmachine) BUILD=$(gcc -dumpmachine) TARGET=$BUILD_ARCHITECTURE-w64-mingw32 -readonly HOST_TOOLS="" readonly CROSS_BUILDS=yes readonly PKG_RUN_TESTSUITE=no diff --git a/library/config-win.sh b/library/config-win.sh index 49576901e..87c38db67 100644 --- a/library/config-win.sh +++ b/library/config-win.sh @@ -3,8 +3,8 @@ # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # # This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. -# Copyright (c) 2011-2015 by niXman (i dotty nixman doggy gmail dotty com) -# ,by Alexpux (alexpux doggy gmail dotty com) +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) +# Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com) # All rights reserved. # # Project: MinGW-W64 ( http://sourceforge.net/projects/mingw-w64/ ) @@ -35,9 +35,11 @@ # ************************************************************************** -readonly HOST_MINGW_VERSION=4.9.3 -readonly i686_HOST_MINGW_PATH_URL="http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/$HOST_MINGW_VERSION/threads-posix/{exceptions}/i686-$HOST_MINGW_VERSION-release-posix-{exceptions}-rt_v4-rev0.7z" -readonly x86_64_HOST_MINGW_PATH_URL="http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/$HOST_MINGW_VERSION/threads-posix/{exceptions}/x86_64-$HOST_MINGW_VERSION-release-posix-{exceptions}-rt_v4-rev0.7z" +readonly HOST_MINGW_VERSION=7.2.0 +readonly HOST_MINGW_RT_VERSION=5 +readonly HOST_MINGW_BUILD_REV=1 +readonly i686_HOST_MINGW_PATH_URL="https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/$HOST_MINGW_VERSION/threads-posix/{exceptions}/i686-$HOST_MINGW_VERSION-release-posix-{exceptions}-rt_v$HOST_MINGW_RT_VERSION-rev$HOST_MINGW_BUILD_REV.7z" +readonly x86_64_HOST_MINGW_PATH_URL="https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/$HOST_MINGW_VERSION/threads-posix/{exceptions}/x86_64-$HOST_MINGW_VERSION-release-posix-{exceptions}-rt_v$HOST_MINGW_RT_VERSION-rev$HOST_MINGW_BUILD_REV.7z" # ************************************************************************** @@ -45,7 +47,6 @@ function func_get_host { echo "$1-w64-mingw32"; } function func_get_build { echo "$1-w64-mingw32"; } function func_get_target { echo "$1-w64-mingw32"; } -readonly HOST_TOOLS="" readonly CROSS_BUILDS=no # ************************************************************************** @@ -95,12 +96,15 @@ function func_test_installed_packages { wget sshpass texinfo + autogen + dejagnu ) local not_installed_packages=() for it in ${required_packages[@]}; do - [[ -z $(pacman -Qs ^$it) ]] && { + $(pacman -Qs ^$it > /dev/null 2>&1) + [[ $? != 0 ]] && { not_installed_packages=(${not_installed_packages[@]} $it) } done diff --git a/library/config.sh b/library/config.sh index 2ff740644..df54789d2 100644 --- a/library/config.sh +++ b/library/config.sh @@ -3,8 +3,8 @@ # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # # This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. -# Copyright (c) 2011-2015 by niXman (i dotty nixman doggy gmail dotty com) -# ,by Alexpux (alexpux doggy gmail dotty com) +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) +# Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com) # All rights reserved. # # Project: MinGW-W64 ( http://sourceforge.net/projects/mingw-w64/ ) @@ -35,12 +35,12 @@ # ************************************************************************** -MINGW_W64_BUILDS_VERSION="MinGW-W64-builds-4.2.0" -MINGW_W64_PKG_STRING="Built by MinGW-W64 project" +MINGW_W64_BUILDS_VERSION="MinGW-W64-builds-4.3.4" +MINGW_W64_PKG_STRING="Built by MinGW-W64 - mingwpy build" # ************************************************************************** -PROJECT_ROOT_URL=http://sourceforge.net/projects/mingw-w64 +PROJECT_ROOT_URL=https://sourceforge.net/projects/mingw-w64 BUG_URL=$PROJECT_ROOT_URL PROJECT_FS_ROOT_DIR=/home/frs/project/mingw-w64 @@ -52,6 +52,17 @@ export LC_ALL=en_US.UTF-8 # ************************************************************************** +# Colors for some of the output lines +readonly COLOR_NONE="\E[0m" +readonly COLOR_GREEN="\E[32m" +readonly COLOR_BLUE="\E[34m" + +COLOR_RESET=$COLOR_NONE +COLOR_PKG_NAME=$COLOR_GREEN +COLOR_STATUS=$COLOR_BLUE + +# ************************************************************************** + readonly PATCHES_DIR=$TOP_DIR/patches readonly SOURCES_DIR=$TOP_DIR/sources readonly TESTS_DIR=$TOP_DIR/tests @@ -64,10 +75,10 @@ ROOT_DIR= # ************************************************************************** -BASE_CFLAGS="-O2 -pipe" +BASE_CFLAGS="-O2 -pipe -fno-ident" BASE_CXXFLAGS="$BASE_CFLAGS" BASE_CPPFLAGS="" -BASE_LDFLAGS="-pipe" +BASE_LDFLAGS="-pipe -fno-ident" PROCESSOR_OPTIMIZATION_TUNE_32='generic' PROCESSOR_OPTIMIZATION_ARCH_32='i686' @@ -88,10 +99,10 @@ SHOW_LOG_ON_ERROR=yes JOBS=1 -RUNTIME_VERSION=v4 +RUNTIME_VERSION=v5 RUNTIME_BRANCH="master" -CLANG_GCC_VERSION=gcc-4.9.1 +CLANG_GCC_VERSION=gcc-4.9.3 # ************************************************************************** @@ -102,6 +113,7 @@ EXCEPTIONS_MODEL=sjlj USE_MULTILIB=yes STRIP_ON_INSTALL=yes BOOTSTRAPING=no +BOOTSTRAPINGALL=no THREADS_MODEL=posix REV_NUM= COMPRESSING_BINS=no @@ -119,6 +131,7 @@ BUILD_MODE_VERSION= BUILD_VERSION= BUILD_EXTRAS=yes GCC_NAME= +SHORT_OUTPUT=no DEFAULT_PYTHON_VERSION=2 @@ -181,6 +194,7 @@ echo "done" # ************************************************************************** LOGVIEWER= +LOGVIEWER_WAIT=no func_find_logviewer \ LOGVIEWERS[@] \ diff --git a/library/functions.sh b/library/functions.sh index 9f66d819c..e4825e2e9 100644 --- a/library/functions.sh +++ b/library/functions.sh @@ -3,8 +3,8 @@ # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # # This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. -# Copyright (c) 2011-2015 by niXman (i dotty nixman doggy gmail dotty com) -# ,by Alexpux (alexpux doggy gmail dotty com) +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) +# Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com) # All rights reserved. # # Project: MinGW-W64 ( http://sourceforge.net/projects/mingw-w64/ ) @@ -38,6 +38,7 @@ function func_clear_env { unset PKG_ARCHITECTURE unset PKG_NAME + unset PKG_DISPLAY_NAME unset PKG_VERSION unset PKG_DIR_NAME unset PKG_SUBDIR_NAME @@ -59,6 +60,9 @@ function func_clear_env { unset PKG_CONFIGURE_SCRIPT unset PKG_MAKE_PROG unset PKG_CONFIGURE_PROG + + unset CDPATH + unset PYTHONHOME } function switch_to_reverse_arch { @@ -95,13 +99,20 @@ function die { # $2 - exit code local _retcode=1 [[ -n $2 ]] && _retcode=$2 - echo $1 + echo + >&2 echo $1 exit $_retcode } function func_show_log { # $1 - log file - [[ $SHOW_LOG_ON_ERROR == yes ]] && $LOGVIEWER $1 & + [[ $SHOW_LOG_ON_ERROR == yes ]] && { + [[ $LOGVIEWER_WAIT == yes ]] && { + $LOGVIEWER $1 + } || { + $LOGVIEWER $1 & + } + } } # ************************************************************************** @@ -297,7 +308,7 @@ function func_download { local -a _list=( "${!1}" ) [[ ${#_list[@]} == 0 ]] && { - echo "--> Doesn't need to download." + [[ $SHORT_OUTPUT != "yes" ]] && echo "--> Doesn't need to download" return 0 } @@ -375,6 +386,8 @@ function func_download { [[ -d $_lib_name/.svn ]] && { pushd $_lib_name > /dev/null svn-clean -f > $_log_name 2>&1 + svn cleanup >> $_log_name 2>&1 + svn status | rm -rf $(awk '/^?/{$1 = ""; print $0}') >> $_log_name 2>&1 svn revert -R ./ >> $_log_name 2>&1 [[ -n $_rev ]] && { svn up -r $_rev >> $_log_name 2>&1 @@ -436,7 +449,7 @@ function func_download { die " error $_result" $_result } } || { - echo "---> $_filename downloaded" + [[ $SHORT_OUTPUT != "yes" ]] && echo "---> $_filename downloaded" } done } @@ -450,7 +463,7 @@ function func_uncompress { local -a _list=( "${!1}" ) local it= [[ ${#_list[@]} == 0 ]] && { - echo "--> Unpack doesn't need." + [[ $SHORT_OUTPUT != "yes" ]] && echo "--> Unpack doesn't need" return 0 } @@ -512,7 +525,7 @@ function func_uncompress { die " error $_result" $_result } } || { - echo "---> $_filename unpacked" + [[ $SHORT_OUTPUT != "yes" ]] && echo "---> $_filename unpacked" } } done @@ -536,7 +549,7 @@ function func_execute { ((_index=${#_commands[@]}-1)) local _cmd_marker_name=$1/$2/exec-$4-$_index.marker [[ -f $_cmd_marker_name ]] && { - echo "---> $4 executed" + [[ $SHORT_OUTPUT != "yes" ]] && echo "---> $4 executed" return $_result } _index=0 @@ -591,7 +604,7 @@ function func_apply_patches { ((_index=${#_list[@]}-1)) [[ -f $1/$2/_patch-$_index.marker ]] && { - echo "---> patched" + [[ $SHORT_OUTPUT != "yes" ]] && echo "---> patched" return 0 } _index=0 @@ -693,7 +706,7 @@ function func_configure { die " error!" $_result } } || { - echo "---> configured" + [[ $SHORT_OUTPUT != "yes" ]] && echo "---> configured" } } @@ -731,7 +744,7 @@ function func_make { die " error!" $_result } } || { - echo "---> $6" + [[ $SHORT_OUTPUT != "yes" ]] && echo "---> $6" } } @@ -846,7 +859,7 @@ function func_abstract_toolchain { local -a _url=( "$2|root:$1" ) local _filename=$(basename $2) - echo -e "-> \E[32;40m$4 toolchain\E[37;40m" + echo -e "-> ${COLOR_STATUS}$4 toolchain${COLOR_RESET}" [[ ! -f $1/${_filename}-unpack.marker ]] && { [[ -d $3 ]] && { echo "--> Found previously installed $4 toolchain." @@ -861,7 +874,7 @@ function func_abstract_toolchain { func_download _url[@] func_uncompress _url[@] $1 } || { - echo "--> Toolchain installed." + [[ $SHORT_OUTPUT != "yes" ]] && echo "--> Toolchain installed." } } @@ -913,13 +926,16 @@ function func_map_gcc_name_to_gcc_version { # $1 - gcc name case $1 in - gcc-?.?.?) echo "${1/gcc-/}" ;; + gcc-?.?.?) echo "${1/gcc-/}" ;; gcc-4_6-branch) echo "4.6.5" ;; - gcc-4_7-branch) echo "4.7.4" ;; + gcc-4_7-branch) echo "4.7.5" ;; gcc-4_8-branch) echo "4.8.6" ;; - gcc-4_9-branch) echo "4.9.3" ;; - gcc-5-branch) echo "5.3.0" ;; - gcc-trunk) echo "6.0.0" ;; + gcc-4_9-branch) echo "4.9.5" ;; + gcc-5-branch) echo "5.6.0" ;; + gcc-6-branch) echo "6.5.0" ;; + gcc-7-branch) echo "7.4.0" ;; + gcc-8-branch) echo "8.3.0" ;; + gcc-trunk) echo "9.0.0" ;; *) die "gcc name error: $1. terminate." ;; esac } diff --git a/library/subtargets.sh b/library/subtargets.sh index 22c469fcd..4444224ea 100644 --- a/library/subtargets.sh +++ b/library/subtargets.sh @@ -3,8 +3,8 @@ # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # # This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. -# Copyright (c) 2011-2015 by niXman (i dotty nixman doggy gmail dotty com) -# ,by Alexpux (alexpux doggy gmail dotty com) +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) +# Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com) # All rights reserved. # # Project: MinGW-W64 ( http://sourceforge.net/projects/mingw-w64/ ) @@ -82,33 +82,48 @@ function func_get_subtargets { termcap libffi expat + ncurses + readline gdbm tcl tk openssl $([[ $python_version == 3 ]] && echo xz-utils) sqlite - ncurses - readline python-$python_version ) + local readonly BOOTSTRAP_SUBTARGETS=( + bootstrap + ${SUBTARGETS_PART1[@]} + mingw-w64-runtime-post + binutils + binutils-post + $GCC_NAME + gcc-post + ) + local readonly SUBTARGETS_PART2=( mingw-w64-runtime-post binutils binutils-post $GCC_NAME gcc-post + $( \ + [[ $BOOTSTRAPINGALL == yes ]] && { \ + echo ${BOOTSTRAP_SUBTARGETS[@]}; \ + } \ + ) mingw-w64-libraries-libmangle #mingw-w64-libraries-pseh mingw-w64-tools-gendef mingw-w64-tools-genidl mingw-w64-tools-genpeimg mingw-w64-tools-widl - ${PYTHON_SUBTARGETS[@]} - gdbinit - gdb - gdb-wrapper + #${PYTHON_SUBTARGETS[@]} + #gdbinit + #gdb + #gdb-wrapper make 3rdparty-post cleanup @@ -134,7 +149,7 @@ function func_get_subtargets { python) local readonly SUBTARGETS=( zlib - ${PYTHON_SUBTARGETS[@]} + #${PYTHON_SUBTARGETS[@]} 3rdparty-post cleanup licenses diff --git a/licenses/binutils/COPYING b/licenses/binutils/COPYING old mode 100755 new mode 100644 diff --git a/licenses/binutils/COPYING.LIB b/licenses/binutils/COPYING.LIB old mode 100755 new mode 100644 diff --git a/licenses/binutils/COPYING.LIBGLOSS b/licenses/binutils/COPYING.LIBGLOSS old mode 100755 new mode 100644 diff --git a/licenses/binutils/COPYING.NEWLIB b/licenses/binutils/COPYING.NEWLIB old mode 100755 new mode 100644 diff --git a/licenses/binutils/COPYING3 b/licenses/binutils/COPYING3 old mode 100755 new mode 100644 diff --git a/licenses/binutils/COPYING3.LIB b/licenses/binutils/COPYING3.LIB old mode 100755 new mode 100644 diff --git a/licenses/cloog/license.txt b/licenses/cloog/license.txt old mode 100755 new mode 100644 diff --git a/licenses/expat/COPYING b/licenses/expat/COPYING old mode 100755 new mode 100644 diff --git a/licenses/gcc/COPYING b/licenses/gcc/COPYING old mode 100755 new mode 100644 diff --git a/licenses/gcc/COPYING.LIB b/licenses/gcc/COPYING.LIB old mode 100755 new mode 100644 diff --git a/licenses/gcc/COPYING.RUNTIME b/licenses/gcc/COPYING.RUNTIME old mode 100755 new mode 100644 diff --git a/licenses/gcc/COPYING3 b/licenses/gcc/COPYING3 old mode 100755 new mode 100644 diff --git a/licenses/gcc/COPYING3.LIB b/licenses/gcc/COPYING3.LIB old mode 100755 new mode 100644 diff --git a/licenses/gdb/COPYING b/licenses/gdb/COPYING old mode 100755 new mode 100644 diff --git a/licenses/gdb/COPYING.LIB b/licenses/gdb/COPYING.LIB old mode 100755 new mode 100644 diff --git a/licenses/gdb/COPYING.LIBGLOSS b/licenses/gdb/COPYING.LIBGLOSS old mode 100755 new mode 100644 diff --git a/licenses/gdb/COPYING.NEWLIB b/licenses/gdb/COPYING.NEWLIB old mode 100755 new mode 100644 diff --git a/licenses/gdb/COPYING3 b/licenses/gdb/COPYING3 old mode 100755 new mode 100644 diff --git a/licenses/gdb/COPYING3.LIB b/licenses/gdb/COPYING3.LIB old mode 100755 new mode 100644 diff --git a/licenses/gmp/COPYING b/licenses/gmp/COPYING old mode 100755 new mode 100644 diff --git a/licenses/gmp/COPYING.LIB b/licenses/gmp/COPYING.LIB old mode 100755 new mode 100644 diff --git a/licenses/libiconv/COPYING b/licenses/libiconv/COPYING old mode 100755 new mode 100644 diff --git a/licenses/libiconv/COPYING.LIB b/licenses/libiconv/COPYING.LIB old mode 100755 new mode 100644 diff --git a/licenses/make/COPYING b/licenses/make/COPYING old mode 100755 new mode 100644 diff --git a/licenses/mingw-w64/COPYING b/licenses/mingw-w64/COPYING old mode 100755 new mode 100644 diff --git a/licenses/mingw-w64/COPYING.MinGW-w64-runtime.txt b/licenses/mingw-w64/COPYING.MinGW-w64-runtime.txt old mode 100755 new mode 100644 diff --git a/licenses/mingw-w64/COPYING.MinGW-w64.txt b/licenses/mingw-w64/COPYING.MinGW-w64.txt old mode 100755 new mode 100644 diff --git a/licenses/mingw-w64/DISCLAIMER b/licenses/mingw-w64/DISCLAIMER old mode 100755 new mode 100644 diff --git a/licenses/mingw-w64/DISCLAIMER.PD b/licenses/mingw-w64/DISCLAIMER.PD old mode 100755 new mode 100644 diff --git a/licenses/mingw-w64/ddk-readme.txt b/licenses/mingw-w64/ddk-readme.txt old mode 100755 new mode 100644 diff --git a/licenses/mingw-w64/direct-x-COPYING.lib b/licenses/mingw-w64/direct-x-COPYING.lib old mode 100755 new mode 100644 diff --git a/licenses/mingw-w64/direct-x-readme.txt b/licenses/mingw-w64/direct-x-readme.txt old mode 100755 new mode 100644 diff --git a/licenses/mpc/COPYING.LIB b/licenses/mpc/COPYING.LIB old mode 100755 new mode 100644 diff --git a/licenses/mpfr/COPYING b/licenses/mpfr/COPYING old mode 100755 new mode 100644 diff --git a/licenses/mpfr/COPYING.LESSER b/licenses/mpfr/COPYING.LESSER old mode 100755 new mode 100644 diff --git a/licenses/ppl/COPYING b/licenses/ppl/COPYING old mode 100755 new mode 100644 diff --git a/licenses/python/LICENSE.txt b/licenses/python/LICENSE.txt old mode 100755 new mode 100644 diff --git a/licenses/winpthreads/COPYING b/licenses/winpthreads/COPYING old mode 100755 new mode 100644 diff --git a/mingw-builds-install/COPYING.TXT b/mingw-builds-install/COPYING.TXT index 1b797e575..5f64206fc 100644 --- a/mingw-builds-install/COPYING.TXT +++ b/mingw-builds-install/COPYING.TXT @@ -2,8 +2,8 @@ # # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # -# This file is part of MinGW-builds(https://github.com/niXman/mingw-builds) project. -# Copyright (c) 2011-2015 by niXman (i dotty nixman doggy gmail dotty com) +# This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. +# Copyright (c) 2011-2017 by niXman (i dotty nixman doggy gmail dotty com) # All rights reserved. # # diff --git a/mingw-builds-install/mingw-w64.ci b/mingw-builds-install/mingw-w64.ci index ce9a4c9c2..83b7a92da 100644 --- a/mingw-builds-install/mingw-w64.ci +++ b/mingw-builds-install/mingw-w64.ci @@ -1,566 +1,720 @@ - - 1 - 0 - MinGW-W64 - https://sourceforge.net/projects/mingw-w64/ - - - - verdana - default - 1 - s8 - C:\msys64\home\nixman - mingw-w64-install.exe - - - 1 - english - - 1 - - nolimit - - disk%i.pak - - MinGW-W64 - - MinGW-W64 - https://sourceforge.net/projects/mingw-w64 - inst - uninstall.exe - uninstall.ini - - - - - <_ id = background disabled = 1 > - - #lcaption# - - Times - 36 - 0 - 0 - 0x0000FF - 0xFFFFFF - 0x888888 - 0 - - 0 - - <_ tag = 0 id = getuser disabled = 1 > - - username - appdata,apppath,userpath,desktop,progpath,startup - - - <_ tag = 0 id = sources expanded = 2 > - - <_ tag = 0 id = empty > - - - 1 - include : $"$prjpath$\mingw-w64.g" - - <_ id = checkreq expanded = 0 disabled = 1 > - - <_ id = empty > - - - admin - ischeck - 0 - - - <_ tag = 0 id = varset > - - - - <_ > - loadrep - Getting repository description file... - - - <_ > - addsize - 70000 - - - <_ > - iscreatesh - 1 - - - <_ > - welcometext - Welcome text must be here... - - - <_ > - shgroup - MinGW-W64 project - - - <_ disabled = 1 > - urlfile + + 1 + 0 + MinGW-W64 + https://sourceforge.net/projects/mingw-w64/ + + + + verdana + default - 1 + s8 + C:\msys64\home\nixman + mingw-w64-install.exe + + + 1 + english + + 1 + + nolimit + + disk%i.pak + + MinGW-W64 + + MinGW-W64 + https://sourceforge.net/projects/mingw-w64 + inst + uninstall.exe + uninstall.ini + + + + + <_ id = background disabled = 1 > + + #lcaption# + + Times + 36 + 0 + 0 + 0x0000FF + 0xFFFFFF + 0x888888 + 0 + + 0 + + <_ tag = 0 id = getuser disabled = 1 > + + username + appdata,apppath,userpath,desktop,progpath,startup + + + <_ tag = 0 id = sources expanded = 2 > + + <_ tag = 0 id = empty > + + + 1 + include : $"$prjpath$\mingw-w64.g" + +func uint mypathcmdproc( uint wnd ) +{ + str path + macrox_getstr( "setuppath", path ) + path.lower(); + if path[1]== ':' && *path <= 3 + { + msg_warning( "Enter the installation directory", "#lcaption#" ) + return 0 + } + return 1 +} + + <_ id = checkreq expanded = 0 disabled = 1 > + + <_ id = empty > + + + admin + ischeck + 0 + + + <_ tag = 0 id = varset > + + + + <_ > + loadrep + Getting repository description file... + + + + <_ > + repurl + http://netix.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/repository.txt + + 0 + + <_ > + isnetix + 0 + + 0 + + <_ > + addsize + 70000 + + + + <_ > + iscreatesh + 1 + + + + <_ > + welcometext + Welcome text must be here... + + + + <_ > + shgroup + MinGW-W64 project + + + + <_ disabled = 1 > + urlfile [InternetShortcut] -URL=https://sourceforge.net/projects/mingw-w64/ - - - <_ > - createsh - Create shortcuts in Start Menu - - - <_ > - err_download - The file has been downloaded incorrectly! - - - <_ > - err_repo - Cannot download repository.txt - - - <_ > - err_dwn - Cannot download the release file - - - <_ > - sourceforge - http://sourceforge.net/projects/mingw-w64/ - - - - - - <_ tag = 0 id = tempfiles > - - - - <_ > - $prjpath$\index.html - - - - - - - <_ id = dlglang disabled = 1 > - - nc - left - - - - - - - - - - <_ tag = 0 id = dlgwel > - - - - Welcome to the MinGW-W64 online installer. - - left - auto - - - - - - <_ id = dlglic disabled = 1 > - - - 1 - radio - pnc - left - - - - <_ > - Liccolor - 1 - - - - - - - - <_ tag = 0 id = tempfiles disabled = 1 > - - - - <_ > - C:\temp\repfile.txt - repfile - - - - - - <_ tag = 0 id = readvar disabled = 1 > - - repo - custom - #repfile# - 0 - - <_ tag = 0 id = popup expanded = 2 disabled = 0 > - - <_ tag = 0 id = download > - - #sourceforge#/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/ - - - <_ > - repository.txt - temp - - repository.txt - - - - - - <_ tag = 0 id = readvar > - - reptext - temp - repository.txt - 0 - - <_ tag = 0 id = if expanded = 2 > - - <_ tag = 0 id = sources expanded = 2 > - - <_ tag = 0 id = empty > - - - 0 +URL=https://sourceforge.net/projects/mingw-w64/ + + + + <_ > + createsh + Create shortcuts in Start Menu + + + + <_ > + err_download + The file has been downloaded incorrectly! + + + + <_ > + err_repo + Cannot download repository.txt + + + + <_ > + err_dwn + Cannot download the release file + + + + <_ > + sourceforge + https://sourceforge.net/projects/mingw-w64/ + + + + + + + <_ tag = 0 id = tempfiles > + + + + <_ > + $prjpath$\index.html + + + + + + + <_ id = dlglang disabled = 1 > + + nc + left + + + + + + + + + + <_ tag = 0 id = dlgwel > + + + + Welcome to the MinGW-W64 online installer. + + left + auto + + + + + + <_ id = dlglic disabled = 1 > + + + 1 + radio + pnc + left + + + + <_ > + Liccolor + 1 + + + + + + + + <_ tag = 0 id = tempfiles disabled = 1 > + + + + <_ > + C:\temp\repfile.txt + repfile + + + + + + <_ tag = 0 id = readvar disabled = 1 > + + repo + custom + #repfile# + 0 + + <_ tag = 0 id = popup expanded = 0 disabled = 1 > + + <_ tag = 0 id = download > + + #sourceforge#files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/ + + + <_ > + repository.txt + temp + + repository.txt + + + + + + <_ tag = 0 id = readvar > + + reptext + temp + repository.txt + 0 + + <_ tag = 0 id = if expanded = 2 > + + <_ tag = 0 id = sources expanded = 2 > + + <_ tag = 0 id = empty > + + + 0 macrox_setint("errcode", inet_error()) -$body$ - - <_ tag = 0 id = exit > - - exit - 1 - #err_repo# [#errcode#] - - - - - - - <_ > - reptext - empty - 0 - - and - - - - - <_ tag = 0 id = parse > - - reptext - 1 - - - <_ > - url= - redirurl - "> - - <_ > - error> - ERROR - &x3c;/error> - - - - - <_ tag = 0 id = replacetext > - - redirurl - 1 - 0 - - - <_ > - amp; - - - - - - - <_ tag = 0 id = download > - - - - - <_ > - #redirurl# - temp - - repfile.txt - - - - - - <_ tag = 0 id = readvar > - - repo - temp - repfile.txt - 0 - - - - text - #loadrep# -