diff --git a/build b/build index 9f75e0375..30a181aab 100755 --- a/build +++ b/build @@ -257,7 +257,7 @@ while [[ $# > 0 ]]; do --no-strip) STRIP_ON_INSTALL=no ;; --static-gcc) BOOTSTRAPING=yes - LINK_TYPE_GCC=$LINK_TYPE_STATIC + LINK_TYPE_GCC=$LINK_TYPE_GCC_STATIC GCC_DEPS_LINK_TYPE=$LINK_TYPE_STATIC BUILD_SHARED_GCC=no LINK_TYPE_SUFFIX=static @@ -879,10 +879,8 @@ for rule in ${SUBTARGETS[@]}; do _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 \) ) \ + 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 diff --git a/library/config-win.sh b/library/config-win.sh index 3df02c603..e8443041a 100644 --- a/library/config-win.sh +++ b/library/config-win.sh @@ -35,9 +35,9 @@ # ************************************************************************** -readonly HOST_MINGW_VERSION=7.2.0 -readonly HOST_MINGW_RT_VERSION=5 -readonly HOST_MINGW_BUILD_REV=1 +readonly HOST_MINGW_VERSION=8.1.0 +readonly HOST_MINGW_RT_VERSION=6 +readonly HOST_MINGW_BUILD_REV=0 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" diff --git a/library/config.sh b/library/config.sh index 0b20c48b2..d496608cc 100644 --- a/library/config.sh +++ b/library/config.sh @@ -87,10 +87,11 @@ PROCESSOR_OPTIMIZATION_ARCH_64='nocona' # ************************************************************************** -LINK_TYPE_BOTH="--enable-shared --enable-static" LINK_TYPE_SHARED="--enable-shared --disable-static" LINK_TYPE_STATIC="--enable-static --disable-shared" -LINK_TYPE_GCC=$LINK_TYPE_BOTH +LINK_TYPE_GCC_SHARED="--enable-host-shared" +LINK_TYPE_GCC_STATIC="--disable-host-shared" +LINK_TYPE_GCC=$LINK_TYPE_GCC_SHARED GCC_DEPS_LINK_TYPE=$LINK_TYPE_STATIC ENABLE_LANGUAGES='c,c++,fortran' @@ -99,7 +100,7 @@ SHOW_LOG_ON_ERROR=yes JOBS=4 -RUNTIME_VERSION=v7 +RUNTIME_VERSION=v9 RUNTIME_BRANCH="master" CLANG_GCC_VERSION=gcc-4.9.3 diff --git a/licenses/isl/LICENSE b/licenses/isl/LICENSE new file mode 100644 index 000000000..e93f5973e --- /dev/null +++ b/licenses/isl/LICENSE @@ -0,0 +1,19 @@ +MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/scripts/binutils.sh b/scripts/binutils.sh index 8ad2bc7d9..56cfae514 100644 --- a/scripts/binutils.sh +++ b/scripts/binutils.sh @@ -99,7 +99,10 @@ PKG_CONFIGURE_FLAGS=( --disable-nls --disable-shared # - $LINK_TYPE_GCC + $( [[ $BUILD_SHARED_GCC == yes ]] \ + && echo "$LINK_TYPE_SHARED" \ + || echo "$LINK_TYPE_STATIC" + ) # CFLAGS="\"$COMMON_CFLAGS\"" CXXFLAGS="\"$COMMON_CXXFLAGS\"" diff --git a/scripts/gcc-11.2.0.sh b/scripts/gcc-11.2.0.sh index 25eb2a9fa..8cc8029a1 100644 --- a/scripts/gcc-11.2.0.sh +++ b/scripts/gcc-11.2.0.sh @@ -74,6 +74,7 @@ PKG_CONFIGURE_FLAGS=( --with-sysroot=$PREFIX #--with-gxx-include-dir=$MINGWPREFIX/$TARGET/include/c++ # + --enable-shared $LINK_TYPE_GCC # $( [[ $USE_MULTILIB == yes ]] \ diff --git a/scripts/gcc-post.sh b/scripts/gcc-post.sh index 4bf17675b..5d35f5c25 100644 --- a/scripts/gcc-post.sh +++ b/scripts/gcc-post.sh @@ -61,11 +61,9 @@ function gcc_post_install { local _gcc_version=$(func_map_gcc_name_to_gcc_version $_GCC_NAME) local _reverse_bits=$(func_get_reverse_arch_bit $BUILD_ARCHITECTURE) - [[ $BUILD_SHARED_GCC == yes ]] && { - # libgcc_s.a - cp -f $PREFIX/lib/gcc/$TARGET/lib/libgcc_s.a $PREFIX/$TARGET/lib/ \ - || die "Cannot copy libgcc_s.a to $PREFIX/$TARGET/lib" - } + # libgcc_s.a + cp -f $PREFIX/lib/gcc/$TARGET/lib/libgcc_s.a $PREFIX/$TARGET/lib/ \ + || die "Cannot copy libgcc_s.a to $PREFIX/$TARGET/lib" func_has_lang objc local is_objc=$? @@ -73,58 +71,48 @@ function gcc_post_install { # libobjc cp -f $BUILDS_DIR/$_GCC_NAME/$TARGET/libobjc/.libs/libobjc.a $PREFIX/lib/gcc/$TARGET/$_gcc_version/ \ || die "Cannot copy libobjc.a to $PREFIX/lib/gcc/$TARGET/$_gcc_version" - [[ $BUILD_SHARED_GCC == yes ]] && { - cp -f $BUILDS_DIR/$_GCC_NAME/$TARGET/libobjc/.libs/libobjc.dll.a $PREFIX/lib/gcc/$TARGET/$_gcc_version/ \ - || die "Cannot copy libobjc.dll.a to $PREFIX/lib/gcc/$TARGET/$_gcc_version" - } + cp -f $BUILDS_DIR/$_GCC_NAME/$TARGET/libobjc/.libs/libobjc.dll.a $PREFIX/lib/gcc/$TARGET/$_gcc_version/ \ + || die "Cannot copy libobjc.dll.a to $PREFIX/lib/gcc/$TARGET/$_gcc_version" # objc headers cp -rf ${SRCS_DIR}/$_GCC_NAME/libobjc/objc $PREFIX/lib/gcc/$TARGET/$_gcc_version/include \ || die "Cannot copy objc headers to $PREFIX/lib/gcc/$TARGET/$_gcc_version/include" } - [[ $BUILD_SHARED_GCC == yes ]] && { - # builded architecture dlls - local _dlls=( $(find $BUILDS_DIR/$_GCC_NAME/$TARGET \ - -not \( -path $BUILDS_DIR/$_GCC_NAME/$TARGET/32 -prune \) \ - -not \( -path $BUILDS_DIR/$_GCC_NAME/$TARGET/64 -prune \) \ - -not \( -path $BUILDS_DIR/$_GCC_NAME/gcc/ada -prune \) \ - -not \( -path $BUILDS_DIR/$_GCC_NAME/$TARGET/libada/adainclude -prune \) \ - -type f -name *.dll) ) - cp -f ${_dlls[@]} $PREFIX/bin/ > /dev/null 2>&1 || die "Cannot copy architecture dlls to $PREFIX/bin/" - cp -f ${_dlls[@]} $PREFIX/$TARGET/lib/ > /dev/null 2>&1 || die "Cannot copy architecture dlls to $PREFIX/lib/" - - [[ $STRIP_ON_INSTALL == yes ]] && { - strip $PREFIX/bin/*.dll || die "Error stripping dlls from $PREFIX/bin" - strip $PREFIX/$TARGET/lib/*.dll || die "Error stripping dlls from $PREFIX/$TARGET/lib" - } + # builded architecture dlls + local _dlls=( $(find $BUILDS_DIR/$_GCC_NAME/$TARGET \ + -not \( -path $BUILDS_DIR/$_GCC_NAME/$TARGET/32 -prune \) \ + -not \( -path $BUILDS_DIR/$_GCC_NAME/$TARGET/64 -prune \) \ + -not \( -path $BUILDS_DIR/$_GCC_NAME/gcc/ada -prune \) \ + -not \( -path $BUILDS_DIR/$_GCC_NAME/$TARGET/libada/adainclude -prune \) \ + -type f -name *.dll) ) + cp -f ${_dlls[@]} $PREFIX/bin/ > /dev/null 2>&1 || die "Cannot copy architecture dlls to $PREFIX/bin/" + cp -f ${_dlls[@]} $PREFIX/$TARGET/lib/ > /dev/null 2>&1 || die "Cannot copy architecture dlls to $PREFIX/lib/" + + [[ $STRIP_ON_INSTALL == yes ]] && { + strip $PREFIX/bin/*.dll || die "Error stripping dlls from $PREFIX/bin" + strip $PREFIX/$TARGET/lib/*.dll || die "Error stripping dlls from $PREFIX/$TARGET/lib" } [[ $USE_MULTILIB == yes ]] && { - [[ $BUILD_SHARED_GCC == yes ]] && { - # libgcc_s.a - cp -f $PREFIX/lib/gcc/$TARGET/lib$_reverse_bits/libgcc_s.a $PREFIX/$TARGET/lib$_reverse_bits/ \ - || die "Cannot copy libgcc_s.a to $PREFIX/$TARGET/lib${_reverse_bits}/" - } + # libgcc_s.a + cp -f $PREFIX/lib/gcc/$TARGET/lib$_reverse_bits/libgcc_s.a $PREFIX/$TARGET/lib$_reverse_bits/ \ + || die "Cannot copy libgcc_s.a to $PREFIX/$TARGET/lib${_reverse_bits}/" [[ $is_objc == 1 ]] && { # libobjc libraries cp -f $BUILDS_DIR/$_GCC_NAME/$TARGET/$_reverse_bits/libobjc/.libs/libobjc.a $PREFIX/lib/gcc/$TARGET/$_gcc_version/$_reverse_bits/ \ || die "Cannot copy libobjc.a to $PREFIX/lib/gcc/$TARGET/$_gcc_version/${_reverse_bits}" - [[ $BUILD_SHARED_GCC == yes ]] && { - cp -f $BUILDS_DIR/$_GCC_NAME/$TARGET/$_reverse_bits/libobjc/.libs/libobjc.dll.a $PREFIX/lib/gcc/$TARGET/$_gcc_version/$_reverse_bits/ \ - || die "Cannot copy libobjc.dll.a to $PREFIX/lib/gcc/$TARGET/$_gcc_version/${_reverse_bits}" - } + cp -f $BUILDS_DIR/$_GCC_NAME/$TARGET/$_reverse_bits/libobjc/.libs/libobjc.dll.a $PREFIX/lib/gcc/$TARGET/$_gcc_version/$_reverse_bits/ \ + || die "Cannot copy libobjc.dll.a to $PREFIX/lib/gcc/$TARGET/$_gcc_version/${_reverse_bits}" } - [[ $BUILD_SHARED_GCC == yes ]] && { - # Second architecture bit dlls - find $BUILDS_DIR/$_GCC_NAME/$TARGET/$_reverse_bits \ - -not \( -path $BUILDS_DIR/$_GCC_NAME/$TARGET/$_reverse_bits/libada/adainclude -prune \) \ - -type f -name *.dll ! -name *winpthread* -print0 \ - | xargs -0 -I{} cp -f {} $PREFIX/$TARGET/lib$_reverse_bits/ || die "Error copying ${_reverse_bits}-bit dlls" + # Second architecture bit dlls + find $BUILDS_DIR/$_GCC_NAME/$TARGET/$_reverse_bits \ + -not \( -path $BUILDS_DIR/$_GCC_NAME/$TARGET/$_reverse_bits/libada/adainclude -prune \) \ + -type f -name *.dll ! -name *winpthread* -print0 \ + | xargs -0 -I{} cp -f {} $PREFIX/$TARGET/lib$_reverse_bits/ || die "Error copying ${_reverse_bits}-bit dlls" - [[ $STRIP_ON_INSTALL == yes ]] && { - strip $PREFIX/$TARGET/lib$_reverse_bits/*.dll || die "Error stripping ${_reverse_bits}-bit dlls" - } + [[ $STRIP_ON_INSTALL == yes ]] && { + strip $PREFIX/$TARGET/lib$_reverse_bits/*.dll || die "Error stripping ${_reverse_bits}-bit dlls" } } diff --git a/scripts/licenses.sh b/scripts/licenses.sh index 31fd9e6a8..d2232ab57 100644 --- a/scripts/licenses.sh +++ b/scripts/licenses.sh @@ -65,6 +65,7 @@ function func_get_licenses { mpfr mpc ppl + isl cloog libiconv zlib diff --git a/scripts/mingw-w64-runtime-post.sh b/scripts/mingw-w64-runtime-post.sh index 82dd95027..a233247c6 100644 --- a/scripts/mingw-w64-runtime-post.sh +++ b/scripts/mingw-w64-runtime-post.sh @@ -85,12 +85,10 @@ function runtime_post_install { } # winpthreads - [[ $BUILD_SHARED_GCC == yes ]] && { - cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/bin/libwinpthread-1.dll $PREFIX/bin/ || { echo "13"; return 1; } - cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/bin/libwinpthread-1.dll $PREFIX/$TARGET/lib/ || { echo "14"; return 1; } - cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/lib/libwinpthread.dll.a $PREFIX/$TARGET/lib/ || { echo "15"; return 1; } - cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/lib/libpthread.dll.a $PREFIX/$TARGET/lib/ || { echo "16"; return 1; } - } + cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/bin/libwinpthread-1.dll $PREFIX/bin/ || { echo "13"; return 1; } + cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/bin/libwinpthread-1.dll $PREFIX/$TARGET/lib/ || { echo "14"; return 1; } + cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/lib/libwinpthread.dll.a $PREFIX/$TARGET/lib/ || { echo "15"; return 1; } + cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/lib/libpthread.dll.a $PREFIX/$TARGET/lib/ || { echo "16"; return 1; } cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/lib/libwinpthread.a $PREFIX/$TARGET/lib/ || { echo "17"; return 1; } cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/lib/libpthread.a $PREFIX/$TARGET/lib/ || { echo "18"; return 1; } cp -fv $RUNTIME_DIR/$BUILD_ARCHITECTURE-winpthreads-$RUNTIME_VERSION/include/*.h $PREFIX/$TARGET/include/ || { echo "19"; return 1; } @@ -120,19 +118,15 @@ function runtime_post_install { } # winpthreads - [[ $BUILD_SHARED_GCC == yes ]] && { - cp -fv $RUNTIME_DIR/$_reverse_arch-winpthreads-$RUNTIME_VERSION/bin/libwinpthread-1.dll $PREFIX/$TARGET/lib$_reverse_bits/ || { echo "26"; return 1; } - cp -fv $RUNTIME_DIR/$_reverse_arch-winpthreads-$RUNTIME_VERSION/lib/libwinpthread.dll.a $PREFIX/$TARGET/lib$_reverse_bits/ || { echo "27"; return 1; } - cp -fv $RUNTIME_DIR/$_reverse_arch-winpthreads-$RUNTIME_VERSION/lib/libpthread.dll.a $PREFIX/$TARGET/lib$_reverse_bits/ || { echo "28"; return 1; } - } + cp -fv $RUNTIME_DIR/$_reverse_arch-winpthreads-$RUNTIME_VERSION/bin/libwinpthread-1.dll $PREFIX/$TARGET/lib$_reverse_bits/ || { echo "26"; return 1; } + cp -fv $RUNTIME_DIR/$_reverse_arch-winpthreads-$RUNTIME_VERSION/lib/libwinpthread.dll.a $PREFIX/$TARGET/lib$_reverse_bits/ || { echo "27"; return 1; } + cp -fv $RUNTIME_DIR/$_reverse_arch-winpthreads-$RUNTIME_VERSION/lib/libpthread.dll.a $PREFIX/$TARGET/lib$_reverse_bits/ || { echo "28"; return 1; } cp -fv $RUNTIME_DIR/$_reverse_arch-winpthreads-$RUNTIME_VERSION/lib/libwinpthread.a $PREFIX/$TARGET/lib$_reverse_bits/ || { echo "29"; return 1; } cp -fv $RUNTIME_DIR/$_reverse_arch-winpthreads-$RUNTIME_VERSION/lib/libpthread.a $PREFIX/$TARGET/lib$_reverse_bits/ || { echo "30"; return 1; } mkdir -pv $BUILDS_DIR/$GCC_NAME/$TARGET/$_reverse_bits/{libgcc,libgfortran,libgomp,libitm,libquadmath,libssp,libstdc++-v3} - [[ $BUILD_SHARED_GCC == yes ]] && { - echo $BUILDS_DIR/$GCC_NAME/$TARGET/$_reverse_bits/{libgcc,libgfortran,libgomp,libitm,libquadmath,libssp,libstdc++-v3} \ - | xargs -n 1 cp $PREFIX/$TARGET/lib$_reverse_bits/libwinpthread-1.dll || { echo "31"; return 1; } - } + echo $BUILDS_DIR/$GCC_NAME/$TARGET/$_reverse_bits/{libgcc,libgfortran,libgomp,libitm,libquadmath,libssp,libstdc++-v3} \ + | xargs -n 1 cp $PREFIX/$TARGET/lib$_reverse_bits/libwinpthread-1.dll || { echo "31"; return 1; } } cp -rfv $PREFIX/$TARGET/* $PREFIX/mingw/ || { echo "32"; return 1; } diff --git a/scripts/tests.sh b/scripts/tests.sh index 02df980ea..49fc8941f 100644 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -108,8 +108,8 @@ filesystem_list=( # ************************************************************************** declare -A PKG_TESTS -[[ $BUILD_SHARED_GCC == yes ]] && { PKG_TESTS["dll_test1"]=dll_test1_list[@]; } -[[ $BUILD_SHARED_GCC == yes ]] && { PKG_TESTS["dll_test2"]=dll_test2_list[@]; } +PKG_TESTS["dll_test1"]=dll_test1_list[@] +PKG_TESTS["dll_test2"]=dll_test2_list[@] PKG_TESTS["lto_test"]=lto_test_list[@] PKG_TESTS["omp_test"]=omp_test_list[@] PKG_TESTS["pthread_test"]=pthread_test_list[@] diff --git a/scripts/winpthreads.sh b/scripts/winpthreads.sh index 029782d7f..ac21bf5bd 100644 --- a/scripts/winpthreads.sh +++ b/scripts/winpthreads.sh @@ -58,7 +58,8 @@ PKG_CONFIGURE_FLAGS=( # --prefix=$RUNTIME_DIR/$PKG_NAME # - $LINK_TYPE_GCC + --enable-shared + --enable-static # CFLAGS="\"$COMMON_CFLAGS\"" CXXFLAGS="\"$COMMON_CXXFLAGS\""