diff --git a/cmake/Toolchain-cross-MinGW-w64-i686.cmake b/cmake/Toolchain-cross-MinGW-w64-i686.cmake index 3c645935..021b84f3 100644 --- a/cmake/Toolchain-cross-MinGW-w64-i686.cmake +++ b/cmake/Toolchain-cross-MinGW-w64-i686.cmake @@ -2,6 +2,11 @@ SET(CMAKE_SYSTEM_NAME Windows) set(COMPILER_PREFIX "i686-w64-mingw32") +unset(CMAKE_RC_COMPILER CACHE) +unset(CMAKE_C_COMPILER CACHE) +unset(CMAKE_CXX_COMPILER CACHE) +unset(PKG_CONFIG_EXECUTABLE CACHE) + # which compilers to use for C and C++ find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres) find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc) diff --git a/cmake/Toolchain-cross-MinGW-w64-x86_64.cmake b/cmake/Toolchain-cross-MinGW-w64-x86_64.cmake index 45606314..91ea14b0 100644 --- a/cmake/Toolchain-cross-MinGW-w64-x86_64.cmake +++ b/cmake/Toolchain-cross-MinGW-w64-x86_64.cmake @@ -2,6 +2,11 @@ SET(CMAKE_SYSTEM_NAME Windows) set(COMPILER_PREFIX "x86_64-w64-mingw32") +unset(CMAKE_RC_COMPILER CACHE) +unset(CMAKE_C_COMPILER CACHE) +unset(CMAKE_CXX_COMPILER CACHE) +unset(PKG_CONFIG_EXECUTABLE CACHE) + # which compilers to use for C and C++ find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres) find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc) diff --git a/tools/builder/core.sh b/tools/builder/core.sh index de103342..bf0f0b23 100644 --- a/tools/builder/core.sh +++ b/tools/builder/core.sh @@ -40,6 +40,9 @@ case "\$CC" in ;; esac +export CC_ORIG="\${CC_ORIG:-\$CC}" +export CXX_ORIG="\${CXX_ORIG:-\$CXX}" + export CPPFLAGS="$CPPFLAGS -I$BUILD_ROOT/root/include" export CFLAGS="$CFLAGS -fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -Wno-error=all" export CXXFLAGS="$CXXFLAGS -fPIC -I$BUILD_ROOT/root/include -L$BUILD_ROOT/root/lib -std=gnu++11 -Wno-error=all -fpermissive" @@ -112,7 +115,7 @@ DISTS=$DISTS' unzip https://downloads.sourceforge.net/project/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz bin/unzip zip https://downloads.sourceforge.net/project/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz bin/zip openssl https://www.openssl.org/source/openssl-1.0.2o.tar.gz lib/libssl.a - cmake https://cmake.org/files/v3.10/cmake-3.10.0-rc3.tar.gz bin/cmake + cmake https://cmake.org/files/v3.10/cmake-3.10.3.tar.gz bin/cmake zlib https://zlib.net/zlib-1.2.11.tar.gz lib/libz.a m4 http://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz bin/m4 autoconf https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz bin/autoconf diff --git a/tools/builder/mingw-cross.sh b/tools/builder/mingw-cross.sh index 2d6a19f0..9e064ff4 100644 --- a/tools/builder/mingw-cross.sh +++ b/tools/builder/mingw-cross.sh @@ -40,8 +40,8 @@ both_dists=' BUILD_ENV=$BUILD_ENV$(cat <