Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonojenkins <jo.shields+jenkins@xamarin.com>2020-06-22 16:42:30 +0300
committerGitHub <noreply@github.com>2020-06-22 16:42:30 +0300
commit32c3b17e50a476b3d282a186b4766df3d463e224 (patch)
tree5e0dc0fb93022ec837c03b072464717b30ef27ab /configure.ac
parent2c2a1718a93addcdebd4fc8693fb6b0d6d44b917 (diff)
Enable mono cross-build on SunOS-like OS (#19932)
Summary: * wire `$(Compiler)` in `mono.proj`, that comes from `eng/build.sh`. * add configurations for illumos cross-compilation. * set `-Werror=strict-prototypes` for `madvise` and `posix_madvise` introspection, which is used during the compilation. * implement `mono-threads-sunos.c`. * add some solaris-specific thread priority levels. With this set of changes, `dotnet hwapp.dll` works with mono flavored `System.Private.CoreLib.dll` and `libcoreclr.so` on SmartOS 2020. Contributes to: dotnet/runtime#34944. Co-authored-by: am11 <am11@users.noreply.github.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 25 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index c6cfaf2f55c..8e983863377 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,6 +139,7 @@ platform_ios=no
host_darwin=no
host_linux=no
build_darwin=no
+host_sunos=no
case "$host" in
wasm32*)
@@ -397,13 +398,14 @@ case "$host" in
use_sigposix=yes
;;
*-*-solaris*)
- CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DHOST_SOLARIS"
+ CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DHOST_SOLARIS -D__EXTENSIONS__ -D_XPG4_2"
need_link_unlink=yes
libmono_cflags="-D_REENTRANT"
libgc_threads=pthreads
has_dtrace=yes
use_sigposix=yes
enable_solaris_tar_check=yes
+ host_sunos=yes
;;
*-*-darwin*)
parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
@@ -2274,14 +2276,13 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNCS(getresuid)
AC_CHECK_FUNCS(setresuid)
AC_CHECK_FUNCS(kqueue)
- # IBM provides a compatibility library for i offering this function.
+ # IBM provides a compatibility library for offering this function.
# BSDs and others, have execinfo in base or packages.
AC_SEARCH_LIBS(backtrace_symbols, execinfo util)
# Two-step so it sets it in config.h
AC_CHECK_FUNCS(backtrace_symbols)
AC_CHECK_FUNCS(mkstemp)
AC_CHECK_FUNCS(mmap)
- AC_CHECK_FUNCS(madvise)
AC_CHECK_FUNCS(getrusage)
AC_CHECK_FUNCS(getpriority)
AC_CHECK_FUNCS(setpriority)
@@ -2747,7 +2748,7 @@ if test x$host_win32 = xno; then
dnl *** Checks for libxnet ***
dnl *****************************
case "${host}" in
- *solaris* )
+ *solaris*)
AC_MSG_CHECKING(for Solaris XPG4 support)
if test -f /usr/lib/libxnet.so; then
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
@@ -3215,7 +3216,6 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNCS(remap_file_pages)
AC_CHECK_FUNCS(posix_fadvise)
AC_CHECK_FUNCS(posix_fallocate)
- AC_CHECK_FUNCS(posix_madvise)
AC_CHECK_FUNCS(vsnprintf)
AC_CHECK_FUNCS(sendfile)
AC_CHECK_FUNCS(gethostid sethostid)
@@ -3921,6 +3921,19 @@ if test x$host_win32 = xno; then
AC_CHECK_DECL(IN_EXCL_UNLINK, [AC_DEFINE(HAVE_IN_EXCL_UNLINK, 1, [IN_EXCL_UNLINK])], [], [[#include <sys/inotify.h>]])
+ if test x$host_sunos = xyes; then
+ # set -Werror=strict-prototypes, to match the flags used during the compilation.
+ ORIG_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror=strict-prototypes"
+ fi
+
+ AC_CHECK_FUNCS(madvise)
+ AC_CHECK_FUNCS(posix_madvise)
+
+ if test x$host_sunos = xyes; then
+ CFLAGS="$ORIG_CFLAGS"
+ fi
+
# *** End of Mono.Native checks ***
else
AM_CONDITIONAL(ENABLE_GSS, false)
@@ -6836,9 +6849,9 @@ if test x$with_core = xonly; then
ICU_CFLAGS="$CPPFLAGS -DPALEXPORT="" -DOSX_ICU_LIBRARY_PATH=AS_ESCAPE(\"/usr/lib/libicucore.dylib\", '\"') -DTARGET_UNIX -DU_DISABLE_RENAMING -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option -Wno-deprecated-declarations"
fi
CPPFLAGS=$ORIG_CPPFLAGS
- elif test x$platform_android = xyes; then
+ elif test x$platform_android = xyes; then
ICU_CFLAGS="-DPALEXPORT="" -DHAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS -DHAVE_SET_MAX_VARIABLE -DTARGET_UNIX -DTARGET_ANDROID -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
- have_sys_icu=yes
+ have_sys_icu=yes
elif test x$host_linux = xyes; then
AC_CHECK_LIB(icuuc, main, LIBS=$LIBS,
[AC_MSG_ERROR([Cannot find libicuuc, try installing libicu-dev (or the appropriate package for your platform).])])
@@ -6848,14 +6861,17 @@ if test x$with_core = xonly; then
if test x$have_sys_icu = xyes; then
ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
fi
+ elif test x$host_sunos = xyes; then
+ ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
+ have_sys_icu=yes
else
GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
fi
AC_SUBST(ICU_CFLAGS)
- else
+ else
GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
fi
-else
+else
GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
fi