summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-05-25 15:23:14 (GMT)
committerGitHub <noreply@github.com>2017-05-25 15:23:14 (GMT)
commit42b3dde819df3ce54c5ee2c694d8daa0594056d0 (patch)
treec996f6f05a1558f376453a2a80623e85f448177d /scripts/build
parentf975aea2f8bc76f020bc6bc7a3733940ec95da88 (diff)
parent20a8525e8bafb4a66f43bb1486ece439e3e0d95d (diff)
Merge pull request #722 from stilor/mingw-host
Mingw host
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/cc/100-gcc.sh12
-rw-r--r--scripts/build/companion_libs/050-zlib.sh49
2 files changed, 39 insertions, 22 deletions
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh
index 190aec8..c45253a 100644
--- a/scripts/build/cc/100-gcc.sh
+++ b/scripts/build/cc/100-gcc.sh
@@ -337,10 +337,8 @@ do_gcc_core_backend() {
CT_DoLog EXTRA "Configuring final gcc compiler"
extra_user_config=( "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" )
log_txt="final gcc compiler"
- if [ "${CT_CC_GCC_TARGET_FINAL}" = "y" ]; then
- # to inhibit the libiberty and libgcc tricks later on
- build_libgcc=no
- fi
+ # to inhibit the libiberty and libgcc tricks later on
+ build_libgcc=no
;;
*)
CT_Abort "Internal Error: 'build_step' must be one of: 'core1', 'core2', 'gcc_build' or 'gcc_host', not '${build_step:-(empty)}'"
@@ -663,10 +661,8 @@ do_gcc_core_backend() {
case "${build_step}" in
gcc_build|gcc_host)
- if [ "${CT_CC_GCC_TARGET_FINAL}" = "y" ]; then
- core_targets_all=all
- core_targets_install=install
- fi
+ core_targets_all=all
+ core_targets_install=install
;;
esac
diff --git a/scripts/build/companion_libs/050-zlib.sh b/scripts/build/companion_libs/050-zlib.sh
index 10779af..a3ba638 100644
--- a/scripts/build/companion_libs/050-zlib.sh
+++ b/scripts/build/companion_libs/050-zlib.sh
@@ -76,30 +76,51 @@ do_zlib_backend() {
local ldflags
local arg
local -a extra_config
+ local -a extra_make
for arg in "$@"; do
eval "${arg// /\\ }"
done
- CT_DoLog EXTRA "Configuring zlib"
-
- CT_DoExecLog CFG \
- CFLAGS="${cflags}" \
- LDFLAGS="${ldflags}" \
- CHOST="${host}" \
- ${CONFIG_SHELL} \
- "${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/configure" \
- --prefix="${prefix}" \
- --static \
- "${extra_config[@]}"
+ case "${host}" in
+ *-mingw32)
+ # zlib treats mingw host differently and requires using a different
+ # makefile rather than configure+make. It also does not support
+ # out-of-tree building.
+ cp -av "${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/." .
+ extra_make=( -f win32/Makefile.gcc \
+ PREFIX="${host}-" \
+ SHAREDLIB= \
+ IMPLIB= \
+ LIBRARY_PATH="${prefix}/lib" \
+ INCLUDE_PATH="${prefix}/include" \
+ BINARY_PATH="${prefix}/bin" \
+ prefix="${prefix}" \
+ )
+ ;;
+
+ *)
+ CT_DoLog EXTRA "Configuring zlib"
+
+ CT_DoExecLog CFG \
+ CFLAGS="${cflags}" \
+ LDFLAGS="${ldflags}" \
+ CHOST="${host}" \
+ ${CONFIG_SHELL} \
+ "${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/configure" \
+ --prefix="${prefix}" \
+ --static \
+ "${extra_config[@]}"
+ ;;
+ esac
CT_DoLog EXTRA "Building zlib"
- CT_DoExecLog ALL make ${JOBSFLAGS}
+ CT_DoExecLog ALL make "${extra_make[@]}" ${JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
if [ "${host}" = "${CT_BUILD}" ]; then
CT_DoLog EXTRA "Checking zlib"
- CT_DoExecLog ALL make ${JOBSFLAGS} -s check
+ CT_DoExecLog ALL make "${extra_make[@]}" -s test
else
# Cannot run host binaries on build in a canadian cross
CT_DoLog EXTRA "Skipping check for zlib on the host"
@@ -107,7 +128,7 @@ do_zlib_backend() {
fi
CT_DoLog EXTRA "Installing zlib"
- CT_DoExecLog ALL make install
+ CT_DoExecLog ALL make "${extra_make[@]}" install
}
fi # CT_ZLIB