ci: First phase of adding MingW support

This commit is contained in:
Bart Van Assche
2021-07-17 19:50:35 -07:00
parent cb4489776b
commit 8b4670db3e
5 changed files with 27 additions and 1 deletions

View File

@@ -12,4 +12,5 @@ install:
- sh: 'ci/install.sh'
build_script:
- sh: 'ci/build.sh'
- sh: 'ci/build.sh'
- cmd: 'ci\build.bat'

1
ci/build.bat Normal file
View File

@@ -0,0 +1 @@
C:\msys64\usr\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh'

View File

@@ -1,5 +1,20 @@
#!/bin/sh
case "$(uname)" in
MSYS*|MINGW*)
pacman --noconfirm --remove mingw-w64-x86_64-gcc-ada
pacman --noconfirm --remove mingw-w64-x86_64-gcc-fortran
pacman --noconfirm --remove mingw-w64-x86_64-gcc-libgfortran
pacman --noconfirm --remove mingw-w64-x86_64-gcc-objc
pacman --noconfirm --sync --refresh
pacman --noconfirm --sync --needed diffutils
pacman --noconfirm --sync --needed make
pacman --noconfirm --sync --needed mingw-w64-x86_64-gcc
pacman --noconfirm --sync --needed mingw-w64-x86_64-cunit
export PATH="/mingw64/bin:$PATH"
;;
esac
./autogen.sh &&
./configure --enable-manpages --enable-test-tool --enable-tests \
--enable-examples &&

View File

@@ -19,10 +19,15 @@ case $host in
AC_CHECK_LIB([socket], [main], , [AC_MSG_ERROR([Can not find required library])])
AC_CHECK_LIB([nsl], [main], , [AC_MSG_ERROR([Can not find required library])])
;;
*mingw*)
target_os_is_win32=true
;;
*)
;;
esac
AM_CONDITIONAL([TARGET_OS_IS_WIN32], [test x$target_os_is_win32 = xtrue])
AC_ARG_ENABLE([werror], [AS_HELP_STRING([--disable-werror],
[Disables building with -Werror by default])])

View File

@@ -8,6 +8,10 @@ libiscsipriv_la_SOURCES = \
scsi-lowlevel.c socket.c sync.c task_mgmt.c \
logging.c
if TARGET_OS_IS_WIN32
libiscsipriv_la_SOURCES += ../win32/win32_compat.c
endif
if !HAVE_LIBGCRYPT
libiscsipriv_la_SOURCES += md5.c
endif