diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4aeb19e35f9515..7c97d99db03800 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -20,8 +20,6 @@ /src/mono/llvm @vargaz @SamMonoRT @imhameed @EgorBo /src/mono/mono/arch @vargaz -/src/mono/mono/benchmark @SamMonoRT @naricc -/src/mono/mono/dis @lambdageek @vargaz /src/mono/mono/eglib @vargaz @lambdageek @CoffeeFlux /src/mono/mono/metadata @vargaz @lambdageek @thaystg @CoffeeFlux @@ -43,7 +41,6 @@ /src/mono/mono/mini/debugger-agent.c @vargaz @thaystg @DavidKarlas @lambdageek /src/mono/mono/mini/interp/* @BrzVlad @vargaz -/src/mono/mono/native @egorbo @marek-safar /src/mono/mono/profiler @BrzVlad @lambdageek /src/mono/mono/sgen @BrzVlad @lambdageek @naricc @@ -56,4 +53,4 @@ /src/mono/mono/utils/mono-state* @lambdageek /src/mono/mono/utils/mono-threads* @lambdageek @vargaz -/src/mono/netcore @marek-safar @akoeplinger @egorbo @vargaz @steveisok +/src/mono/netcore @marek-safar @akoeplinger @vargaz @steveisok diff --git a/src/mono/.gitignore b/src/mono/.gitignore index ff7ef8bcb88273..d00c48d7e23f26 100644 --- a/src/mono/.gitignore +++ b/src/mono/.gitignore @@ -1,16 +1 @@ -Makefile.in - -/aclocal.m4 -/autom4te.cache -/compile -/config.guess -/config.h.in -/config.h -/config.sub -/configure -/depcomp -/install-sh -/ltmain.sh -/missing - mono_crash* \ No newline at end of file diff --git a/src/mono/.vscode/c_cpp_properties.json b/src/mono/.vscode/c_cpp_properties.json index 44cebabe418e22..5d7b8a06a98f47 100644 --- a/src/mono/.vscode/c_cpp_properties.json +++ b/src/mono/.vscode/c_cpp_properties.json @@ -7,8 +7,7 @@ "/usr/local/include", "${workspaceRoot}", "${workspaceRoot}/mono", - "${workspaceRoot}/mono/eglib", - "${workspaceRoot}/support" + "${workspaceRoot}/mono/eglib" ], "defines": [], "intelliSenseMode": "clang-x64", @@ -18,8 +17,7 @@ "/usr/local/include", "${workspaceRoot}", "${workspaceRoot}/mono", - "${workspaceRoot}/mono/eglib", - "${workspaceRoot}/support" + "${workspaceRoot}/mono/eglib" ], "limitSymbolsToIncludedHeaders": true, "databaseFilename": "" @@ -38,8 +36,7 @@ "/usr/local/include", "${workspaceRoot}", "${workspaceRoot}/mono", - "${workspaceRoot}/mono/eglib", - "${workspaceRoot}/support" + "${workspaceRoot}/mono/eglib" ], "defines": [], "intelliSenseMode": "clang-x64", @@ -50,8 +47,7 @@ "/usr/local/include", "${workspaceRoot}", "${workspaceRoot}/mono", - "${workspaceRoot}/mono/eglib", - "${workspaceRoot}/support" + "${workspaceRoot}/mono/eglib" ], "limitSymbolsToIncludedHeaders": true, "databaseFilename": "" @@ -65,7 +61,6 @@ "${workspaceRoot}", "${workspaceRoot}/mono", "${workspaceRoot}/mono/eglib", - "${workspaceRoot}/support" ], "defines": [ "_DEBUG", @@ -78,8 +73,7 @@ "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*", "${workspaceRoot}", "${workspaceRoot}/mono", - "${workspaceRoot}/mono/eglib", - "${workspaceRoot}/support" + "${workspaceRoot}/mono/eglib" ], "limitSymbolsToIncludedHeaders": true, "databaseFilename": "" diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 69b00b3b333ed0..42cd27c86a6fc2 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -46,47 +46,46 @@ if(ENABLE_MINIMAL) process_enable_minimal() endif() -function(extract_mono_corlib_version) - file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac corlib_version_line REGEX ^MONO_CORLIB_VERSION=) - - if(corlib_version_line STREQUAL "") - message(FATAL_ERROR "Couldn't find MONO_CORLIB_VERSION from configure.ac") - endif() - - string(REGEX REPLACE "MONO_CORLIB_VERSION=([0-9a-fA-F\-]+)" "\\1" corlib_version ${corlib_version_line}) - - if(corlib_version STREQUAL "") - message(FATAL_ERROR "Couldn't parse corlib version") - endif() - - set(MONO_CORLIB_VERSION "\"${corlib_version}\"" PARENT_SCOPE) -endfunction() - -extract_mono_corlib_version() - -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mono.proj") - set(ENABLE_NETCORE 1) -endif() - -if(ENABLE_NETCORE) - set(DISABLE_REMOTING 1) - set(DISABLE_REFLECTION_EMIT_SAVE 1) - set(DISABLE_APPDOMAINS 1) - set(DISABLE_SHADOW_COPY 1) - set(DISABLE_CLEANUP 1) - set(DISABLE_ASSEMBLY_REMAPPING 1) - set(DISABLE_SECURITY 1) - set(DISABLE_MDB 1) - set(DISABLE_COM 1) - set(DISABLE_GAC 1) - set(DISABLE_PERFCOUNTERS 1) - set(DISABLE_ATTACH 1) - set(DISABLE_CONFIG 1) - set(DISABLE_CFGDIR_CONFIG 1) - set(DISABLE_VERIFIER 1) -else() - message(FATAL_ERROR "Building without -DENABLE_NETCORE=1 is not supported.") -endif() +# +# This is the version of the corlib-runtime interface. When +# making changes to this interface (by changing the layout +# of classes the runtime knows about, changing icall signature or +# semantics etc), change this variable. +# +# This must be unique relative to corlib interface and semantics. +# +# If you change corlib such that a runtime change is required, or +# vice versa, change this string. Examples include removing icalls, +# adding icalls, changing icall signatures, and changing type layouts +# that both sides know. +# +# It is an arbitrary string and should be parsed as such. +# A guid works and is encouraged. +# +# There is no ordering of corlib versions, no old or new, +# an exact match is required between corlib and runtime. +# +# This line is parsed by other tools, it should remain in the format they expect. +# +set(MONO_CORLIB_VERSION 1A5E0066-58DC-428A-B21C-0AD6CDAE2789) + +set(ENABLE_NETCORE 1) + +set(DISABLE_REMOTING 1) +set(DISABLE_REFLECTION_EMIT_SAVE 1) +set(DISABLE_APPDOMAINS 1) +set(DISABLE_SHADOW_COPY 1) +set(DISABLE_CLEANUP 1) +set(DISABLE_ASSEMBLY_REMAPPING 1) +set(DISABLE_SECURITY 1) +set(DISABLE_MDB 1) +set(DISABLE_COM 1) +set(DISABLE_GAC 1) +set(DISABLE_PERFCOUNTERS 1) +set(DISABLE_ATTACH 1) +set(DISABLE_CONFIG 1) +set(DISABLE_CFGDIR_CONFIG 1) +set(DISABLE_VERIFIER 1) # Dependencies between options if(DISABLE_ASSEMBLY_REMAPPING) diff --git a/src/mono/Makefile.am b/src/mono/Makefile.am deleted file mode 100644 index 9fdde65c038a87..00000000000000 --- a/src/mono/Makefile.am +++ /dev/null @@ -1,142 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 - -SUBDIRS = @MONO_SUBDIRS@ -noinst_SUBDIRS = @MONO_NOINST_SUBDIRS@ -DIST_SUBDIRS = $(SUBDIRS) m4 - -if !ENABLE_NETCORE - -all: $(update_submodules) - -update_submodules: - @cd $(srcdir) && scripts/update_submodules.sh - -.PHONY: update_submodules - -EXTRA_DIST= \ - README.md \ - LICENSE \ - autogen.sh \ - mkinstalldirs \ - mono-uninstalled.pc.in \ - winconfig.h \ - code_of_conduct.md \ - external \ - mcs/class/referencesource - -DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_RUNTIME=false - -# Distribute the 'mcs' tree too -GIT_DIR ?= $(srcdir)/.git -dist-hook: - test -d $(distdir)/mcs || mkdir $(distdir)/mcs - d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive - rm -rf `find $(top_distdir)/external -path '*\.git'` - rm -rf `find $(top_distdir)/external -path '*\.libs'` - rm -rf `find $(top_distdir)/external -path '*\.deps'` - rm -f `find $(top_distdir)/external -path '*\.o'` - rm -f `find $(top_distdir)/external -path '*\.so'` - rm -f `find $(top_distdir)/external -path '*\.lo'` - rm -f `find $(top_distdir)/external -path '*\.Plo'` - rm -f `find $(top_distdir)/external -name '\.dirstamp'` - rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'` - rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'` - rm -rf "$(top_distdir)/external/linker/test" - rm -rf "$(top_distdir)/external/llvm-project/lldb/test" - rm -rf "$(top_distdir)/external/llvm-project/libcxx/test" - rm -rf "$(top_distdir)/external/llvm-project/clang/test" - -pkgconfigdir = $(libdir)/pkgconfig -noinst_DATA = mono-uninstalled.pc -DISTCLEANFILES= mono-uninstalled.pc - -# building with monolite -.PHONY: get-monolite-latest -get-monolite-latest: - $(MAKE) -C $(mcs_topdir)/class get-monolite-latest - -if BITCODE -BITCODE_CHECK=yes -endif - -if DEFAULT_TESTS -CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh -else -CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh -endif - -.PHONY: check-ci -check-ci: - MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT) - -.PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests -validate: do-build-mono-mcs - $(MAKE) mcs-do-tests -do-build-mono-mcs: mcs-do-clean - $(MAKE) all -mcs-do-clean: - cd runtime && $(MAKE) clean-local - cd mono/tests && $(MAKE) clean -mcs-do-tests: - cd runtime && $(MAKE) check-local - cd mono/tests && $(MAKE) check - -.PHONY: compiler-tests mcs-do-compiler-tests -compiler-tests: - $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate -mcs-do-compiler-tests: - $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests - -.PHONY: bootstrap-world -bootstrap-world: compiler-tests - $(MAKE) install - -install: - for mydir in $(filter-out $(noinst_SUBDIRS),$(SUBDIRS)); do \ - (cd $${mydir} && ${MAKE} install) \ - done - -update-csproj: - -rm msvc/scripts/order - -rm msvc/scripts/order.xml - -rm -rf msvc/scripts/inputs - -mkdir msvc/scripts/inputs - (cd runtime; $(MAKE) V=1 extra_targets=csproj-local) - -package-inputs: - echo '' > msvc/scripts/order.xml - echo '' >> msvc/scripts/order.xml - for i in `cat msvc/scripts/order`; do \ - set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \ - cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \ - (echo " "; \ - read boot; echo " $$boot"; \ - read flags; echo " $$flags"; \ - read sources;echo " $$sources"; \ - read output; echo " $$output"; \ - read built; echo " `echo $$built | sed 's/\\\/\\\\/g'`"; \ - read libou; echo " $$libou"; \ - read fx_ver; echo " $$fx_ver"; \ - read profile; echo " $$profile"; \ - read resxt; echo " $$resxt"; \ - read resp; echo " $$resp"; \ - echo " ") >> msvc/scripts/order.xml; \ - done - echo "" >> msvc/scripts/order.xml - -# Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version -update-llvm-version: - if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi - REV=`$(LLVM_DIR)/bin/llvm-config --version` && sed -e "s,expected_llvm_version=.*,expected_llvm_version=\"$$REV\"," < configure.ac > tmp && mv tmp configure.ac && echo "Version set to $$REV." - - -update-solution-files: - cd msvc/scripts && $(MAKE) genproj.exe || exit $$?; - $(MAKE) update-csproj - $(MAKE) package-inputs - (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS)) - -update-solution-files-with-tests: - $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files - -endif diff --git a/src/mono/acinclude.m4 b/src/mono/acinclude.m4 deleted file mode 100644 index bbc2781eab00ef..00000000000000 --- a/src/mono/acinclude.m4 +++ /dev/null @@ -1,182 +0,0 @@ -dnl dolt, a replacement for libtool -dnl Copyright © 2007-2008 Josh Triplett -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright -dnl notice and this notice are preserved. -dnl -dnl To use dolt, invoke the DOLT macro immediately after the libtool macros. -dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it -dnl installed when running autoconf on your project. - -AC_DEFUN([DOLT], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -# dolt, a replacement for libtool -# Josh Triplett -AC_PATH_PROG(DOLT_BASH, bash) -AC_MSG_CHECKING([if dolt supports this host]) -dolt_supported=yes -if test x$DOLT_BASH = x; then - dolt_supported=no -fi -if test x$GCC != xyes; then - dolt_supported=no -fi -case $host in -i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ -|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*) - pic_options='-fPIC' - ;; -?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*) - pic_options='-DDLL_EXPORT' - ;; -i?86-apple-darwin*|arm-apple-darwin*) - pic_options='-fno-common' - ;; -*) - dolt_supported=no - ;; -esac -if test x$dolt_supported = xno ; then - AC_MSG_RESULT([no, falling back to libtool]) - LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)' - LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)' -else - AC_MSG_RESULT([yes, replacing libtool]) - -dnl Start writing out doltcompile. - cat <<__DOLTCOMPILE__EOF__ >doltcompile -#!$DOLT_BASH -__DOLTCOMPILE__EOF__ - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -args=("$[]@") -for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do - if test x"${args@<:@$arg@:>@}" = x-o ; then - objarg=$((arg+1)) - break - fi -done -if test x$objarg = x ; then - echo 'Error: no -o on compiler command line' 1>&2 - exit 1 -fi -lo="${args@<:@$objarg@:>@}" -obj="${lo%.lo}" -if test x"$lo" = x"$obj" ; then - echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2 - exit 1 -fi -objbase="${obj##*/}" -__DOLTCOMPILE__EOF__ - -dnl Write out shared compilation code. - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -libobjdir="${obj%$objbase}.libs" -if test ! -d "$libobjdir" ; then - mkdir_out="$(mkdir "$libobjdir" 2>&1)" - mkdir_ret=$? - if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then - echo "$mkdir_out" 1>&2 - exit $mkdir_ret - fi -fi -pic_object="$libobjdir/$objbase.o" -args@<:@$objarg@:>@="$pic_object" -__DOLTCOMPILE__EOF__ - cat <<__DOLTCOMPILE__EOF__ >>doltcompile -"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$? -__DOLTCOMPILE__EOF__ - fi - -dnl Write out static compilation code. -dnl Avoid duplicate compiler output if also building shared objects. - if test x$enable_static = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -non_pic_object="$obj.o" -args@<:@$objarg@:>@="$non_pic_object" -__DOLTCOMPILE__EOF__ - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $? -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -"${args@<:@@@:>@}" || exit $? -__DOLTCOMPILE__EOF__ - fi - fi - -dnl Write out the code to write the .lo file. -dnl The second line of the .lo file must match "^# Generated by .*libtool" - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -{ -echo "# $lo - a libtool object file" -echo "# Generated by doltcompile, not libtool" -__DOLTCOMPILE__EOF__ - - if test x$enable_shared = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo "pic_object='.libs/${objbase}.o'" -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo pic_object=none -__DOLTCOMPILE__EOF__ - fi - - if test x$enable_static = xyes; then - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo "non_pic_object='${objbase}.o'" -__DOLTCOMPILE__EOF__ - else - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -echo non_pic_object=none -__DOLTCOMPILE__EOF__ - fi - - cat <<'__DOLTCOMPILE__EOF__' >>doltcompile -} > "$lo" -__DOLTCOMPILE__EOF__ - -dnl Done writing out doltcompile; substitute it for libtool compilation. - chmod +x doltcompile - LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)' - LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)' - -dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for -dnl a target, so write out a libtool wrapper to handle that case. -dnl Note that doltlibtool does not handle inferred tags or option arguments -dnl without '=', because automake does not use them. - cat <<__DOLTLIBTOOL__EOF__ > doltlibtool -#!$DOLT_BASH -__DOLTLIBTOOL__EOF__ - cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool -top_builddir_slash="${0%%doltlibtool}" -: ${top_builddir_slash:=./} -args=() -modeok=false -tagok=false -for arg in "$[]@"; do - case "$arg" in - --silent) ;; - --mode=compile) modeok=true ;; - --tag=CC|--tag=CXX) tagok=true ;; - --quiet) ;; - *) args@<:@${#args[@]}@:>@="$arg" ;; - esac -done -if $modeok && $tagok ; then - . ${top_builddir_slash}doltcompile "${args@<:@@@:>@}" -else - exec ${top_builddir_slash}libtool "$[]@" -fi -__DOLTLIBTOOL__EOF__ - -dnl Done writing out doltlibtool; substitute it for libtool. - chmod +x doltlibtool - LIBTOOL='$(top_builddir)/doltlibtool' -fi -AC_SUBST(LTCOMPILE) -AC_SUBST(LTCXXCOMPILE) -# end dolt -]) diff --git a/src/mono/autogen.sh b/src/mono/autogen.sh deleted file mode 100755 index 3f0fcd49ee2380..00000000000000 --- a/src/mono/autogen.sh +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/env bash -# Run this to generate all the initial makefiles, etc. -# Ripped off from GNOME macros version - -DIE=0 - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -if [ -n "$MONO_PATH" ]; then - # from -> /mono/lib:/another/mono/lib - # to -> /mono /another/mono - for i in `echo ${MONO_PATH} | tr ":" " "`; do - i=`dirname ${i}` - if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then - ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" - fi - if [ -n "{i}" -a -d "${i}/bin" ]; then - PATH="${i}/bin:$PATH" - fi - done - export PATH -fi - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`autoconf' installed to compile Mono." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -if [ -z "$LIBTOOLIZE" ]; then - LIBTOOLIZE=`which glibtoolize 2>/dev/null` - if [ ! -x "$LIBTOOLIZE" ]; then - LIBTOOLIZE=`which libtoolize` - fi -fi - -(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { - ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`libtoolize' installed to compile Mono." - echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.2.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - } -} - -grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { - grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ - (gettext --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`gettext' installed to compile Mono." - echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - } -} - -(automake --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`automake' installed to compile Mono." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - NO_AUTOMAKE=yes -} - - -# if no automake, don't bother testing for aclocal -test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: Missing \`aclocal'. The version of \`automake'" - echo "installed doesn't appear recent enough." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -if test x$NOCONFIGURE = x && test -z "$*"; then - echo "**Warning**: I am going to run \`configure' with no arguments." - echo "If you wish to pass any to it, please specify them on the" - echo \`$0\'" command line." - echo -fi - -am_opt="--add-missing --copy --gnu -Wno-portability -Wno-obsolete" - -case $CC in -xlc ) - am_opt="$am_opt --include-deps";; -esac - - -if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then - if test -z "$NO_LIBTOOLIZE" ; then - echo "Running libtoolize..." - $LIBTOOLIZE --force --copy - fi -fi - -# Parse parameters -has_ext_mod=false -ext_mod_args='' -has_disable_boehm=false -for PARAM; do - if [[ $PARAM =~ "--enable-extension-module" ]] ; then - has_ext_mod=true - if [[ $PARAM =~ "=" ]] ; then - ext_mod_args=`echo $PARAM | cut -d= -f2` - fi - fi - if [[ $PARAM =~ "--disable-boehm" ]] ; then - has_disable_boehm=true - fi -done - -# -# Plug in the extension module -# -if test x$has_ext_mod = xtrue; then - pushd $top_srcdir../mono-extensions/scripts - sh ./prepare-repo.sh $ext_mod_args || exit 1 - popd -else - cat mono/mini/Makefile.am.in > mono/mini/Makefile.am -fi - - -echo "Running aclocal -I m4 -I . $ACLOCAL_FLAGS ..." -aclocal -Wnone -I m4 -I . $ACLOCAL_FLAGS || { - echo - echo "**Error**: aclocal failed. This may mean that you have not" - echo "installed all of the packages you need, or you may need to" - echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" - echo "for the prefix where you installed the packages whose" - echo "macros were not found" - exit 1 -} - -if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then - echo "Running autoheader..." - autoheader || { echo "**Error**: autoheader failed."; exit 1; } -fi - -echo "Running automake $am_opt ..." -automake $am_opt || - { echo "**Error**: automake failed."; exit 1; } -echo "Running autoconf ..." -autoconf || { echo "**Error**: autoconf failed."; exit 1; } - -# Update all submodules recursively to ensure everything is checked out -if test -e $srcdir/scripts/update_submodules.sh; then - (cd $srcdir && scripts/update_submodules.sh) -fi - -if test x$has_disable_boehm = xfalse -a -d $srcdir/external/bdwgc; then - echo Running external/bdwgc/autogen.sh ... - (cd $srcdir/external/bdwgc ; NOCONFIGURE=1 ./autogen.sh "$@") - echo Done running external/bdwgc/autogen.sh ... -fi - -if test x$MONO_EXTRA_CONFIGURE_FLAGS != x; then - echo "MONO_EXTRA_CONFIGURE_FLAGS is $MONO_EXTRA_CONFIGURE_FLAGS" -fi - -host_conf_flag= -build_uname_all=`(uname -a) 2>/dev/null` -case "$build_uname_all" in -CYGWIN*) - if [[ "$@" != *"--host="* ]]; then - echo "Missing --host parameter, configure using ./configure --host=i686-w64-mingw32 or --host=x86_64-w64-mingw32" - echo "Falling back using --host=x86_64-w64-mingw32 as default." - host_conf_flag="--host=x86_64-w64-mingw32" - fi - ;; -esac - -conf_flags="$MONO_EXTRA_CONFIGURE_FLAGS --enable-maintainer-mode --enable-compile-warnings $host_conf_flag" #--enable-iso-c - -if test x$NOCONFIGURE = x; then - echo Running $srcdir/configure $conf_flags "$@" ... - $srcdir/configure $conf_flags "$@" \ - && echo Now type \`make\' to compile $PKG_NAME || exit 1 -else - echo Skipping configure process. -fi diff --git a/src/mono/cmake/config.h.in b/src/mono/cmake/config.h.in index 07df677f684bd4..29b83f49fa29f0 100644 --- a/src/mono/cmake/config.h.in +++ b/src/mono/cmake/config.h.in @@ -72,7 +72,7 @@ #cmakedefine PACKAGE_URL 1 /* Version of the corlib-runtime interface */ -#define MONO_CORLIB_VERSION @MONO_CORLIB_VERSION@ +#cmakedefine MONO_CORLIB_VERSION "@MONO_CORLIB_VERSION@" /* Disables the IO portability layer */ #cmakedefine DISABLE_PORTABILITY 1 diff --git a/src/mono/config.rpath b/src/mono/config.rpath deleted file mode 100755 index 17298f2348bf0c..00000000000000 --- a/src/mono/config.rpath +++ /dev/null @@ -1,672 +0,0 @@ -#! /bin/sh -# Output a system dependent set of variables, describing how to set the -# run time search path of shared libraries in an executable. -# -# Copyright 1996-2010 Free Software Foundation, Inc. -# Taken from GNU libtool, 2001 -# Originally by Gordon Matzigkeit , 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# The first argument passed to this file is the canonical host specification, -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld -# should be set by the caller. -# -# The set of defined variables is at the end of this script. - -# Known limitations: -# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer -# than 256 bytes, otherwise the compiler driver will dump core. The only -# known workaround is to choose shorter directory names for the build -# directory and/or the installation directory. - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -shrext=.so - -host="$1" -host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -# Code taken from libtool.m4's _LT_CC_BASENAME. - -for cc_temp in $CC""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` - -# Code taken from libtool.m4's _LT_COMPILER_PIC. - -wl= -if test "$GCC" = yes; then - wl='-Wl,' -else - case "$host_os" in - aix*) - wl='-Wl,' - ;; - darwin*) - case $cc_basename in - xlc*) - wl='-Wl,' - ;; - esac - ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) - ;; - hpux9* | hpux10* | hpux11*) - wl='-Wl,' - ;; - irix5* | irix6* | nonstopux*) - wl='-Wl,' - ;; - newsos6) - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - ecc*) - wl='-Wl,' - ;; - icc* | ifort*) - wl='-Wl,' - ;; - lf95*) - wl='-Wl,' - ;; - pgcc | pgf77 | pgf90) - wl='-Wl,' - ;; - ccc*) - wl='-Wl,' - ;; - como) - wl='-lopt=' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - wl='-Wl,' - ;; - esac - ;; - esac - ;; - osf3* | osf4* | osf5*) - wl='-Wl,' - ;; - rdos*) - ;; - solaris*) - wl='-Wl,' - ;; - sunos4*) - wl='-Qoption ld ' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - wl='-Wl,' - ;; - sysv4*MP*) - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - wl='-Wl,' - ;; - unicos*) - wl='-Wl,' - ;; - uts4*) - ;; - esac -fi - -# Code taken from libtool.m4's _LT_LINKER_SHLIBS. - -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no - -case "$host_os" in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - # Unlike libtool, we use -rpath here, not --rpath, since the documented - # option of GNU ld is called -rpath, not --rpath. - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - case "$host_os" in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - fi - ;; - amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we cannot use - # them. - ld_shlibs=no - ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - cygwin* | mingw* | pw32* | cegcc*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - interix[3-9]*) - hardcode_direct=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - netbsd*) - ;; - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - else - ld_shlibs=no - fi - ;; - esac - ;; - sunos4*) - hardcode_direct=yes - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - esac - if test "$ld_shlibs" = no; then - hardcode_libdir_flag_spec= - fi -else - case "$host_os" in - aix3*) - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - else - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - fi - hardcode_direct=yes - hardcode_libdir_separator=':' - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - fi - # Begin _LT_AC_SYS_LIBPATH_AIX. - echo 'int main () { return 0; }' > conftest.c - ${CC} ${LDFLAGS} conftest.c -o conftest - aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` - if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` - fi - if test -z "$aix_libpath"; then - aix_libpath="/usr/lib:/lib" - fi - rm -f conftest.c conftest - # End _LT_AC_SYS_LIBPATH_AIX. - if test "$aix_use_runtimelinking" = yes; then - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - else - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - fi - fi - ;; - amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - bsdi[45]*) - ;; - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - libext=lib - ;; - darwin* | rhapsody*) - hardcode_direct=no - if test "$GCC" = yes ; then - : - else - case $cc_basename in - xlc*) - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; - dgux*) - hardcode_libdir_flag_spec='-L$libdir' - ;; - freebsd1*) - ld_shlibs=no - ;; - freebsd2.2*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - freebsd2*) - hardcode_direct=yes - hardcode_minus_L=yes - ;; - freebsd* | dragonfly*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - hpux9*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - hpux10*) - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - hpux11*) - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - ;; - *) - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - netbsd*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - newsos6) - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - else - case "$host_os" in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - osf3*) - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - osf4* | osf5*) - if test "$GCC" = yes; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - # Both cc and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - solaris*) - hardcode_libdir_flag_spec='-R$libdir' - ;; - sunos4*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - ;; - sysv4) - case $host_vendor in - sni) - hardcode_direct=yes # is this really true??? - ;; - siemens) - hardcode_direct=no - ;; - motorola) - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - ;; - sysv4.3*) - ;; - sysv4*MP*) - if test -d /usr/nec; then - ld_shlibs=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - ;; - sysv5* | sco3.2v5* | sco5v6*) - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - ;; - uts4*) - hardcode_libdir_flag_spec='-L$libdir' - ;; - *) - ld_shlibs=no - ;; - esac -fi - -# Check dynamic linker characteristics -# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. -# Unlike libtool.m4, here we don't care about _all_ names of the library, but -# only about the one the linker finds when passed -lNAME. This is the last -# element of library_names_spec in libtool.m4, or possibly two of them if the -# linker has special search rules. -library_names_spec= # the last element of library_names_spec in libtool.m4 -libname_spec='lib$name' -case "$host_os" in - aix3*) - library_names_spec='$libname.a' - ;; - aix[4-9]*) - library_names_spec='$libname$shrext' - ;; - amigaos*) - library_names_spec='$libname.a' - ;; - beos*) - library_names_spec='$libname$shrext' - ;; - bsdi[45]*) - library_names_spec='$libname$shrext' - ;; - cygwin* | mingw* | pw32* | cegcc*) - shrext=.dll - library_names_spec='$libname.dll.a $libname.lib' - ;; - darwin* | rhapsody*) - shrext=.dylib - library_names_spec='$libname$shrext' - ;; - dgux*) - library_names_spec='$libname$shrext' - ;; - freebsd1*) - ;; - freebsd* | dragonfly*) - case "$host_os" in - freebsd[123]*) - library_names_spec='$libname$shrext$versuffix' ;; - *) - library_names_spec='$libname$shrext' ;; - esac - ;; - gnu*) - library_names_spec='$libname$shrext' - ;; - hpux9* | hpux10* | hpux11*) - case $host_cpu in - ia64*) - shrext=.so - ;; - hppa*64*) - shrext=.sl - ;; - *) - shrext=.sl - ;; - esac - library_names_spec='$libname$shrext' - ;; - interix[3-9]*) - library_names_spec='$libname$shrext' - ;; - irix5* | irix6* | nonstopux*) - library_names_spec='$libname$shrext' - case "$host_os" in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; - *) libsuff= shlibsuff= ;; - esac - ;; - esac - ;; - linux*oldld* | linux*aout* | linux*coff*) - ;; - linux* | k*bsd*-gnu) - library_names_spec='$libname$shrext' - ;; - knetbsd*-gnu) - library_names_spec='$libname$shrext' - ;; - netbsd*) - library_names_spec='$libname$shrext' - ;; - newsos6) - library_names_spec='$libname$shrext' - ;; - nto-qnx*) - library_names_spec='$libname$shrext' - ;; - openbsd*) - library_names_spec='$libname$shrext$versuffix' - ;; - os2*) - libname_spec='$name' - shrext=.dll - library_names_spec='$libname.a' - ;; - osf3* | osf4* | osf5*) - library_names_spec='$libname$shrext' - ;; - rdos*) - ;; - solaris*) - library_names_spec='$libname$shrext' - ;; - sunos4*) - library_names_spec='$libname$shrext$versuffix' - ;; - sysv4 | sysv4.3*) - library_names_spec='$libname$shrext' - ;; - sysv4*MP*) - library_names_spec='$libname$shrext' - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - library_names_spec='$libname$shrext' - ;; - uts4*) - library_names_spec='$libname$shrext' - ;; -esac - -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` -shlibext=`echo "$shrext" | sed -e 's,^\.,,'` -escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` - -LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <1 -# e.g. Debian puts Mono in /usr/bin and libs in /usr/lib/x86_64-linux-gnu/ which is -# too deep for the old method to work -reloc_libdir=`realpath --relative-to=${prefix} ${libdir} 2> /dev/null || basename ${libdir}` -AC_SUBST(reloc_libdir) - -# Set to yes if Unix sockets cannot be created in an anonymous namespace -need_link_unlink=no - -#Set to extra linker flags to be passed to the runtime binaries (mono /mono-sgen) -extra_runtime_ldflags="" - -# Thread configuration inspired by sleepycat's db -AC_MSG_CHECKING([host platform characteristics]) - -libgc_threads=no -has_dtrace=no -parallel_mark=yes -ikvm_native=yes - -host_win32=no -target_win32=no -target_wasm=no -platform_android=no -platform_tizen=no -platform_ios=no -host_darwin=no -host_linux=no -build_darwin=no -host_sunos=no - -case "$host" in - wasm32*) - CFLAGS="$CFLAGS -D_REENTRANT -D_GNU_SOURCE -s WASM=1" - CPPFLAGS="$CPPFLAGS -D_REENTRANT -DUSE_MMAP -s WASM=1" - libgc_threads=pthreads - host_wasm=yes - # FIXME: - RID="osx-x64" - COREARCH="wasm32" - CORETARGETS="-p:TargetsUnix=true -p:TargetsOSX=true" - build_darwin=yes - ;; - *-mingw*|*-*-cygwin*) - AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer]) - AC_DEFINE(HOST_NO_SYMLINKS,1,[This platform does not support symlinks]) - host_win32=yes - mono_cv_clang=no - if test "x$cross_compiling" = "xno"; then - if test "x$host" = "x$build" -a "x$host" = "x$target"; then - target_win32=yes - fi - else - if test "x$host" = "x$target"; then - target_win32=yes - fi - fi - HOST_CC="gcc" - RID="win-x86" - CORETARGETS="-p:TargetsWindows=true" - COREARCH="x86" - # Boehm not supported on 64-bit Windows. - case "$host" in - x86_64-*-* | amd64-*-*) - with_gc=sgen - RID="win-x64" - COREARCH="x64" - ;; - esac - - # Windows 7 or later is required - WIN32_CPPFLAGS="-DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024" - CPPFLAGS="$CPPFLAGS $WIN32_CPPFLAGS" - WIN32_LDFLAGS="-lbcrypt -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32 -liphlpapi -static-libgcc" - LDFLAGS="$LDFLAGS $WIN32_LDFLAGS" - libmono_cflags="-mms-bitfields -mwindows" - libmono_ldflags="-mms-bitfields -mwindows" - libgc_threads=win32 - with_sigaltstack=no - with_tls=pthread - with_sgen_default_concurrent=yes - LN_S=cp - ;; - *-*-*netbsd*) - CPPFLAGS="$CPPFLAGS -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE" - libmono_cflags="-D_REENTRANT" - LDFLAGS="$LDFLAGS -pthread" - CPPFLAGS="$CPPFLAGS -DHOST_BSD" - libmono_ldflags="-pthread" - need_link_unlink=yes - libgc_threads=pthreads - with_sigaltstack=no - use_sigposix=yes - with_sgen_default_concurrent=yes - ;; - *-*-kfreebsd*-gnu) - CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP -DTHREAD_LOCAL_ALLOC -pthread" - libmono_cflags="-D_REENTRANT -DTHREAD_LOCAL_ALLOC -pthread" - libmono_ldflags="-lpthread -pthread" - libgc_threads=pthreads - need_link_unlink=yes - with_sigaltstack=no - use_sigposix=yes - with_sgen_default_concurrent=yes - ;; - *-*-*freebsd*) - dnl For close_my_fds - LDFLAGS="$LDFLAGS -lutil" - if test "x$PTHREAD_CFLAGS" = "x"; then - CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS" - libmono_cflags= - else - CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS" - libmono_cflags="$PTHREAD_CFLAGS" - fi - if test "x$PTHREAD_LIBS" = "x"; then - LDFLAGS="$LDFLAGS -pthread -L/usr/local/lib" - libmono_ldflags="-pthread" - else - LDFLAGS="$LDFLAGS $PTHREAD_LIBS -L/usr/local/lib" - libmono_ldflags="$PTHREAD_LIBS" - fi - CPPFLAGS="$CPPFLAGS -DHOST_BSD -D_WITH_GETLINE" - need_link_unlink=yes - AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread is a pointer]) - libgc_threads=pthreads - use_sigposix=yes - has_dtrace=yes - case "$host" in - aarch64-*) - support_boehm=no - with_gc=sgen - ;; - riscv*) - support_boehm=no - with_gc=sgen - ;; - esac - with_sgen_default_concurrent=yes - ;; - *-*-*openbsd*) - CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DHOST_BSD -D_REENTRANT -DUSE_MMAP" - LDFLAGS="${LDFLAGS} -Wl,-zwxneeded" - if test "x$disable_munmap" != "xyes"; then - CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP" - fi - libmono_cflags="-D_THREAD_SAFE -D_REENTRANT" - LDFLAGS="$LDFLAGS -pthread" - need_link_unlink=yes - AC_DEFINE(PTHREAD_POINTER_ID) - libgc_threads=pthreads - with_tls=pthread - with_sigaltstack=no - use_sigposix=yes - with_sgen_default_concurrent=yes - ;; - *-*-linux-android*) - platform_android=yes - AC_DEFINE(HOST_ANDROID,1,[Targeting the Android platform]) - AC_DEFINE(TARGET_ANDROID,1,[Targeting the Android platform]) - - CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP" - if test "x$disable_munmap" != "xyes"; then - CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP" - fi - libmono_cflags="-D_REENTRANT" - libgc_threads=pthreads - use_sigposix=yes - - with_tls=pthread - with_sigaltstack=no - with_static_mono=no - - # Android doesn't support boehm, as it's missing - support_boehm=no - with_gc=sgen - - # isinf(3) requires -lm - LDFLAGS="$LDFLAGS -lm" - - # Bionic's sets PTHREAD_STACK_MIN=2*PAGE_SIZE; doesn't define - # PAGE_SIZE; breaks mono/io-layer/collection.c - # Bionic doesn't provide S_IWRITE; breaks io-layer/io.c - CFLAGS="$CFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR" - CXXFLAGS="$CXXFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR" - - # FIXME? Only if __ANDROID_API__ < 24? - # FILE32API means "long", which is stuck at 32bits for 32bit ABI (64bits for 64bit ABI). - # ABI 24 introduces the "o" for "file offset" variations, which can be widened to 64bits for 32bit ABI (and still 64bits for 64bit). - # Android itself uses FILE32API, and mono should use system zlib on Android anyway. - ZLIB_CFLAGS="$ZLIB_CFLAGS -DUSE_FILE32API" - - # to bypass the underscore linker check, can't work when cross-compiling - mono_cv_uscore=yes - mono_cv_clang=no - ;; - *-*-linux*) - host_linux=yes - CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP" - if test "x$disable_munmap" != "xyes"; then - CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP" - fi - libmono_cflags="-D_REENTRANT" - libgc_threads=pthreads - CORETARGETS="-p:TargetsUnix=true" - use_sigposix=yes - if test "x$cross_compiling" != "xno"; then - # to bypass the underscore linker check, not - # available during cross-compilation - mono_cv_uscore=no - fi - case "$host" in - *-musl) - AC_DEFINE(MUSL, 1, [musl libc]) - ;; - esac - case "$host" in - *-tizen-linux-*) - platform_tizen=yes - ;; - esac - case "$host" in - ppc64-*) - RID="linux-ppc64" - ;; - ppc64le-*) - RID="linux-ppc64el" - ;; - mipsel-*) - RID="linux-mipsel" - ;; - x86-*) - RID="linux-x86" - COREARCH="x86" - ;; - x86_64-*) - RID="linux-x64" - COREARCH="x64" - ;; - arm-*) - # deal with this in the FPU detection section, since - # we cannot determine FPU from triplet and don't want - # to duplicate the logic - ;; - aarch64-*) - support_boehm=no - with_gc=sgen - RID="linux-arm64" - COREARCH="arm64" - ;; - powerpc*-*-linux*) - # https://bugzilla.novell.com/show_bug.cgi?id=504411 - disable_munmap=yes - ;; - powerpc*-*-freebsd*) - # https://bugzilla.novell.com/show_bug.cgi?id=504411 - disable_munmap=yes - ;; - riscv*) - support_boehm=no - with_gc=sgen - ;; - esac - with_sgen_default_concurrent=yes - ;; - *-*-nacl*) - echo "nacl no longer supported." - exit 1 - ;; - *-*-hpux*) - CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT" - # +ESdbgasm only valid on bundled cc on RISC - # silently ignored for ia64 - if test $GCC != "yes"; then - CFLAGS="$CFLAGS +ESdbgasm" - # Arrange for run-time dereferencing of null - # pointers to produce a SIGSEGV signal. - LDFLAGS="$LDFLAGS -z" - fi - CFLAGS="$CFLAGS +ESdbgasm" - LDFLAGS="$LDFLAGS -z" - libmono_cflags="-D_REENTRANT" - libmono_ldflags="-lpthread" - libgc_threads=pthreads - need_link_unlink=yes - use_sigposix=yes - ;; - *-*-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" - host_darwin=yes - target_mach=yes - CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_MACOSX_THREADS -DUSE_MMAP -DUSE_MUNMAP" - libmono_cflags="-D_THREAD_SAFE" - need_link_unlink=yes - AC_DEFINE(PTHREAD_POINTER_ID) - AC_DEFINE(USE_MACH_SEMA, 1, [...]) - CORETARGETS="-p:TargetsUnix=true -p:TargetsOSX=true" - libgc_threads=pthreads - has_dtrace=yes - if test "x$cross_compiling" = "xyes"; then - has_broken_apple_cpp=yes - fi - dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin*, but - dnl its gcc defaults to 64-bit mode. They have also deprecated the usage of ucontext - dnl we need to set some flags to build our 32-bit binaries on 10.6 properly - case "$host" in - dnl Snow Leopard and newer config.guess reports as this - i*86-*-darwin*) - BROKEN_DARWIN_FLAGS="-arch i386" - BROKEN_DARWIN_CPPFLAGS="" - CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_CPPFLAGS" - CFLAGS="$CFLAGS $BROKEN_DARWIN_FLAGS" - CXXFLAGS="$CXXFLAGS $BROKEN_DARWIN_FLAGS" - CCASFLAGS="$CCASFLAGS $BROKEN_DARWIN_FLAGS" - CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC $BROKEN_DARWIN_CPPFLAGS" - CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS" - with_sgen_default_concurrent=yes - RID="osx-x86" - COREARCH="x86" - ;; - x*64-*-darwin*) - with_sgen_default_concurrent=yes - RID="osx-x64" - COREARCH="x64" - ;; - arm*-darwin*) - platform_ios=yes - has_dtrace=no - ;; - aarch64*-darwin20*) - # OSX/arm64 - support_boehm=no - ;; - aarch64*-darwin*) - platform_ios=yes - ;; - esac - ;; - *-*-haiku*) - dnl BSD_SOURCE is for getifaddrs - CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE -D_REENTRANT -D_THREAD_SAFE" - libmono_cflags="-D_REENTRANT -D_THREAD_SAFE" - LIBS="$LIBS -lnetwork -ltextencoding" - need_link_unlink=yes - AC_DEFINE(PTHREAD_POINTER_ID) - dnl Haiku does not support static TLS with __thread - with_tls=pthread - libgc_threads=pthreads - use_sigposix=yes - with_sigaltstack=no - ;; - *-*-fuchsia*) - AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer]) - AC_DEFINE(HOST_FUCHSIA,1,[Targeting the Fuchsia platform]) - fuchsia=true - with_tls=pthread - with_sigaltstack=yes - with_static_mono=no - support_boehm=no - with_gc=sgen - mono_cv_uscore=yes - mono_cv_clang=no - ;; - *-*-aix*|*-*-os400*) - AC_DEFINE(HOST_AIX,1,[Targeting the AIX and PASE platforms]) - host_aix=yes - dnl IMPORTANT: For svr4 sonames on AIX, you should set - dnl `OBJECT_MODE=64` when configuring. - dnl libtool cannot generate functioning svr4 sonames on - dnl 64-bit without it. - dnl Unfortunately, everything is complicated by the fact that - dnl gcc doesn't respect this variable. (otherwise we could set - dnl it for build time for configure and make) - dnl On IBM i PASE using IBM's packages, GCC *does* respect this - dnl variable, and builds are 64-bit by default. svr4 sonames - dnl must still be specified when configuring on i, however. - dnl As such, because Mono doesn't support 32-bit AIX or PASE, - dnl set up a 64-bit build (assming GCC; XLC not supported) - dnl regardless of what variable is used. - case $host_os in - aix*) - if test "x$OBJECT_MODE" = "x64" && test "x$CC" = "x" && test "x$CXX" = "x"; then - dnl HACK: Set -maix64 at the GCC invocation - dnl level explicitly to work around the fact - dnl GCC in default maix32 mode explodes when - dnl binutils respects OBJECT_MODE. - dnl When that check occurs, flags are not - dnl passed to to the compiler, so GCC has no - dnl chance to change its mode. - dnl Otherwise, it may enter a state where it - dnl runs, but uses the libtool "compile" - dnl wrapper, which subtly breaks other things. - dnl This should propagate to all uses of CC. - dnl This is only set if not manually set. - CC="gcc -maix64" - CXX="g++ -maix64" - echo - fi - ;; - dnl Not needed on i because it defaults to 64-bit and - dnl has a GCC smart enough to respect OBJECT_MODE. - esac - dnl We still set this for *FLAGS, however, because we may not - dnl be setting OBJECT_MODE. - LDFLAGS="$LDFLAGS -maix64" - CPPFLAGS="$CPPFLAGS -maix64 -DGC_AIX_THREADS -D_ALL_SOURCE -pthread -D_THREAD_SAFE -D_LARGE_FILES -D_REENTRANT" - libmono_cflags="-pthread -D_THREAD_SAFE -D_REENTRANT" - dnl Would you believe GNU nm doesn't know how to process AIX libraries? - dnl Hardcode IBM binutils in case GNU ones end up on our path. Also - dnl specifiy 64-bit mode for tools. (OBJECT_MODE is finicky with cmake.) - dnl XXX: We should stop the hardcoding madness - AR="/usr/bin/ar -X64" - NM="/usr/bin/nm -X64" - STRIP="/usr/bin/strip -X64" - RANLIB="/usr/bin/ranlib -X64" - dnl SGen is the future (changes to Boehm support code would be - dnl required if you wish to re-enable Boehm) - support_boehm=no - with_gc=sgen - need_link_unlink=yes - use_sigposix=yes - dnl Similar limitation to macOS about the first thread and the - dnl guard page, except sometimes the runtime hangs. Disable for - dnl now until cause can be determined or it seems OK enough. - with_sigaltstack=no - dnl use pthread TLS, __thread has issues with the compiler flags we use - with_tls=pthread - dnl ppc Linux is the same? test further - disable_munmap=yes - RID="aix-ppc64" - CORETARGETS="-p:TargetsUnix=true" - ;; - *) - AC_MSG_WARN([*** Please add $host to configure.ac checks!]) - ;; -esac - -AC_MSG_RESULT(ok) - -if test x$need_link_unlink = xyes; then - AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace]) -fi - -if test x$host_win32 = xyes; then - AC_DEFINE(HOST_WIN32, 1, [Host Platform is Win32]) -fi - -if test x$target_win32 = xyes; then - AC_DEFINE(TARGET_WIN32, 1, [Target Platform is Win32]) -fi - -if test x$host_darwin = xyes; then - AC_DEFINE(HOST_DARWIN, 1, [Host Platform is Darwin]) -fi - -# Defined for all targets/platforms using classic Windows API support. -AC_DEFINE(HAVE_CLASSIC_WINAPI_SUPPORT, 1, [Use classic Windows API support]) -AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support]) - -AC_SUBST(extra_runtime_ldflags) -AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes) -AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes) -AM_CONDITIONAL(HOST_LINUX, echo x$target_os | grep -q linux) -AM_CONDITIONAL(HOST_DARWIN, test x$host_darwin = xyes) -AM_CONDITIONAL(HOST_SIGPOSIX, test x$use_sigposix = xyes) -AM_CONDITIONAL(HOST_ANDROID, test x$platform_android = xyes) -AM_CONDITIONAL(HOST_TIZEN, test x$platform_tizen = xyes) -AM_CONDITIONAL(HOST_IOS, test x$platform_ios = xyes) -AM_CONDITIONAL(HOST_WASM, test x$host_wasm = xyes) -AM_CONDITIONAL(HOST_AIX, test x$host_aix = xyes) - -if test -z "$HOST_DARWIN_TRUE"; then : -PLATFORM_AOT_SUFFIX=.dylib -PLATFORM_AOT_PREFIX=lib -fi - -if test -z "$HOST_LINUX_TRUE"; then : -PLATFORM_AOT_SUFFIX=.so -PLATFORM_AOT_PREFIX=lib -fi - -if test -z "$HOST_WIN32_TRUE"; then : -PLATFORM_AOT_SUFFIX=.dll -PLATFORM_AOT_PREFIX= -fi - -AC_SUBST(PLATFORM_AOT_SUFFIX) -AC_SUBST(PLATFORM_AOT_PREFIX) - -if test -z "$HOST_WASM_TRUE"; then : -AC_DEFINE(HAVE_UTIME) -AC_DEFINE(HAVE_UTIMES) -fi - -## PLATFORM_AOT_SUFFIX not so simple for windows :-) - -AC_CHECK_TOOL(CC, gcc, gcc) -AC_PROG_CC -AC_CHECK_TOOL(CXX, g++, g++) -AC_PROG_CXX -AM_PATH_PYTHON([3.2]) -AM_PROG_AS -AC_PROG_INSTALL -AC_PROG_AWK -AM_PROG_CC_C_O -dnl We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4 -: ${CCAS='$(CC)'} -# Set ASFLAGS if not already set. -: ${CCASFLAGS='$(CFLAGS)'} -AC_SUBST(CCAS) -AC_SUBST(CCASFLAGS) - -if test "x$CXX" = "xno"; then - AC_MSG_ERROR([No c++ compiler found. You need to install a c++ compiler]) -fi - -# AC_PROG_CXX helpfully sets CXX to g++ even if no c++ compiler is found so check -# GXX instead. See http://lists.gnu.org/archive/html/bug-autoconf/2002-04/msg00056.html -if test "x$CXX" = "xg++"; then - if test "x$GXX" != "xyes"; then - # automake/libtool is so broken, it requires g++ even if the c++ sources - # are inside automake conditionals - AC_MSG_ERROR([You need to install g++]) - fi -fi - -dnl may require a specific autoconf version -dnl AC_PROG_CC_FOR_BUILD -dnl CC_FOR_BUILD not automatically detected -CC_FOR_BUILD=$CC -CFLAGS_FOR_BUILD=$CFLAGS -BUILD_EXEEXT= -if test "x$cross_compiling" = "xyes"; then - CC_FOR_BUILD=cc - CFLAGS_FOR_BUILD= - BUILD_EXEEXT="" -fi -AC_SUBST(CC_FOR_BUILD) -AC_SUBST(CFLAGS_FOR_BUILD) -AC_SUBST(HOST_CC) -AC_SUBST(BUILD_EXEEXT) - -AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes]) -AM_CONDITIONAL(USE_BATCH_FILES, [test x$host_win32 = xyes -a x$cross_compiling = xyes]) - -# Set STDC_HEADERS -AC_HEADER_STDC -AC_LIBTOOL_WIN32_DLL -# This causes monodis to not link correctly -#AC_DISABLE_FAST_INSTALL - -#lookup makedev() header -AC_HEADER_MAJOR - -AM_PROG_LIBTOOL -# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building. -DOLT - -export_ldflags=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` -AC_SUBST(export_ldflags) - -# Test whenever ld supports -version-script -AC_PROG_LD -AC_PROG_LD_GNU - -AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h sys/sysctl.h libproc.h sys/prctl.h copyfile.h gnu/lib-names.h) -AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h arpa/inet.h complex.h unwind.h) - -# zlib/configure checks for unistd.h existence and defines HAVE_UNISTD_H on the compiler -# command line (not config.h) if it is present. -AC_CHECK_HEADER(unistd.h, - [HAVE_UNISTD_H=1 - ZLIB_CFLAGS="$ZLIB_CFLAGS -DHAVE_UNISTD_H"], - [HAVE_UNISTD_H=0]) - -AC_SUBST(HAVE_UNISTD_H) - -AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h], - [], [], [#include - #include - #include ]) - -AC_CHECK_HEADERS(sys/user.h, [], [], -[ -#ifdef HAVE_SYS_PARAM_H -# include -#endif -]) - -AC_CHECK_HEADERS(linux/serial.h) - -case "$host" in - # Use bundled zlib on Windows to be sure it is static. - *-mingw*|*-cygwin*) - have_sys_zlib=no - zlib_msg="bundled zlib" - ;; - # Use bundled zlib on RISC-V for now to make cross-compiling easier. - riscv*) - have_sys_zlib=no - zlib_msg="bundled zlib" - ;; - *) - AC_CHECK_HEADER(zlib.h, [have_sys_zlib=yes], [have_sys_zlib=no]) - if test x$have_sys_zlib = xyes; then - AC_TRY_COMPILE([#include ], [ - #if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230) - #else - #error No good zlib found - #endif - ],[ - AC_MSG_RESULT(Using system zlib) - zlib_msg="system zlib" - have_sys_zlib=yes - ],[ - AC_MSG_RESULT(zlib too old, using embedded zlib) - have_sys_zlib=no - zlib_msg="bundled zlib" - ]) - else - AC_MSG_RESULT(zlib not found, using embedded zlib) - have_sys_zlib=no - zlib_msg="bundled zlib" - fi - ;; -esac - -AC_ARG_WITH(static-zlib, [ --with-static-zlib=PATH use the specified static zlib instead of -lz],[STATIC_ZLIB_PATH=$with_static_zlib],[STATIC_ZLIB_PATH=]) -if test "x$STATIC_ZLIB_PATH" != "x"; then - have_static_zlib=yes - have_sys_zlib=no - zlib_msg="static zlib from $STATIC_ZLIB_PATH" - AC_SUBST(STATIC_ZLIB_PATH) -fi - -AM_CONDITIONAL(HAVE_STATIC_ZLIB, test x$have_static_zlib = xyes) -AM_CONDITIONAL(HAVE_SYS_ZLIB, test x$have_sys_zlib = xyes) -if test x$have_static_zlib = xyes; then - AC_DEFINE(HAVE_STATIC_ZLIB, 1, [Use static zlib]) -fi -if test x$have_sys_zlib = xyes; then - AC_DEFINE(HAVE_SYS_ZLIB, 1, [Use OS-provided zlib]) -fi -# for mono/metadata/debug-symfile.c -AC_CHECK_HEADERS(elf.h) - -# for perf jit dump support -AC_CHECK_HEADERS(sys/mman.h) -if test "x$host_linux" = "xyes" -a x$ac_cv_header_sys_mman_h = xyes -a x$ac_cv_header_elf_h = xyes -a x$ac_cv_header_sys_syscall_h = xyes; then - AC_DEFINE(ENABLE_JIT_DUMP, 1, [Enable jit dump support on Linux]) -fi - -# for support -AC_CHECK_HEADERS(poll.h) -AC_CHECK_HEADERS(sys/poll.h) -AC_CHECK_HEADERS(sys/wait.h) -AC_CHECK_HEADERS(grp.h) -AC_CHECK_HEADERS(syslog.h) -AC_CHECK_FUNCS(vsyslog) - -# for mono/dis -AC_CHECK_HEADERS(wchar.h) - -# for Linux statfs support -AC_CHECK_HEADERS(linux/magic.h) - -# For Android NDK unified headers -if test x$platform_android = xyes; then - AC_CHECK_HEADERS(machine/endian.h sys/endian.h) - AC_CHECK_HEADERS(android/legacy_signal_inlines.h, [have_android_signal_inlines=yes], [have_android_signal_inlines=no]) - AC_CHECK_HEADERS(android/ndk-version.h) - - # Make sure SIGRT{MIN,MAX} work - they will fail to work with unified headers if building for - # API level < 21 *and* android/legacy_signal_inlines.h doesn't declare (and define) the required - # libc APIs to obtain values for SIGRT{MIN,MAX}. We perform the check only if android/legacy_signal_inlines.h - # is found because in other cases the macros will either work (for NDK < 14) or fail if the legacy header - # doesn't contain the required definitions (NDK 14) - if test x$have_android_signal_inlines = xyes; then - AC_MSG_CHECKING([Whether Android SIGRTMIN/SGRTMAX macros are valid]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([#include - #include ],[ - int i; - for (i = SIGRTMIN + 1; i < SIGRTMAX; ++i) { - } - ])],[ - AC_MSG_RESULT(yes) - android_sigrtminmax_work=yes - ],[ - AC_MSG_RESULT(no) - android_sigrtminmax_work=no - ] - ) - - if test x$android_sigrtminmax_work = xno; then - AC_MSG_ERROR([Android SIGRTMIN/SIGRTMAX macros don't work in this NDK]) - fi - fi - - # Attempt to detect whether we're using Android NDK unified headers - AC_CHECK_HEADERS(android/api-level.h, [have_android_api_level=yes], [have_android_api_level=no]) - AC_CHECK_HEADERS(android/versioning.h, [have_android_versioning=yes], [have_android_versioning=no]) - - android_unified_headers=no - if test x$have_android_api_level = xyes; then - if test x$have_android_versioning = xyes; then - AC_MSG_CHECKING([whether using Android NDK unified headers]) - - # Both macros are defined only in the NDK unified headers - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([ - #include - #include - ],[ - #if __ANDROID_API_O__ == 26 && defined(__INTRODUCED_IN) - #else - #error __ANDROID_API_O__ != 26 or the __INTRODUCED_IN macro not defined - #endif - ])],[ - AC_MSG_RESULT(yes) - android_unified_headers=yes - ],[ - AC_MSG_RESULT(no) - android_unified_headers=no - ] - ) - fi - fi - - if test x$android_unified_headers = xyes; then - AC_DEFINE(ANDROID_UNIFIED_HEADERS, 1, [Whether Android NDK unified headers are used]) - fi -fi # Android - -# not 64 bit clean in cross-compile -AC_CHECK_SIZEOF(void *) -AC_CHECK_SIZEOF(long) - -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long long) - -AC_CACHE_CHECK([for clang], - mono_cv_clang,[ - AC_TRY_COMPILE([], [ - #ifdef __clang__ - #else - #error "FAILED" - #endif - ], - [mono_cv_clang=yes], - [mono_cv_clang=no], - []) -]) - -AC_ARG_ENABLE(visibility-hidden, -[ --disable-visibility-hidden disable usage of -fvisiblity=hidden], - disable_visibility_hidden=yes, disable_visibility_hidden=no) - -WARN='' -if test x"$GCC" = xyes; then - WARN='-Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes' - CFLAGS="$CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length -Wc++-compat" - - # We require C99 with some GNU extensions, e.g. `linux` macro - CFLAGS="$CFLAGS -std=gnu99" - - # The runtime code does not respect ANSI C strict aliasing rules - CFLAGS="$CFLAGS -fno-strict-aliasing" - - # We rely on signed overflow to behave - CFLAGS="$CFLAGS -fwrapv" - - CFLAGS="$CFLAGS -DMONO_DLL_EXPORT" - if test x"$disable_visibility_hidden" = xno; then - # Don't export any symbols by default - SHARED_CFLAGS="-fvisibility=hidden" - CXXFLAGS="$CXXFLAGS -fvisibility=hidden" - fi - - ORIG_CFLAGS=$CFLAGS - # Check for the normal version, since gcc ignores unknown -Wno options - CFLAGS="$CFLAGS -Wunused-but-set-variable -Werror" - AC_MSG_CHECKING(for -Wno-unused-but-set-variable option to gcc) - AC_TRY_COMPILE([],[ - ], [ - AC_MSG_RESULT(yes) - CFLAGS="$ORIG_CFLAGS -Wno-unused-but-set-variable" - ], [ - AC_MSG_RESULT(no) - CFLAGS=$ORIG_CFLAGS - ]) - - if test "x$mono_cv_clang" = "xyes"; then - # https://bugzilla.samba.org/show_bug.cgi?id=8118 - WARN="$WARN -Qunused-arguments" - WARN="$WARN -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Wno-return-stack-address -Wno-constant-logical-operand" - # We rely on zero length arrays in structs - WARN="$WARN -Wno-zero-length-array" - fi -else - # The Sun Forte compiler complains about inline functions that access static variables - # so disable all inlining. - case "$host" in - *-*-solaris*) - CFLAGS="$CFLAGS -Dinline=" - ;; - esac -fi -CFLAGS="$WARN $CFLAGS -g" -CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -g" -CPPFLAGS="$WARN $CPPFLAGS -g" - -# Where's the 'mcs' source tree? -if test -d $srcdir/mcs; then - mcsdir=mcs -else - mcsdir=../mcs -fi - -AC_ARG_WITH(mcs-path, [ --with-mcs-path=/path/to/mcs Specify an alternate mcs source tree], - if test x$with_mcs_path != "x" -a -d $with_mcs_path ; then - mcsdir=$with_mcs_path - fi -) - -AC_ARG_WITH(jumptables, [ --with-jumptables=yes,no enable/disable support for jumptables (ARM-only for now) (defaults to no)],[],[with_jumptables=no]) - -AC_ARG_WITH(core, [ --with-core=only controls whether to build Mono as a .NET Core runtime (defaults to no)],[],[with_core=no]) -if test x$with_core = xonly; then - AC_DEFINE(ENABLE_NETCORE,1,[Enables the support for .NET Core Features in the MonoVM]) - with_runtime_preset=netcore -fi -AM_CONDITIONAL(ENABLE_NETCORE, test x$with_core = xonly) - -# -# A sanity check to catch cases where the package was unpacked -# with an ancient tar program (Solaris) -# -AC_ARG_ENABLE(solaris-tar-check, -[ --disable-solaris-tar-check disable solaris tar check], - do_solaris_tar_check=no, do_solaris_tar_check=yes) - -if test x"$do_solaris_tar_check" = xyes -a x"$enable_solaris_tar_check" = xyes; then - AC_MSG_CHECKING(integrity of package) - if test -f $mcsdir/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs - then - AC_MSG_RESULT(ok) - else - errorm="Your mono distribution is incomplete; if unpacking from a tar file, make sure you use GNU tar; see http://www.mono-project.com/IncompletePackage for more details" - AC_MSG_ERROR([$errorm]) - fi -fi - -if test "x$with_mcs_path" != "x"; then -mcs_topdir=$(cd "$mcsdir" && pwd) -mcs_topdir_from_srcdir=$mcs_topdir -else -mcs_topdir=$(cd "$srcdir/$mcsdir" && pwd) -mcs_topdir_from_srcdir='$(top_builddir)'/$mcsdir -fi - -# Convert mcs_topdir* paths to Windows syntax. -if test x$cross_compiling$host_win32 = xnoyes; then - mcs_topdir=$(cygpath -m $mcs_topdir) - case $mcs_topdir_from_srcdir in - /cygdrive/*) - mcs_topdir_from_srcdir=$(cygpath -m $mcs_topdir_from_srcdir) - ;; - esac -fi - -AC_SUBST([mcs_topdir]) -AC_SUBST([mcs_topdir_from_srcdir]) - -# gettext: prepare the translation directories. -# we do not configure the full gettext, as we consume it dynamically from C# -AM_PO_SUBDIRS - -if test "x$USE_NLS" = "xyes"; then - AC_CHECK_PROG(HAVE_MSGFMT, msgfmt,yes,no) - - if test "x$HAVE_MSGFMT" = "xno"; then - AC_MSG_ERROR([msgfmt not found. You need to install the 'gettext' package, or pass --enable-nls=no to configure.]) - fi -fi - -AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - -pkg_config_path= -AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Change pkg-config dir to custom dir], - if test x$with_crosspkgdir = "x"; then - if test -s $PKG_CONFIG_PATH; then - pkg_config_path=$PKG_CONFIG_PATH - fi - else - pkg_config_path=$with_crosspkgdir - PKG_CONFIG_PATH=$pkg_config_path - export PKG_CONFIG_PATH - fi -) - -AC_ARG_ENABLE(ninja,[ --enable-ninja Enable using ninja where available], enable_ninja=$enableval) -AC_CHECK_PROG(HAVE_NINJA, ninja, yes, no) -AM_CONDITIONAL(NINJA, test x$enable_ninja = xyes -a x$HAVE_NINJA != xno) - -AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no) -if test x$werror_flag = xyes; then - SHARED_CFLAGS="$SHARED_CFLAGS -Werror" -fi -AC_SUBST([SHARED_CFLAGS]) - -GLIB_CFLAGS='-I$(top_srcdir)/mono/eglib -I$(top_builddir)/mono/eglib' - -AC_SUBST(GLIB_CFLAGS) - -# Enable support for fast thread-local storage -# Some systems have broken support, so we allow to disable it. -AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage implementation (defaults to __thread)],[],[with_tls=__thread]) - -# Enable support for using sigaltstack for SIGSEGV and stack overflow handling -# This does not work on some platforms (bug #55253) -AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack (defaults to yes)],[],[with_sigaltstack=yes]) - -AC_ARG_WITH(static_mono, [ --with-static_mono=yes,no link mono statically to libmono (faster) (defaults to yes)],[],[with_static_mono=yes]) -AC_ARG_WITH(shared_mono, [ --with-shared_mono=yes,no build a shared libmono library (defaults to yes)],[],[with_shared_mono=yes]) -# Same as --with-shared_mono=no -AC_ARG_ENABLE(libraries, [ --disable-libraries disable the build of libmono], enable_libraries=$enableval, enable_libraries=yes) - -if test "x$enable_static" = "xno"; then - with_static_mono=no -fi - -if test "x$enable_shared" = "xno"; then - with_shared_mono=no -fi - -if test "x$enable_libraries" = "xno"; then - with_shared_mono=no -fi - -AM_CONDITIONAL(DISABLE_LIBRARIES, test x$enable_libraries = xno) - -if test "x$host_win32" = "xyes"; then - # Boehm GC requires the runtime to be in its own dll - with_static_mono=no -fi - -AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno) -AM_CONDITIONAL(SHARED_MONO, test x$with_shared_mono != xno) -AC_ARG_ENABLE(mcs-build, [ --disable-mcs-build disable the build of the mcs directory], try_mcs_build=$enableval, enable_mcs_build=yes) -AC_ARG_ENABLE(support-build, [ --disable-support-build disable the build of the support directory], try_support_build=$enableval, enable_support_build=yes) - -AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes]) -if test "x$with_xen_opt" = "xyes" -a "x$mono_cv_clang" = "xno"; then - AC_DEFINE(MONO_XEN_OPT, 1, [Xen-specific behaviour]) - ORIG_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -mno-tls-direct-seg-refs" - AC_MSG_CHECKING(for -mno-tls-direct-seg-refs option to gcc) - AC_TRY_COMPILE([], [ - ], [ - AC_MSG_RESULT(yes) - # Pass it to libgc as well - CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -mno-tls-direct-seg-refs" - ], [ - AC_MSG_RESULT(no) - CFLAGS=$ORIG_CFLAGS - ]) -fi - -AC_ARG_ENABLE(small-config, [ --enable-small-config Enable tweaks to reduce requirements (and capabilities)], enable_small_config=$enableval, enable_small_config=no) - -if test x$enable_small_config = xyes; then - AC_DEFINE(MONO_SMALL_CONFIG,1,[Reduce runtime requirements (and capabilities)]) - CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DSMALL_CONFIG" -fi - -AC_ARG_ENABLE(system-aot, [ --enable-system-aot Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=default) - -DISABLED_FEATURES=none -csc_compiler=default -endian=unknown -AC_C_BIGENDIAN([endian=big],[endian=little],[endian=unknown]) -AC_MSG_CHECKING([CSharp compiler to use]) -AC_ARG_WITH(csc, [ --with-csc=mcs,roslyn,default Configures the CSharp compiler to use],[ - if test x$withval = xmcs; then - csc_compiler=mcs - elif test x$withval = xroslyn; then - csc_compiler=roslyn - elif test x$withval = xdefault; then - : - else - AC_MSG_ERROR([You must supply one of "mcs", "roslyn" or "default" to the --with-csc option]) - fi -],[csc_compiler=default]) - -if test $csc_compiler = default; then - if test $endian = big; then - case "$host" in - s390x*) csc_compiler=roslyn ;; - *) csc_compiler=mcs - esac - elif test $endian = little; then - case "$host" in - powerpc*) csc_compiler=mcs ;; - *) csc_compiler=roslyn ;; - esac - else - csc_compiler=mcs - fi -fi -AC_MSG_RESULT($csc_compiler) - -AC_ARG_WITH(jemalloc, [ --with-jemalloc=yes,no If jemalloc is enabled (defaults to no)], [], [with_jemalloc=no]) -AC_ARG_WITH(jemalloc-always, [ --with-jemalloc_always=yes,no If jemalloc is enabled and always used (defaults to yes)], [], [with_jemalloc_always=no]) -AC_ARG_WITH(jemalloc-assert, [ --with-jemalloc_assert=yes,no If jemalloc performs runtime checks for memory correctness (defaults to no)], [], [with_jemalloc_assert=no]) - - -if test x$target_win32 = xyes; then -with_jemalloc=no -with_jemalloc_assert=no -with_jemalloc_always=no -fi - -AM_CONDITIONAL(MONO_JEMALLOC_ASSERT, [test "x$with_jemalloc_assert" = "xyes"]) -if test "x$with_jemalloc_assert" = "xyes"; then -JEMALLOC_CFLAGS+=" -DMONO_JEMALLOC_ASSERT" -AC_DEFINE(MONO_JEMALLOC_ASSERT, 1, [Make jemalloc assert for mono]) -AC_SUBST(MONO_JEMALLOC_ASSERT, 1) -fi - -AM_CONDITIONAL(MONO_JEMALLOC_DEFAULT, [test "x$with_jemalloc_always" = "xyes"]) -if test "x$with_jemalloc_always" = "xyes"; then -with_jemalloc=yes -JEMALLOC_CFLAGS+=" -DMONO_JEMALLOC_DEFAULT" -AC_DEFINE(MONO_JEMALLOC_DEFAULT, 1, [Make jemalloc default for mono]) -AC_SUBST(MONO_JEMALLOC_DEFAULT, 1) -fi - -AM_CONDITIONAL(MONO_JEMALLOC_ENABLED, [test "x$with_jemalloc" = "xyes"]) -if test "x$with_jemalloc" = "xyes"; then -JEMALLOC_LDFLAGS="-L`pwd`/mono/utils/jemalloc/jemalloc/lib -ljemalloc_pic" -JEMALLOC_CFLAGS+=" -DMONO_JEMALLOC_ENABLED -I `pwd`/mono/utils/jemalloc/jemalloc/include" -JEMALLOC_AUTOCONF_FLAGS=" --build=$target --host=$host" - -if test "x$target_mach" = "xyes"; then - JEMALLOC_CPPFLAGS=" -stdlib=libc++ " -fi - -AC_DEFINE(MONO_JEMALLOC_ENABLED, 1, [Enable jemalloc usage for mono]) -AC_SUBST(MONO_JEMALLOC_ENABLED, 1) - -AC_SUBST(JEMALLOC_CFLAGS) -AC_SUBST(JEMALLOC_CPPFLAGS) -AC_SUBST(JEMALLOC_LDFLAGS) -AC_SUBST(JEMALLOC_AUTOCONF_FLAGS) -fi - -# Terminology: -# Crash privacy - Attempts to not send identifying information in the crash dump / to protect the obscurity of the program control flow -# MERP - The MS telemetry profile. Not for general use. -# Structured crashes - crashes at runtime that trigger a stack walk by mono that happens cooperatively - -# Structured crashes are not merp crashes. Structured crashes are json dumps made by mono during crashes. Merp upload is going to use the dumping code is a very specific way, and is enabled at runtime with an icall. - -#--with-crash_privacy=yes --with-structured_crashes=no means we don't wanna dump in non-merp-enabled builds, and we want to not send symbol strings. This is going to be the default pair of settings for VS4Mac. -#--with-crash_privacy=yes --with-structured_crashes=yes means you want to see crashes on your console, and you want to not see unmanaged symbol names. This is an option for proprietary apps that have manual bugs filed. -#--with-crash_privacy=no --with-structured_crashes=no means you want to see no crash dumps on failure and you don't care about privacy. This is how you'd set a "don't want it, don't care" configuration. -#--with-crash_privacy=no --with-structured_crashes=yes means you want full crashes and you want to see them in the terminal, not on telemetry. This is going to be how we build for CI. - -AC_ARG_WITH(crash-privacy, [ --with-crash_privacy=yes,no If you want your crashes to not include names of symbols present in the binary. ], [], [with_crash_privacy=yes]) -AC_ARG_WITH(structured-crashes, [ --with-structured_crashes=yes,no If you want your unmanaged crashes to result in a small crash dump file. ], [], [with_structured_crashes=yes]) -AC_ARG_ENABLE(crash-reporting, [ --disable-crash-reporting Enable or Disable crash reporting subsystem], [crash_reporting=$enableval], [crash_reporting=yes]) - -if test "x$with_crash_privacy" = "xyes"; then -AC_DEFINE(MONO_PRIVATE_CRASHES,1,[Do not include names of unmanaged functions in the crash dump]) -fi - -if test "x$with_structured_crashes" = "xno"; then -AC_DEFINE(DISABLE_STRUCTURED_CRASH,1,[Do not create structured crash files during unmanaged crashes]) -fi - -case "$host" in - *-mingw*|*-*-cygwin*) - crash_reporting=no - ;; -esac - -if test "x$crash_reporting" != "xyes"; then -CFLAGS="$CFLAGS -DDISABLE_CRASH_REPORTING=1" -CXXFLAGS="$CXXFLAGS -DDISABLE_CRASH_REPORTING=1" -fi -AM_CONDITIONAL(DISABLE_CRASH_REPORTING, test x$crash_reporting != xyes) - -AC_ARG_ENABLE(monodroid, [ --enable-monodroid Enable runtime support for Monodroid (Xamarin.Android)], enable_monodroid=$enableval, enable_monodroid=no) -AM_CONDITIONAL(ENABLE_MONODROID, test x$enable_monodroid = xyes) - -AC_ARG_ENABLE(monotouch, [ --enable-monotouch Enable runtime support for Monotouch (Xamarin.iOS and Xamarin.Mac)], enable_monotouch=$enableval, enable_monotouch=no) -AM_CONDITIONAL(ENABLE_MONOTOUCH, test x$enable_monotouch = xyes) - -if test x$enable_monodroid = xyes; then - AC_DEFINE(ENABLE_MONODROID, 1, [Enable runtime support for Monodroid (Xamarin.Android)]) -fi - -if test x$enable_monotouch = xyes; then - AC_DEFINE(ENABLE_MONOTOUCH, 1, [Enable runtime support for Monotouch (Xamarin.iOS and Xamarin.Mac)]) -fi - -AC_ARG_ENABLE(cxx, [ --enable-cxx compile some code as C++]) -AM_CONDITIONAL(ENABLE_CXX, test x$enable_cxx = xyes) - -# mono/corefx/native has a lot of invalid C++98 in its headers -# dotnet/corefx/native looks a lot better, i.e. 44e5bdafb8d989a220c9cf1b94f31a64a6e4f052 -# use these C99 print macros in the command line, since glib may not win first inttypes include -#CXXFLAGS_COMMON=' -std=gnu++98 -fno-exceptions -fno-rtti ' -CXXFLAGS_COMMON=' -std=gnu++0x -fno-exceptions -fno-rtti ' -CXXFLAGS_COMMON="$CXXFLAGS_COMMON -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS" -# "c++0x" instead of C++11, for compat with Centos6/gcc4.4 - -# -stdlib=libc++ is needed by clang for iOS 6.0 (-miphoneos-version-min=6.0) -# to support C++11 headers but it does not seem to harm elsewhere, so over-approximate -# and add it whenever we're running clang on Darwin. -if test "x$mono_cv_clang" = xyes -a x$host_darwin = xyes; then - CXXFLAGS_COMMON="$CXXFLAGS_COMMON -stdlib=libc++" -fi - -AC_SUBST(CXXFLAGS_COMMON) - -if test "x$enable_cxx" = "xyes"; then - - CXX_ADD_CFLAGS=" -xc++ $CXXFLAGS_COMMON " - - # -std=gnu99 -xc++ is not allowed and errors. - CXX_REMOVE_CFLAGS=-std=gnu99 - # These give warnings and should be removed. They are C-only. - # i.e. C++ never allows these, they are always errors and their warningness is not controllable. - CXX_REMOVE_CFLAGS="$CXX_REMOVE_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wc++-compat" - # Likewise with CentOS 6 gcc 4.4. - CXX_REMOVE_CFLAGS="$CXX_REMOVE_CFLAGS -Werror-implicit-function-declaration" - - # The C-only-ness of -Wno-format-zero-length varies with gcc version. - # It is C-only prior to 4.7. Using it with C++ prior to 4.7 - # generates a warning every time we run gcc which is very unsightly. - # The warning is for e.g. sprintf(foo, "") which can just be - # foo[0] = 0 but Mono's use is more elaborate, not as easy to "fix", - # and completely legal and valid. - # We have to switch to C++ and not just use -xc++ because of -std=gnu99 (error when combined with -xc++). - # Alternatively, just run $CXX -xc++ -c /dev/null. - AC_LANG_PUSH(C++) - ORIG_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror -Wno-format-zero-length -xc++ " - AC_MSG_CHECKING(or C-only-ness of -Wno-format-zero-length) - AC_TRY_COMPILE([ ], [ ], [ AC_MSG_RESULT(yes) ], - [ AC_MSG_RESULT(no) - CXX_REMOVE_CFLAGS="$CXX_REMOVE_CFLAGS -Wno-format-zero-length" ]) - CXXFLAGS=$ORIG_CXXFLAGS - AC_LANG_POP(C++) -fi -AC_SUBST(CXX_ADD_CFLAGS) -AC_SUBST(CXX_REMOVE_CFLAGS) - -# -# Set the build profiles and options before things which use them -# - -AC_ARG_WITH(profile4_x, [ --with-profile4_x=yes,no If you want to install the 4.x FX (defaults to yes)], [], [with_profile4_x=default]) -AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid assemblies (defaults to no)], [], [with_monodroid=default]) -AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the Xamarin.iOS assemblies (defaults to no)], [], [with_monotouch=default]) -AC_ARG_WITH(monotouch_watch, [ --with-monotouch_watch=yes,no If you want to build the Xamarin.WatchOS assemblies (defaults to no)], [], [with_monotouch_watch=default]) -AC_ARG_WITH(monotouch_tv, [ --with-monotouch_tv=yes,no If you want to build the Xamarin.TVOS assemblies (defaults to no)], [], [with_monotouch_tv=default]) -AC_ARG_WITH(bitcode, [ --with-bitcode=yes,no If bitcode is enabled (defaults to no)], [], [with_bitcode=default]) -AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you want to build the Xamarin.Mac assemblies (defaults to no)], [], [with_xammac=default]) -AC_ARG_WITH(testing_aot_full_interp, [ --with-testing_aot_full_interp=yes,no If you want to build the testing_aot_full_interp assemblies (defaults to no)], [], [with_testing_aot_full_interp=default]) -AC_ARG_WITH(testing_aot_hybrid, [ --with-testing_aot_hybrid=yes,no If you want to build the testing_aot_hybrid assemblies (defaults to no)], [], [with_testing_aot_hybrid=default]) -AC_ARG_WITH(testing_aot_full, [ --with-testing_aot_full=yes,no If you want to build the testing_aot_full assemblies (defaults to no)], [], [with_testing_aot_full=default]) -AC_ARG_WITH(winaot, [ --with-winaot=yes,no If you want to build the Windows friendly AOT assemblies (defaults to no)], [], [with_winaot=default]) -AC_ARG_WITH(testing_winaot_interp, [ --with-testing_winaot_interp=yes,no If you want to build the Windows friendly AOT + Interpreter testing assemblies (defaults to no)], [], [with_testing_winaot_interp=default]) -AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default]) -AC_ARG_WITH(unreal, [ --with-unreal=yes,no If you want to build the Unreal assemblies (defaults to no)], [], [with_unreal=default]) -AC_ARG_WITH(wasm, [ --with-wasm=yes,no If you want to build the WebAssembly (defaults to no)], [], [with_wasm=default]) - - -AC_ARG_WITH(runtime-preset, [ --with-runtime-preset=net_4_x,all,aot,aot_llvm,hybridaot,hybridaot_llvm,fullaot,fullaot_llvm,winaot,winaotinterp,winaot_llvm,winaotinterp_llvm,bitcode,bitcodeinterp,unreal,fullaotinterp,fullaotinterp_llvm Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x]) -AC_ARG_WITH(spectre-mitigation, [ --with-spectre-mitigation=yes,no If you want to build the runtime with compiler flags that enable Spectre mitigation (defaults to no)], [], [with_spectre_mitigation=default]) -AC_ARG_WITH(spectre-indirect-branch-choice, [ --with-spectre-indirect-branch-choice=keep,thunk,inline,extern Convert indirect branches to the specified kind of thunk (defaults to inline)], [], [with_spectre_indirect_branch_choice=inline]) -AC_ARG_WITH(spectre-function-return-choice, [ --with-spectre-function-return-choice=keep,thunk,inline,extern Convert function return instructions to the specified kind of thunk (defaults to inline)], [], [with_spectre_function_return_choice=inline]) - -AC_ARG_WITH(static_icu, [ --with-static-icu=yes|no Integrate ICU statically into the runtime (defaults to no)],[ - if test x$with_static_icu = xyes ; then - AC_DEFINE(STATIC_ICU,1,[Integrate ICU statically into the runtime.]) - fi -], [with_static_icu=no]) - -dnl -dnl Spectre compiler mitigation flag checks -dnl -if test "x$with_spectre_mitigation" = "xyes"; then - AC_MSG_NOTICE([Compiler Spectre mitigation support checks]) - SPECTRE_CFLAGS= - SPECTRE_INDIRECT_BRANCH_KIND= - case "x$with_spectre_indirect_branch_choice" in - xkeep) SPECTRE_INDIRECT_BRANCH_KIND=keep ;; - xthunk) SPECTRE_INDIRECT_BRANCH_KIND=thunk ;; - xinline) SPECTRE_INDIRECT_BRANCH_KIND=thunk-inline ;; - xextern) SPECTRE_INDIRECT_BRANCH_KIND=thunk-extern ;; - *) AC_MSG_ERROR([Invalid indirect jump thunk kind ($with_spectre_indirect_branch_choice)]) ;; - esac - - SPECTRE_FUNCTION_RETURN_KIND="" - case "x$with_spectre_function_return_choice" in - xkeep) SPECTRE_FUNCTION_RETURN_KIND=keep ;; - xthunk) SPECTRE_FUNCTION_RETURN_KIND=thunk ;; - xinline) SPECTRE_FUNCTION_RETURN_KIND=thunk-inline ;; - xextern) SPECTRE_FUNCTION_RETURN_KIND=thunk-extern ;; - *) AC_MSG_ERROR([Invalid function return thunk kind ($with_spectre_function_return_choice)]) ;; - esac - - AX_CHECK_COMPILE_FLAG( - [ -mindirect-branch=$SPECTRE_INDIRECT_BRANCH_KIND ], - [ SPECTRE_CFLAGS="$SPECTRE_CFLAGS -mindirect-branch=$SPECTRE_INDIRECT_BRANCH_KIND" ] - ) - - AX_CHECK_COMPILE_FLAG( - [ -mfunction-return=$SPECTRE_FUNCTION_RETURN_KIND ], - [ SPECTRE_CFLAGS="$SPECTRE_CFLAGS -mfunction-return=$SPECTRE_FUNCTION_RETURN_KIND" ] - ) - - if test "x$SPECTRE_CFLAGS" != "x" ; then - CFLAGS="$CFLAGS $SPECTRE_CFLAGS" - CXXFLAGS="$CXXFLAGS $SPECTRE_CFLAGS" - spectre_mitigation_status="mitigation enabled" - fi -else - spectre_mitigation_status="no mitigation" -fi - -dnl -dnl Profile defaults -dnl -TEST_PROFILE=default -enable_llvm_default=no - -with_profile4_x_default=no -with_monodroid_default=no -with_monotouch_default=no -with_monotouch_watch_default=no -with_monotouch_tv_default=no -with_xammac_default=no -with_testing_aot_full_interp_default=no -with_testing_aot_hybrid_default=no -with_testing_aot_full_default=no -with_winaot_default=no -with_testing_winaot_interp_default=no -with_orbis_default=no -with_unreal_default=no -with_wasm_default=no - -with_bitcode_default=no -enable_cooperative_suspend_default=no -enable_hybrid_suspend_default=no - -# For the sake of clearer error messages, these numbers should all be different from each other. -INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=10000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4400,nftnptr-arg-trampolines=4000,nrgctx-trampolines=21000 - -AOT_BUILD_ATTRS=$INVARIANT_AOT_OPTIONS - -MONO_LLVM_PATH_OPTION=llvm-path="`pwd`/llvm/usr/bin" - -if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then - DISABLE_MCS_DOCS_default=yes -fi - -if test x$with_runtime_preset = xnetcore; then - # Keep in sync with winconfig.h netcore configuration. - DISABLE_MCS_DOCS_default=yes - BTLS_SUPPORTED=no - enable_mcs_build=no - enable_support_build=no - - mono_feature_disable_remoting='yes' - mono_feature_disable_reflection_emit_save='yes' - mono_feature_disable_appdomains='yes' - mono_feature_disable_cleanup='yes' - mono_feature_disable_assembly_remapping='yes' - mono_feature_disable_security='yes' - mono_feature_disable_mdb='yes' - mono_feature_disable_com='yes' - mono_feature_disable_gac='yes' - mono_feature_disable_perfcounters='yes' - mono_feature_disable_attach='yes' - mono_feature_disable_cfgdir_config='yes' - if test "x$enable_monodroid" = "xno" -a "x$enable_monotouch" = "xno"; then - mono_feature_disable_dllmap='yes' # FIXME: the mobile products use this - fi - disable_mono_native=yes - support_boehm=no -elif test x$with_runtime_preset = xnet_4_x; then - with_profile4_x_default=yes - TEST_PROFILE=net_4_x -elif test x$with_runtime_preset = xall; then - with_profile4_x_default=yes - with_monodroid_default=yes - with_monotouch_default=yes - with_monotouch_watch_default=yes - with_monotouch_tv_default=yes - with_xammac_default=yes - with_winaot_default=yes - with_testing_winaot_interp_default=yes - with_orbis_default=yes - with_unreal_default=yes - with_wasm_default=yes - with_testing_aot_full_interp_default=yes - with_testing_aot_hybrid_default=yes - with_testing_aot_full_default=yes - TEST_PROFILE=net_4_x -elif test x$with_runtime_preset = xbitcode; then - DISABLE_MCS_DOCS_default=yes - with_testing_aot_full_default=yes - with_bitcode_default=yes - enable_cooperative_suspend_default=yes - # FIXME: use TEST_PROFILE=testing_aot_full - TEST_PROFILE=testing_aot_bitcode - PLATFORM_TEST_HARNESS_EXCLUDES=BitcodeNotSupported - enable_llvm_default=yes - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_reflection_emit_save='yes' - mono_feature_disable_reflection_emit='yes' - mono_feature_disable_appdomains='yes' - - # We need at least clang++-6.0 to read the LLVM IR produced by the runtime - AOT_BUILD_FLAGS="--runtime=mobile --aot=llvmonly,clangxx=clang++-6.0,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --llvmonly" - AOT_MODE="llvmonly" -elif test x$with_runtime_preset = xbitcodeinterp; then - with_testing_aot_full_interp_default=yes - with_bitcode_default=yes - enable_cooperative_suspend_default=yes - # FIXME: use TEST_PROFILE=testing_aot_full_interp - TEST_PROFILE=testing_aot_bitcode_interp - PLATFORM_TEST_HARNESS_EXCLUDES=BitcodeNotSupported - enable_llvm_default=yes - - # mscorlib.dll aot compilation crashes - mono_feature_disable_com='yes' - - # We need at least clang++-6.0 to read the LLVM IR produced by the runtime - AOT_BUILD_FLAGS="--aot=llvmonly,interp,clangxx=clang++-6.0,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--llvmonly-interp" -elif test x$with_runtime_preset = xfullaot; then - DISABLE_MCS_DOCS_default=yes - with_testing_aot_full_default=yes - TEST_PROFILE=testing_aot_full - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_reflection_emit_save='yes' - mono_feature_disable_reflection_emit='yes' - mono_feature_disable_appdomains='yes' - - AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --aot=full,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --full-aot" - AOT_MODE="full" -elif test x$with_runtime_preset = xfullaot_llvm; then - DISABLE_MCS_DOCS_default=yes - with_testing_aot_full_default=yes - TEST_PROFILE=testing_aot_full - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_reflection_emit_save='yes' - mono_feature_disable_reflection_emit='yes' - mono_feature_disable_appdomains='yes' - - AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --llvm --aot=full,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --full-aot" - AOT_MODE="full" -elif test x$with_runtime_preset = xhybridaot; then - DISABLE_MCS_DOCS_default=yes - with_testing_aot_hybrid_default=yes - TEST_PROFILE=testing_aot_hybrid - - AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot" -elif test x$with_runtime_preset = xhybridaot_llvm; then - DISABLE_MCS_DOCS_default=yes - with_testing_aot_hybrid_default=yes - TEST_PROFILE=testing_aot_hybrid - - AOT_BUILD_FLAGS="--runtime=mobile --llvm --aot=hybrid,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot" -elif test x$with_runtime_preset = xfullaotinterp; then - with_testing_aot_full_interp_default=yes - TEST_PROFILE=testing_aot_full_interp - - # mscorlib.dll aot compilation crashes - mono_feature_disable_com='yes' - - AOT_BUILD_FLAGS="--aot=full,interp,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--full-aot-interp" -elif test x$with_runtime_preset = xfullaotinterp_llvm; then - with_testing_aot_full_interp_default=yes - TEST_PROFILE=testing_aot_full_interp - - # mscorlib.dll aot compilation crashes - mono_feature_disable_com='yes' - - AOT_BUILD_FLAGS="-O=gsharedvt --llvm --aot=full,interp,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--full-aot-interp" -elif test x$with_runtime_preset = xaot; then - with_profile4_x_default=yes - - AOT_BUILD_FLAGS="--aot=$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="" - - DISABLE_MCS_DOCS_default=yes -elif test x$with_runtime_preset = xaot_llvm; then - with_profile4_x_default=yes - - AOT_BUILD_FLAGS="--llvm --aot=$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="" - - DISABLE_MCS_DOCS_default=yes -elif test x$with_runtime_preset = xwinaot; then - DISABLE_MCS_DOCS_default=yes - with_winaot_default=yes - TEST_PROFILE=winaot - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_reflection_emit_save='yes' - mono_feature_disable_reflection_emit='yes' - mono_feature_disable_appdomains='yes' - - AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --aot=full,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --full-aot" - AOT_MODE="full" -elif test x$with_runtime_preset = xwinaotinterp; then - DISABLE_MCS_DOCS_default=yes - with_testing_winaot_interp_default=yes - TEST_PROFILE=testing_winaot_interp - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_appdomains='yes' - - AOT_BUILD_FLAGS="--aot=full,interp,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--full-aot-interp" -elif test x$with_runtime_preset = xwinaotinterp_llvm; then - DISABLE_MCS_DOCS_default=yes - with_testing_winaot_interp_default=yes - TEST_PROFILE=testing_winaot_interp - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_appdomains='yes' - - INVARIANT_AOT_OPTIONS="llvmllc=-mattr=sse4.1,$INVARIANT_AOT_OPTIONS" - AOT_BUILD_FLAGS="-O=gsharedvt --llvm --aot=full,interp,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--full-aot-interp" -elif test x$with_runtime_preset = xwinaot_llvm; then - DISABLE_MCS_DOCS_default=yes - with_winaot_default=yes - TEST_PROFILE=winaot - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_reflection_emit_save='yes' - mono_feature_disable_reflection_emit='yes' - mono_feature_disable_appdomains='yes' - - INVARIANT_AOT_OPTIONS="llvmllc=-mattr=sse4.1,$INVARIANT_AOT_OPTIONS" - AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --llvm --aot=full,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --full-aot" - AOT_MODE="full" -elif test x$with_runtime_preset = xorbis; then - DISABLE_MCS_DOCS_default=yes - with_orbis_default=yes - TEST_PROFILE=orbis - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_reflection_emit_save='yes' - mono_feature_disable_reflection_emit='yes' - mono_feature_disable_appdomains='yes' - - AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --full-aot" - AOT_MODE="full" -elif test x$with_runtime_preset = xunreal; then - DISABLE_MCS_DOCS_default=yes - with_unreal_default=yes - TEST_PROFILE=unreal - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_appdomains='no' - - AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot" -elif test x$with_runtime_preset = xwasm; then - DISABLE_MCS_DOCS_default=yes - with_wasm_default=yes - TEST_PROFILE=wasm - - mono_feature_disable_com='yes' - mono_feature_disable_remoting='yes' - mono_feature_disable_reflection_emit_save='yes' - mono_feature_disable_reflection_emit='yes' - mono_feature_disable_appdomains='yes' - - AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --full-aot" -else - TEST_PROFILE=net_4_x - with_profile4_x_default=yes -fi - -if test "x$AOT_BUILD_FLAGS" != "x"; then : - AC_SUBST(AOT_BUILD_FLAGS) - AC_SUBST(AOT_RUN_FLAGS) - # For llvmonlycheck + fullaotcheck - AC_SUBST(INVARIANT_AOT_OPTIONS) -fi - -AC_SUBST(TEST_PROFILE) - -if test "x$with_profile4_x" = "xdefault"; then - with_profile4_x=$with_profile4_x_default -fi -if test "x$with_monodroid" = "xdefault"; then - with_monodroid=$with_monodroid_default -fi -if test "x$with_monotouch" = "xdefault"; then - with_monotouch=$with_monotouch_default -fi -if test "x$with_monotouch_watch" = "xdefault"; then - with_monotouch_watch=$with_monotouch_watch_default -fi -if test "x$with_monotouch_tv" = "xdefault"; then - with_monotouch_tv=$with_monotouch_tv_default -fi -if test "x$with_bitcode" = "xdefault"; then - with_bitcode=$with_bitcode_default -fi -if test "x$with_xammac" = "xdefault"; then - with_xammac=$with_xammac_default -fi -if test "x$with_testing_aot_full_interp" = "xdefault"; then - with_testing_aot_full_interp=$with_testing_aot_full_interp_default -fi -if test "x$with_testing_aot_hybrid" = "xdefault"; then - with_testing_aot_hybrid=$with_testing_aot_hybrid_default -fi -if test "x$with_testing_aot_full" = "xdefault"; then - with_testing_aot_full=$with_testing_aot_full_default -fi -if test "x$with_winaot" = "xdefault"; then - with_winaot=$with_winaot_default -fi -if test "x$with_testing_winaot_interp" = "xdefault"; then - with_testing_winaot_interp=$with_testing_winaot_interp_default -fi -if test "x$with_orbis" = "xdefault"; then - with_orbis=$with_orbis_default -fi -if test "x$with_unreal" = "xdefault"; then - with_unreal=$with_unreal_default -fi -if test "x$with_wasm" = "xdefault"; then - with_wasm=$with_wasm_default -fi - - -AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = "xyes"]) -AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"]) -AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"]) -AM_CONDITIONAL(INSTALL_MONOTOUCH_WATCH, [test "x$with_monotouch_watch" != "xno"]) -AM_CONDITIONAL(INSTALL_MONOTOUCH_TV, [test "x$with_monotouch_tv" != "xno"]) -AM_CONDITIONAL(BITCODE, test "x$with_bitcode" = "xyes") -AM_CONDITIONAL(STATIC_ICU, test "x$with_static_icu" = "xyes") -AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"]) -AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL_INTERP, [test "x$with_testing_aot_full_interp" != "xno"]) -AM_CONDITIONAL(INSTALL_TESTING_AOT_HYBRID, [test "x$with_testing_aot_hybrid" != "xno"]) -AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL, [test "x$with_testing_aot_full" != "xno"]) -AM_CONDITIONAL(INSTALL_WINAOT, [test "x$with_winaot" != "xno"]) -AM_CONDITIONAL(INSTALL_TESTING_WINAOT_INTERP, [test "x$with_testing_winaot_interp" != "xno"]) -AM_CONDITIONAL(INSTALL_ORBIS, [test "x$with_orbis" != "xno"]) -AM_CONDITIONAL(INSTALL_UNREAL, [test "x$with_unreal" != "xno"]) -AM_CONDITIONAL(INSTALL_WASM, [test "x$with_wasm" != "xno"]) -AM_CONDITIONAL(INSTALL_NETCORE, [test "x$with_core" != "xno"]) - -AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"] || [test "x$TEST_PROFILE" = "xunreal"]) -AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xtesting_aot_bitcode"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"] || [test "x$TEST_PROFILE" = "xwasm"]) -AM_CONDITIONAL(FULL_AOT_INTERP_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full_interp"] || [test "x$TEST_PROFILE" = "xtesting_aot_bitcode_interp"] || [test "x$TEST_PROFILE" = "xtesting_winaot_interp"]) -AM_CONDITIONAL(DEFAULT_TESTS, [test "x$TEST_PROFILE" = "xnet_4_x"]) - -default_profile=net_4_x -if test -z "$INSTALL_MONODROID_TRUE"; then : - default_profile=monodroid -fi -if test -z "$INSTALL_MONOTOUCH_TRUE"; then : - default_profile=monotouch -fi -if test -z "$INSTALL_XAMMAC_TRUE"; then : - default_profile=xammac -fi -if test -z "$INSTALL_TESTING_AOT_FULL_INTERP_TRUE"; then : - default_profile=testing_aot_full_interp -fi -if test -z "$INSTALL_TESTING_AOT_HYBRID_TRUE"; then : - default_profile=testing_aot_hybrid -fi -if test -z "$INSTALL_TESTING_AOT_FULL_TRUE"; then : - default_profile=testing_aot_full -fi -if test -z "$INSTALL_WINAOT_TRUE"; then : - default_profile=winaot -fi -if test -z "$INSTALL_TESTING_WINAOT_INTERP_TRUE"; then : - default_profile=testing_winaot_interp -fi -if test -z "$INSTALL_ORBIS_TRUE"; then : - default_profile=orbis -fi -if test -z "$INSTALL_UNREAL_TRUE"; then : - default_profile=unreal -fi -if test -z "$INSTALL_WASM_TRUE"; then : - default_profile=wasm -fi -if test -z "$INSTALL_4_x_TRUE"; then : - default_profile=net_4_x -fi -DEFAULT_PROFILE=$default_profile -AC_SUBST(DEFAULT_PROFILE) - -# -# End build profile configuration -# - -if test x$USE_NLS = xprofile_default; then - - AC_MSG_CHECKING([NLS used]) - - # We make the default value for USE_NLS - # "no" on OSX because it isn't available on most - # default OSX installs. The most common configurations will - # all disable it, so this saves us typing. - if test x$host_darwin = xyes; then - USE_NLS=no; - else - USE_NLS=yes; - fi - - AC_SUBST([USE_NLS]) - AC_MSG_RESULT([$USE_NLS]) -fi - -AC_ARG_ENABLE(static-gcc-libs, [ --enable-static-gcc-libs Statically link GCC support libs (for MinGW32)]) -if test "x$enable_static_gcc_libs" = "xyes"; then - # llvm/build.mk doesn't use automake, so make a regular make variable for it. - AC_SUBST(STATIC_GCC_LIBS,1) -fi -AM_CONDITIONAL(ENABLE_STATIC_GCC_LIBS, test "x$enable_static_gcc_libs" = "xyes") - -AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems. - LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, dllmap, reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting, security, lldb, mdb, assert_messages, config, cfgdir_config, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_toggleref, sgen_debug_helpers, sgen_binary_protocol, sockets, gac, threads, processes.], -[ - for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do - eval "mono_feature_disable_$feature='yes'" - done - DISABLED_FEATURES=$enable_minimal - disabled="Disabled: $enable_minimal" -],[]) - -AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features]) - -if test "x$mono_feature_disable_aot" = "xyes"; then - AC_DEFINE(DISABLE_AOT, 1, [Disable AOT Compiler]) - enable_system_aot=no - AC_MSG_NOTICE([Disabled AOT compiler]) -fi - -if test "x$mono_feature_disable_profiler" = "xyes"; then - AC_DEFINE(DISABLE_PROFILER, 1, [Disable default profiler support]) - AC_MSG_NOTICE([Disabled support for the profiler]) -fi -AM_CONDITIONAL(DISABLE_PROFILER, test x$mono_feature_disable_profiler = xyes) - -if test "x$mono_feature_disable_decimal" = "xyes"; then - AC_DEFINE(DISABLE_DECIMAL, 1, [Disable System.Decimal support]) - AC_MSG_NOTICE([Disabled support for decimal]) -fi - -if test "x$mono_feature_disable_pinvoke" = "xyes"; then - AC_DEFINE(DISABLE_PINVOKE, 1, [Disable P/Invoke support]) - AC_MSG_NOTICE([Disabled support for P/Invoke]) -fi - -if test "x$mono_feature_disable_debug" = "xyes"; then - AC_DEFINE(DISABLE_DEBUG, 1, [Disable runtime debugging support]) - AC_MSG_NOTICE([Disabled support for runtime debugging]) -fi - -if test "x$mono_feature_disable_reflection_emit" = "xyes"; then - AC_DEFINE(DISABLE_REFLECTION_EMIT, 1, [Disable reflection emit support]) - mono_feature_disable_reflection_emit_save=yes - AC_MSG_NOTICE([Disabled support for Reflection.Emit]) -fi - -if test "x$mono_feature_disable_reflection_emit_save" = "xyes"; then - AC_DEFINE(DISABLE_REFLECTION_EMIT_SAVE, 1, [Disable assembly saving support in reflection emit]) - AC_MSG_NOTICE([Disabled support for Reflection.Emit.Save]) -fi - -if test "x$mono_feature_disable_large_code" = "xyes"; then - AC_DEFINE(DISABLE_LARGE_CODE, 1, [Disable support for huge assemblies]) - AC_MSG_NOTICE([Disabled support for large assemblies]) -fi - -if test "x$mono_feature_disable_logging" = "xyes"; then - AC_DEFINE(DISABLE_LOGGING, 1, [Disable support debug logging]) - AC_MSG_NOTICE([Disabled support for logging]) -fi - -if test "x$mono_feature_disable_com" = "xyes"; then - AC_DEFINE(DISABLE_COM, 1, [Disable COM support]) - AC_MSG_NOTICE([Disabled COM support]) -fi - -if test "x$mono_feature_disable_ssa" = "xyes"; then - AC_DEFINE(DISABLE_SSA, 1, [Disable advanced SSA JIT optimizations]) - AC_MSG_NOTICE([Disabled SSA JIT optimizations]) -fi - -if test "x$mono_feature_disable_generics" = "xyes"; then - AC_DEFINE(DISABLE_GENERICS, 1, [Disable generics support]) - AC_MSG_NOTICE([Disabled Generics Support]) -fi - -if test "x$mono_feature_disable_shadowcopy" = "xyes"; then - AC_DEFINE(DISABLE_SHADOW_COPY, 1, [Disable Shadow Copy for AppDomains]) - AC_MSG_NOTICE([Disabled Shadow copy for AppDomains]) -fi - -if test "x$mono_feature_disable_portability" = "xyes"; then - AC_DEFINE(DISABLE_PORTABILITY, 1, [Disables the IO portability layer]) - AC_MSG_NOTICE([Disabled IO Portability layer]) -fi - -if test "x$mono_feature_disable_attach" = "xyes"; then - AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support]) - AC_MSG_NOTICE([Disabled agent attach]) -fi - -if test "x$mono_feature_disable_verifier" = "xyes"; then - AC_DEFINE(DISABLE_VERIFIER, 1, [Disables the verifier]) - AC_MSG_NOTICE([Disabled the metadata and IL verifiers]) -fi - -if test "x$mono_feature_disable_jit" = "xyes"; then - AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode or interpreter will be supported by the runtime.]) - AC_MSG_NOTICE([Disabled the JIT engine, only full AOT or interpreter will be supported]) -fi - -AM_CONDITIONAL(DISABLE_JIT, test x$mono_feature_disable_jit = xyes) - -if test "x$mono_feature_disable_interpreter" = "xyes"; then - AC_DEFINE(DISABLE_INTERPRETER, 1, [Disable the interpreter.]) - AC_MSG_NOTICE([Disabled the interpreter]) -fi - -AM_CONDITIONAL(DISABLE_INTERPRETER, test x$mono_feature_disable_interpreter = xyes) - -if test "x$mono_feature_disable_interpreter" != "xyes" -o "x$mono_feature_disable_jit" != "xyes"; then - AC_DEFINE(ENABLE_ILGEN, 1, [Some VES is available at runtime]) -fi - -AM_CONDITIONAL(ENABLE_ILGEN, test x$mono_feature_disable_interpreter != xyes -o x$mono_feature_disable_jit != xyes) - -if test "x$mono_feature_disable_simd" = "xyes"; then - AC_DEFINE(DISABLE_SIMD, 1, [Disable SIMD intrinsics related optimizations.]) - AC_MSG_NOTICE([Disabled SIMD support]) -fi - -if test "x$mono_feature_disable_soft_debug" = "xyes"; then - AC_DEFINE(DISABLE_DEBUGGER_AGENT, 1, [Disable Soft Debugger Agent.]) - AC_MSG_NOTICE([Disabled Soft Debugger.]) -fi - -AM_CONDITIONAL(DISABLE_DEBUGGER_AGENT, test x$mono_feature_disable_debugger_agent = xyes) - -if test "x$mono_feature_disable_perfcounters" = "xyes"; then - AC_DEFINE(DISABLE_PERFCOUNTERS, 1, [Disable Performance Counters.]) - AC_MSG_NOTICE([Disabled Performance Counters.]) -fi -if test "x$mono_feature_disable_normalization" = "xyes"; then - AC_DEFINE(DISABLE_NORMALIZATION, 1, [Disable String normalization support.]) - AC_MSG_NOTICE([Disabled String normalization support.]) -fi - -#TODO: remove assembly_remapping feature name once everyone is using desktop_loader -if test "x$mono_feature_disable_assembly_remapping" = "xyes" || test "x$mono_feature_disable_desktop_loader" = "xyes"; then - AC_DEFINE(DISABLE_DESKTOP_LOADER, 1, [Disable desktop assembly loader semantics.]) - AC_MSG_NOTICE([Disabled desktop assembly loader semantics.]) -fi - -if test "x$mono_feature_disable_shared_perfcounters" = "xyes"; then - AC_DEFINE(DISABLE_SHARED_PERFCOUNTERS, 1, [Disable shared perfcounters.]) - AC_MSG_NOTICE([Disabled Shared perfcounters.]) -fi - -if test "x$mono_feature_disable_appdomains" = "xyes"; then - AC_DEFINE(DISABLE_APPDOMAINS, 1, [Disable support for multiple appdomains.]) - AC_MSG_NOTICE([Disabled support for multiple appdomains.]) -fi - -if test "x$mono_feature_disable_remoting" = "xyes"; then - AC_DEFINE(DISABLE_REMOTING, 1, [Disable remoting support (This disables type proxies and make com non-functional)]) - AC_MSG_NOTICE([Disabled remoting]) -fi - -if test "x$mono_feature_disable_security" = "xyes"; then - AC_DEFINE(DISABLE_SECURITY, 1, [Disable CAS/CoreCLR security]) - AC_MSG_NOTICE([Disabled CAS/CoreCLR security manager (used e.g. for Moonlight)]) -fi - -if test "x$mono_feature_disable_lldb" = "xyes"; then - AC_DEFINE(DISABLE_LLDB, 1, [Disable support code for the LLDB plugin.]) - AC_MSG_NOTICE([Disabled LLDB plugin support code.]) -fi - -if test "x$mono_feature_disable_mdb" = "xyes"; then - AC_DEFINE(DISABLE_MDB, 1, [Disable support for .mdb symbol files.]) - AC_MSG_NOTICE([Disabled support for .mdb symbol files.]) -fi - -if test "x$mono_feature_disable_assert_messages" = "xyes"; then - AC_DEFINE(DISABLE_ASSERT_MESSAGES, 1, [Disable assertion messages.]) - AC_MSG_NOTICE([Disabled assertion messages.]) -fi - -if test "x$mono_feature_disable_cfgdir_config" = "xyes"; then - AC_DEFINE(DISABLE_CFGDIR_CONFIG, 1, [Disable config directories.]) - AC_MSG_NOTICE([Disabled config directories.]) -fi - -if test "x$mono_feature_disable_config" = "xyes"; then - AC_DEFINE(DISABLE_CONFIG, 1, [Disable .config file support.]) - AC_MSG_NOTICE([Disabled .config file support.]) -fi - -if test "x$mono_feature_disable_cleanup" = "xyes"; then - AC_DEFINE(DISABLE_CLEANUP, 1, [Disable runtime cleanup.]) - AC_MSG_NOTICE([Disabled runtime cleanup.]) -fi - -if test "x$mono_feature_disable_sgen_marksweep_conc" = "xyes"; then - AC_DEFINE(DISABLE_SGEN_MAJOR_MARKSWEEP_CONC, 1, [Disable concurrent gc support in SGEN.]) - AC_MSG_NOTICE([Disabled concurrent gc support in SGEN.]) -fi - -if test "x$mono_feature_disable_sgen_split_nursery" = "xyes"; then - AC_DEFINE(DISABLE_SGEN_SPLIT_NURSERY, 1, [Disable minor=split support in SGEN.]) - AC_MSG_NOTICE([Disabled minor=split support in SGEN.]) -fi - -if test "x$mono_feature_disable_sgen_gc_bridge" = "xyes"; then - AC_DEFINE(DISABLE_SGEN_GC_BRIDGE, 1, [Disable gc bridge support in SGEN.]) - AC_MSG_NOTICE([Disabled gc bridge support in SGEN.]) -fi - -if test "x$mono_feature_disable_sgen_toggleref" = "xyes"; then - AC_DEFINE(DISABLE_SGEN_TOGGLEREF, 1, [Disable toggleref support in SGEN.]) - AC_MSG_NOTICE([Disabled toggleref support in SGEN.]) -fi - -if test "x$mono_feature_disable_sgen_debug_helpers" = "xyes"; then - AC_DEFINE(DISABLE_SGEN_DEBUG_HELPERS, 1, [Disable debug helpers in SGEN.]) - AC_MSG_NOTICE([Disabled debug helpers in SGEN.]) -fi - -if test "x$mono_feature_disable_sgen_binary_protocol" = "xyes"; then - AC_DEFINE(DISABLE_SGEN_BINARY_PROTOCOL, 1, [Disable binary protocol logging in SGEN.]) - AC_MSG_NOTICE([Disabled binary protocol logging in SGEN.]) -fi - -if test "x$mono_feature_disable_sockets" = "xyes"; then - AC_DEFINE(DISABLE_SOCKETS, 1, [Disable sockets]) - AC_MSG_NOTICE([Disabled sockets]) -fi - -if test "x$mono_feature_disable_gac" = "xyes"; then - AC_DEFINE(DISABLE_GAC, 1, [Disable GAC]) - AC_MSG_NOTICE([Disabled GAC support]) -fi - -if test "x$mono_feature_disable_dllmap" = "xyes"; then - AC_DEFINE(DISABLE_DLLMAP,1,[Disables use of DllMaps in MonoVM]) - AC_MSG_NOTICE([Disabled DllMap in the loader.]) -fi - -if test "x$mono_feature_disable_threads" = "xyes"; then - AC_DEFINE(DISABLE_THREADS, 1, [Disable Threads]) - AC_MSG_NOTICE([Disabled threading support]) -fi - -if test "x$mono_feature_disable_processes" = "xyes"; then - AC_DEFINE(DISABLE_PROCESSES, 1, [Disable process support]) - AC_MSG_NOTICE([Disabled process support]) -fi - -AC_ARG_ENABLE(executables, [ --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes) -AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno) - -has_extension_module=no -AC_ARG_ENABLE(extension-module, [ --enable-extension-module=LIST enable the core-extensions from LIST], -[ - for extension in `echo "$enable_extension_module" | sed -e "s/,/ /g"`; do - if test x$extension = xdefault ; then - has_extension_module=yes; - fi - done - if test x$enable_extension_module = xyes; then - has_extension_module=yes; - fi -], []) - -AM_CONDITIONAL([HAS_EXTENSION_MODULE], [test x$has_extension_module != xno]) - -if test x$has_extension_module != xno ; then - AC_DEFINE([ENABLE_EXTENSION_MODULE], 1, [Extension module enabled]) - AC_MSG_NOTICE([Enabling mono extension module.]) -fi - -# Deprecated -AC_ARG_ENABLE(gsharedvt, [ --enable-gsharedvt Enable generic valuetype sharing (Deprecated)], enable_gsharedvt=$enableval, enable_gsharedvt=no) - -AC_MSG_CHECKING(for visibility __attribute__) -AC_COMPILE_IFELSE([ - AC_LANG_SOURCE([[ - void __attribute__ ((visibility ("hidden"))) doit (void) {} - int main () { doit (); return 0; } - ]]) -], [ - have_visibility_hidden=yes - AC_MSG_RESULT(yes) -], [ - have_visibility_hidden=no - AC_MSG_RESULT(no) -]) - -dnl -dnl Boehm GC configuration -dnl - -AC_ARG_WITH(libgc, [ --with-libgc=included,none Controls the Boehm GC config, default=included],[libgc=$with_libgc],[libgc=included]) - -AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes}) -AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes) - -if test "x$support_boehm" = "xyes"; then - - AC_ARG_ENABLE(parallel-mark, [ --enable-parallel-mark Enables Boehm GC Parallel Marking], enable_parallel_mark=$enableval, enable_parallel_mark=$parallel_mark) - if test x$enable_parallel_mark = xyes; then - libgc_configure_args="$libgc_configure_args --enable-parallel-mark" - fi - - gc_msg="" - LIBGC_CPPFLAGS= - LIBGC_LIBS= - LIBGC_STATIC_LIBS= - case "x$libgc" in - xincluded) - LIBGC_CPPFLAGS='-I$(top_srcdir)/external/bdwgc/include -I$(top_srcdir)/external/bdwgc/libatomic_ops/src' - LIBGC_LIBS='$(top_builddir)/external/bdwgc/libgc.la' - LIBGC_STATIC_LIBS='$(top_builddir)/external/bdwgc/libgc-static.la' - - BOEHM_DEFINES="-DHAVE_BOEHM_GC -DGC_THREADS" - - if test x$target_win32 = xyes; then - BOEHM_DEFINES="$BOEHM_DEFINES -DGC_NOT_DLL" - CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DGC_BUILD -DGC_NOT_DLL" - fi - - gc_msg="Included Boehm GC with typed GC" - if test x$enable_parallel_mark = xyes; then - AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC and Parallel Mark)", [GC description]) - gc_msg="$gc_msg and parallel mark" - else - AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC)", [GC description]) - fi - ;; - - xboehm|xbohem|xyes) - AC_MSG_WARN("External Boehm is no longer supported") - ;; - - xsgen) - AC_MSG_WARN("Use --with-sgen instead, --with-libgc= controls Boehm configuration") - ;; - - xnone) - AC_MSG_WARN("Compiling mono without GC.") - AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "none", [GC description]) - AC_DEFINE(HAVE_NULL_GC,1,[No GC support.]) - gc_msg="none" - ;; - *) - AC_MSG_ERROR([Invalid argument $libgc to --with-libgc.]) - ;; - esac - - AC_ARG_WITH(large-heap, [ --with-large-heap=yes,no Enable support for GC heaps larger than 3GB (defaults to no)], [large_heap=$withval], [large_heap=no]) - if test "x$large_heap" = "xyes"; then - CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG" - fi - - AC_SUBST(LIBGC_CPPFLAGS) - AC_SUBST(LIBGC_LIBS) - AC_SUBST(LIBGC_STATIC_LIBS) - AC_SUBST(BOEHM_DEFINES) - -fi -AM_CONDITIONAL(SUPPORT_NULLGC, test "x$libgc" = "xnone") - -dnl -dnl End of Boehm GC Configuration -dnl - -dnl ************************************* -dnl *** Checks for zero length arrays *** -dnl ************************************* -AC_MSG_CHECKING(whether $CC supports zero length arrays) -AC_TRY_COMPILE([ - struct s { - int length; - char data [0]; - }; -], [], [ - AC_MSG_RESULT(yes) - AC_DEFINE_UNQUOTED(MONO_ZERO_LEN_ARRAY, 0, [Length of zero length arrays]) -], [ - AC_MSG_RESULT(no) - AC_DEFINE_UNQUOTED(MONO_ZERO_LEN_ARRAY, 1, [Length of zero length arrays]) -]) - -dnl *********************************** -dnl *** Checks for signals -dnl *********************************** -AC_CHECK_HEADERS(signal.h) -AC_CHECK_FUNCS(sigaction) -AC_CHECK_FUNCS(kill) -AC_CHECK_FUNCS(signal) - -# signal() is declared inline in Android headers -# so we need to workaround it by overriding the check. -if test x$platform_android = xyes; then - AC_DEFINE(HAVE_SIGNAL,1) -fi - -# `target_ios=yes` does not detect watch devices and fails when cross-compiling -AC_MONO_APPLE_TARGET(TARGET_OS_IPHONE, [mono_native_platform_ios=yes]) - -if test x$host_win32 = xno; then - dnl ************************************* - dnl *** Checks for time capabilities *** - dnl ************************************* - - AC_MSG_CHECKING(for CLOCK_MONOTONIC) - AC_TRY_COMPILE([#include ], [ - const int foo = CLOCK_MONOTONIC; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CLOCK_MONOTONIC, 1, [CLOCK_MONOTONIC]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING(for CLOCK_MONOTONIC_COARSE) - AC_TRY_COMPILE([#include ], [ - const int foo = CLOCK_MONOTONIC_COARSE; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CLOCK_MONOTONIC_COARSE, 1, [CLOCK_MONOTONIC_COARSE]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING(for CLOCK_REALTIME) - AC_TRY_COMPILE([#include ], [ - const int foo = CLOCK_REALTIME; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CLOCK_REALTIME, 1, [CLOCK_REALTIME]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_CHECK_FUNC(mach_absolute_time, [AC_DEFINE(HAVE_MACH_ABSOLUTE_TIME, 1, [mach_absolute_time])]) - AC_CHECK_FUNC(gethrtime, [AC_DEFINE(HAVE_GETHRTIME, 1, [gethrtime])]) - AC_CHECK_FUNC(read_real_time, [AC_DEFINE(HAVE_READ_REAL_TIME, 1, [read_real_time])]) - AC_CHECK_FUNC(mach_timebase_info, [AC_DEFINE(HAVE_MACH_TIMEBASE_INFO, 1, [mach_timebase_info])]) - AC_CHECK_FUNC(futimes, [AC_DEFINE(HAVE_FUTIMES, 1, [futimes])]) - AC_CHECK_FUNC(futimens, [AC_DEFINE(HAVE_FUTIMENS, 1, [futimens])]) - - AC_CHECK_TYPES([clockid_t], [AC_DEFINE(HAVE_CLOCKID_T)], [], - [#include ]) - - dnl hires monotonic clock support - - # Check for clock_gettime - if test x$target_osx = xyes; then - # On OSX, clock_gettime is only really available on 10.12 or later - # However, it exists as a weak symbol on earlier versions, so hard-code a version check - AC_MONO_APPLE_AVAILABLE(clock_gettime_available, [whether clock_gettime is available on OSX], - [(MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12)]) - if test x$clock_gettime_available = xyes; then - AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [clock_gettime]) - fi - else - AC_CHECK_FUNC(clock_gettime, [ - AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [clock_gettime]) - ], [ - # Old glibc (< 2.17) has clock_gettime in librt, so check there too - AC_CHECK_LIB(rt, clock_gettime, [ - AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [clock_gettime]) - LIBS="$LIBS -lrt" - ]) - ]) - fi - - AC_CHECK_FUNCS(clock_nanosleep) - - dnl dynamic loader support - AC_CHECK_FUNC(dlopen, DL_LIB="", - AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", dl_support=no) - ) - if test x$dl_support = xno; then - AC_MSG_WARN([No dynamic loading support available]) - else - LIBS="$LIBS $DL_LIB" - dnl from glib's configure.ac - if test "x$cross_compiling" = "xyes"; then - AC_MSG_RESULT(cross compiling, assuming no) - mono_cv_uscore=no - else - AC_CACHE_CHECK([for preceeding underscore in symbols], - mono_cv_uscore,[ - AC_TRY_RUN([#include - int mono_underscore_test (void) { return 42; } - int main() { - void *f1 = (void*)0, *f2 = (void*)0, *handle; - handle = dlopen ((void*)0, 0); - if (handle) { - f1 = dlsym (handle, "mono_underscore_test"); - f2 = dlsym (handle, "_mono_underscore_test"); - } return (!f2 || f1); - }], - [mono_cv_uscore=yes], - [mono_cv_uscore=no], - []) - ]) - fi - if test "x$mono_cv_uscore" = "xyes"; then - AC_DEFINE(MONO_DL_NEED_USCORE, 1, [Does dlsym require leading underscore.]) - fi - AC_CHECK_FUNC(dlerror) - fi - - dnl ****************************************************************** - dnl *** Checks for the IKVM JNI interface library *** - dnl ****************************************************************** - AC_ARG_WITH(ikvm-native, [ --with-ikvm-native=yes,no build the IKVM JNI interface library (defaults to yes)],[with_ikvm_native=$withval],[with_ikvm_native=$ikvm_native]) - - if test x$with_ikvm_native = xyes; then - jdk_headers_found="IKVM Native" - fi - - AC_CHECK_HEADERS(execinfo.h) - - AC_CHECK_HEADERS(sys/auxv.h sys/resource.h) - - AC_CHECK_FUNCS(getgrgid_r) - AC_CHECK_FUNCS(getgrnam_r) - AC_CHECK_FUNCS(getresuid) - AC_CHECK_FUNCS(setresuid) - AC_CHECK_FUNCS(kqueue) - # 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(getrusage) - AC_CHECK_FUNCS(getpriority) - AC_CHECK_FUNCS(setpriority) - AC_CHECK_FUNCS(dl_iterate_phdr) - AC_CHECK_FUNCS(dladdr) - AC_CHECK_FUNCS(sysconf) - AC_CHECK_FUNCS(getrlimit) - AC_CHECK_FUNCS(prctl) - AC_CHECK_FUNCS(arc4random) - AC_CHECK_FUNCS(nl_langinfo) - - AC_CHECK_FUNCS(sched_getaffinity) - AC_CHECK_FUNCS(sched_setaffinity) - AC_CHECK_FUNCS(sched_getcpu) - - if test x$platform_android != xyes; then - AC_CHECK_FUNCS(getpwnam_r) - AC_CHECK_FUNCS(getpwuid_r) - fi - - AC_CHECK_FUNCS(readlink) - AC_CHECK_FUNCS(chmod) - AC_CHECK_FUNCS(lstat) - AC_CHECK_FUNCS(getdtablesize) - - AC_CHECK_FUNCS(ftruncate) - AC_CHECK_FUNCS(msync) - - AC_CHECK_FUNCS(gethostname getpeername) - AC_CHECK_FUNCS(utime utimes) - - AC_CHECK_FUNCS(openlog closelog) - AC_CHECK_FUNCS(atexit) - AC_CHECK_FUNCS(popen) - - AC_FUNC_STRERROR_R() - - dnl **************************************************************** - dnl *** Check for sched_setaffinity from glibc versions before *** - dnl *** 2.3.4. The older versions of the function only take 2 *** - dnl *** parameters, not 3. *** - dnl *** *** - dnl *** Because the interface change was not made in a minor *** - dnl *** version rev, the __GLIBC__ and __GLIBC_MINOR__ macros *** - dnl *** won't always indicate the interface sched_affinity has. *** - dnl **************************************************************** - AC_MSG_CHECKING(for sched_setaffinity from glibc < 2.3.4) - AC_TRY_COMPILE([#include ], [ - int mask = 1; - sched_setaffinity(0, &mask); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY, 1, [Have GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY]) - ], [ - # We have the new, three-parameter version - AC_MSG_RESULT(no) - ]) - AC_TRY_COMPILE([#include ], [ - CPU_COUNT((void *) 0); - ], [ - AC_MSG_RESULT(yes) - AC_DEFINE(GLIBC_HAS_CPU_COUNT, 1, [GLIBC has CPU_COUNT macro in sched.h]) - ], [ - # We have the new, three-parameter version - AC_MSG_RESULT(no) - ]) - - dnl ****************************************************************** - dnl *** Check for large file support *** - dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) *** - dnl ****************************************************************** - - # Check that off_t can represent 2**63 - 1 correctly, working around - # potential compiler bugs. Defines LARGE_FILE_SUPPORT, adds $1 to - # CPPFLAGS and sets $large_offt to yes if the test succeeds - large_offt=no - AC_DEFUN([LARGE_FILES], [ - large_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $1" - AC_TRY_COMPILE([ - #include - #include - ], [ - /* Lifted this compile time assert method from: http://www.jaggersoft.com/pubs/CVu11_3.html */ - #define COMPILE_TIME_ASSERT(pred) \ - switch(0){case 0:case pred:;} - COMPILE_TIME_ASSERT(sizeof(off_t) * CHAR_BIT == 64); - ], [ - AC_MSG_RESULT(ok) - AC_DEFINE(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support]) - large_CPPFLAGS="$large_CPPFLAGS $1" - large_offt=yes - ], [ - AC_MSG_RESULT(no) - ]) - CPPFLAGS=$large_CPPFLAGS - ]) - - AC_MSG_CHECKING(if off_t is 64 bits wide) - LARGE_FILES("") - if test $large_offt = no; then - AC_MSG_CHECKING(if _FILE_OFFSET_BITS=64 gives 64 bit off_t) - LARGE_FILES("-D_FILE_OFFSET_BITS=64") - fi - if test $large_offt = no; then - AC_MSG_WARN([No 64 bit file size support available]) - fi - - dnl ***************************** - dnl *** Checks for libsocket *** - dnl ***************************** - AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") - - dnl ***************************** - dnl *** Checks for IPPROTO_IP *** - dnl ***************************** - AC_MSG_CHECKING(for IPPROTO_IP) - AC_TRY_COMPILE([#include ], [ - int level = IPPROTO_IP; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IPPROTO_IP, 1, [Have IPPROTO_IP]) - ], [ - # We'll have to use getprotobyname - AC_MSG_RESULT(no) - ]) - - dnl ******************************* - dnl *** Checks for IPPROTO_IPV6 *** - dnl ******************************* - AC_MSG_CHECKING(for IPPROTO_IPV6) - AC_TRY_COMPILE([#include ], [ - int level = IPPROTO_IPV6; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IPPROTO_IPV6, 1, [Have IPPROTO_IPV6]) - ], [ - # We'll have to use getprotobyname - AC_MSG_RESULT(no) - ]) - - dnl ****************************** - dnl *** Checks for IPPROTO_TCP *** - dnl ****************************** - AC_MSG_CHECKING(for IPPROTO_TCP) - AC_TRY_COMPILE([#include ], [ - int level = IPPROTO_TCP; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IPPROTO_TCP, 1, [Have IPPROTO_TCP]) - ], [ - # We'll have to use getprotobyname - AC_MSG_RESULT(no) - ]) - - dnl ***************************** - dnl *** Checks for SOL_IP *** - dnl ***************************** - AC_MSG_CHECKING(for SOL_IP) - AC_TRY_COMPILE([#include ], [ - int level = SOL_IP; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SOL_IP, 1, [Have SOL_IP]) - ], [ - # We'll have to use getprotobyname - AC_MSG_RESULT(no) - ]) - - dnl ***************************** - dnl *** Checks for SOL_IPV6 *** - dnl ***************************** - AC_MSG_CHECKING(for SOL_IPV6) - AC_TRY_COMPILE([#include ], [ - int level = SOL_IPV6; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SOL_IPV6, 1, [Have SOL_IPV6]) - ], [ - # We'll have to use getprotobyname - AC_MSG_RESULT(no) - ]) - - dnl ***************************** - dnl *** Checks for SOL_TCP *** - dnl ***************************** - AC_MSG_CHECKING(for SOL_TCP) - AC_TRY_COMPILE([#include ], [ - int level = SOL_TCP; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SOL_TCP, 1, [Have SOL_TCP]) - ], [ - # We'll have to use getprotobyname - AC_MSG_RESULT(no) - ]) - - dnl ***************************** - dnl *** Checks for IP_PKTINFO *** - dnl ***************************** - AC_MSG_CHECKING(for IP_PKTINFO) - AC_TRY_COMPILE([#include ], [ - int level = IP_PKTINFO; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IP_PKTINFO, 1, [Have IP_PKTINFO]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ***************************** - dnl *** Checks for IPV6_PKTINFO *** - dnl ***************************** - AC_MSG_CHECKING(for IPV6_PKTINFO) - AC_TRY_COMPILE([#include ], [ - int level = IPV6_PKTINFO; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IPV6_PKTINFO, 1, [Have IPV6_PKTINFO]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Checks for IP_DONTFRAG *** - dnl ********************************** - AC_MSG_CHECKING(for IP_DONTFRAG) - AC_TRY_COMPILE([#include ], [ - int level = IP_DONTFRAG; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IP_DONTFRAG, 1, [Have IP_DONTFRAG]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Checks for IP_DONTFRAGMENT *** - dnl ********************************** - AC_MSG_CHECKING(for IP_DONTFRAGMENT) - AC_TRY_COMPILE([#include ], [ - int level = IP_DONTFRAGMENT; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IP_DONTFRAGMENT, 1, [Have IP_DONTFRAGMENT]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Checks for IP_MTU_DISCOVER *** - dnl ********************************** - AC_MSG_CHECKING(for IP_MTU_DISCOVER) - AC_TRY_COMPILE([#include ], [ - int level = IP_MTU_DISCOVER; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IP_MTU_DISCOVER, 1, [Have IP_MTU_DISCOVER]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Checks for IP_PMTUDISC_DO *** - dnl ********************************** - AC_MSG_CHECKING(for IP_PMTUDISC_DO) - AC_TRY_COMPILE([#include ], [ - int level = IP_PMTUDISC_DO; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IP_PMTUDISC_DO, 1, [Have IP_PMTUDISC_DO]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************* - dnl *** Check for struct ip_mreqn *** - dnl ********************************* - AC_MSG_CHECKING(for struct ip_mreqn) - AC_TRY_COMPILE([#include ], [ - struct ip_mreqn mreq; - mreq.imr_address.s_addr = 0; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRUCT_IP_MREQN, 1, [Have struct ip_mreqn]) - ], [ - # We'll just have to try and use struct ip_mreq - AC_MSG_RESULT(no) - AC_MSG_CHECKING(for struct ip_mreq) - AC_TRY_COMPILE([#include ], [ - struct ip_mreq mreq; - mreq.imr_interface.s_addr = 0; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRUCT_IP_MREQ, 1, [Have struct ip_mreq]) - ], [ - # No multicast support - AC_MSG_RESULT(no) - ]) - ]) - - dnl ********************************** - dnl *** Check for getaddrinfo *** - dnl ********************************** - AC_MSG_CHECKING(for getaddrinfo) - AC_TRY_LINK([ - #include - #include - ], [ - getaddrinfo(NULL,NULL,NULL,NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETADDRINFO, 1, [Have getaddrinfo]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for gethostbyname2_r *** - dnl ********************************** - AC_MSG_CHECKING(for gethostbyname2_r) - AC_TRY_LINK([ - #include - #include - ], [ - - gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETHOSTBYNAME2_R, 1, [Have gethostbyname2_r]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for gethostbyname2 *** - dnl ********************************** - AC_MSG_CHECKING(for gethostbyname2) - AC_TRY_LINK([ - #include - #include - ], [ - gethostbyname2(NULL,0); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETHOSTBYNAME2, 1, [Have gethostbyname2]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for gethostbyname *** - dnl ********************************** - AC_MSG_CHECKING(for gethostbyname) - AC_TRY_LINK([ - #include - #include - ], [ - gethostbyname(NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [Have gethostbyname]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for getprotobyname *** - dnl ********************************** - AC_MSG_CHECKING(for getprotobyname) - AC_TRY_LINK([ - #include - #include - ], [ - getprotobyname(NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETPROTOBYNAME, 1, [Have getprotobyname]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for getprotobyname_r *** - dnl ********************************** - AC_MSG_CHECKING(for getprotobyname_r) - AC_TRY_LINK([ - #include - #include - ], [ - getprotobyname_r(NULL, NULL, NULL, 0, NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETPROTOBYNAME_R, 1, [Have getprotobyname_r]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for getnameinfo *** - dnl ********************************** - AC_MSG_CHECKING(for getnameinfo) - AC_TRY_LINK([ - #include - #include - ], [ - getnameinfo (NULL, 0, NULL, 0, NULL, 0, 0); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETNAMEINFO, 1, [Have getnameinfo]) - ], [ - AC_MSG_RESULT(no) - ]) - - - dnl ********************************** - dnl *** Check for inet_ntop *** - dnl ********************************** - AC_MSG_CHECKING(for inet_ntop) - AC_TRY_LINK([ - #include - #include - ], [ - inet_ntop (0, NULL, NULL, 0); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INET_NTOP, 1, [Have inet_ntop]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ***************************** - dnl *** Checks for libnsl *** - dnl ***************************** - AC_CHECK_FUNC(gethostbyaddr, , AC_CHECK_LIB(nsl, gethostbyaddr, LIBS="$LIBS -lnsl")) - - AC_CHECK_FUNCS(inet_pton inet_aton) - - dnl ***************************** - dnl *** Checks for libxnet *** - dnl ***************************** - case "${host}" in - *solaris*) - AC_MSG_CHECKING(for Solaris XPG4 support) - if test -f /usr/lib/libxnet.so; then - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500" - CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1" - LIBS="$LIBS -lxnet" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - - if test "$GCC" = "yes"; then - CFLAGS="$CFLAGS -Wno-char-subscripts" - fi - ;; - esac - - dnl ***************************** - dnl *** Checks for libpthread *** - dnl ***************************** -# on FreeBSD -STABLE, the pthreads functions all reside in libc_r -# and libpthread does not exist -# - case "${host}" in - *-*-*haiku*) - dnl Haiku has pthread in libroot (libc equiv) - AC_CHECK_LIB(pthread, main, LIBS="$LIBS") - ;; - *-*-*freebsd*) - AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread") - ;; - *-*-*openbsd*) - AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread") - ;; - *) - AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread") - ;; - esac - AC_CHECK_HEADERS(pthread.h) - AC_CHECK_HEADERS(pthread_np.h) - AC_CHECK_FUNCS(pthread_mutex_timedlock) - AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_getname_np pthread_setname_np pthread_cond_timedwait_relative_np) - AC_CHECK_FUNCS(pthread_kill pthread_jit_write_protect_np) - AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE) - AC_TRY_COMPILE([ #include ], [ - pthread_mutexattr_t attr; - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - ], [ - AC_MSG_RESULT(ok) - ], [ - AC_MSG_RESULT(no) - AC_ERROR(Posix system lacks support for recursive mutexes) - ]) - AC_CHECK_FUNCS(pthread_attr_setstacksize) - AC_CHECK_FUNCS(pthread_attr_getstack pthread_attr_getstacksize) - AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np) - dnl check that pthread_mutexattr_setprotocol is declared - AC_CHECK_DECLS([pthread_mutexattr_setprotocol], [], [], [[#include ]]) - AC_CHECK_FUNCS(mincore mlock munlock) - - dnl *********************************** - dnl *** Checks for working __thread *** - dnl *********************************** - AC_MSG_CHECKING(for working __thread) - if test "x$with_tls" != "x__thread"; then - AC_MSG_RESULT(disabled) - elif test "x$cross_compiling" = "xyes"; then - AC_MSG_RESULT(cross compiling, assuming yes) - else - AC_TRY_RUN([ - #if defined(__APPLE__) && defined(__clang__) - #error "__thread does not currently work with clang on Mac OS X" - #endif - - #include - #include - __thread int i; - static int res1, res2; - - void thread_main (void *arg) - { - i = arg; - sleep (1); - if (arg == 1) - res1 = (i == arg); - else - res2 = (i == arg); - } - - int main () { - pthread_t t1, t2; - - i = 5; - - pthread_create (&t1, NULL, thread_main, 1); - pthread_create (&t2, NULL, thread_main, 2); - - pthread_join (t1, NULL); - pthread_join (t2, NULL); - - return !(res1 + res2 == 2); - } - ], [ - AC_MSG_RESULT(yes) - ], [ - AC_MSG_RESULT(no) - with_tls=pthread - ]) - fi - - dnl ************************************** - dnl *** Checks for working sigaltstack *** - dnl ************************************** - AC_MSG_CHECKING(for working sigaltstack) - if test "x$with_sigaltstack" != "xyes"; then - AC_MSG_RESULT(disabled) - elif test "x$cross_compiling" = "xyes"; then - AC_MSG_RESULT(cross compiling, assuming no) - with_sigaltstack=no - else - AC_TRY_RUN([ - #include - #include - #include - #include - #include - #include - #if defined(__FreeBSD__) || defined(__NetBSD__) - #define SA_STACK SA_ONSTACK - #endif - static void - sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context) - { - exit (0); - } - - volatile char*__ptr = NULL; - static void * - loop (void *ignored) - { - *__ptr = 0; - return NULL; - } - - static void - child () - { - struct sigaction sa; - stack_t sas; - pthread_t id; - pthread_attr_t attr; - - sa.sa_sigaction = sigsegv_signal_handler; - sigemptyset (&sa.sa_mask); - sa.sa_flags = SA_SIGINFO | SA_ONSTACK; - if (sigaction (SIGSEGV, &sa, NULL) == -1) { - perror ("sigaction"); - return; - } - - /* x86 darwin deliver segfaults using SIGBUS */ - if (sigaction (SIGBUS, &sa, NULL) == -1) { - perror ("sigaction"); - return; - } - sas.ss_sp = malloc (SIGSTKSZ); - sas.ss_size = SIGSTKSZ; - sas.ss_flags = 0; - if (sigaltstack (&sas, NULL) == -1) { - perror ("sigaltstack"); - return; - } - - pthread_attr_init (&attr); - if (pthread_create(&id, &attr, loop, &attr) != 0) { - printf ("pthread_create\n"); - return; - } - - sleep (100); - } - - int - main () - { - pid_t son; - int status; - int i; - - son = fork (); - if (son == -1) { - return 1; - } - - if (son == 0) { - child (); - return 0; - } - - for (i = 0; i < 300; ++i) { - waitpid (son, &status, WNOHANG); - if (WIFEXITED (status) && WEXITSTATUS (status) == 0) - return 0; - usleep (10000); - } - - kill (son, SIGKILL); - return 1; - } - - ], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WORKING_SIGALTSTACK, 1, [Have a working sigaltstack]) - ], [ - with_sigaltstack=no - AC_MSG_RESULT(no) - ]) - fi - - dnl ******************************** - dnl *** Checks for sys_signame *** - dnl ******************************** - AC_MSG_CHECKING(for sys_signame) - AC_TRY_LINK([ - #include - ], [ - const char *signame = sys_signame[0]; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SYSSIGNAME, 1, [Have sys_signame]) - ], [ - AC_MSG_RESULT(no) - ]) - - - dnl ******************************** - dnl *** Checks for semaphore lib *** - dnl ******************************** - # 'Real Time' functions on Solaris - # posix4 on Solaris 2.6 - # pthread (first!) on Linux - AC_SEARCH_LIBS(sem_init, pthread rt posix4) - - AC_SEARCH_LIBS(shm_open, pthread rt posix4) - AC_CHECK_FUNCS(shm_open) - - dnl ******************************** - dnl *** Checks for timezone stuff ** - dnl ******************************** - AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, - AC_TRY_COMPILE([ - #include - ], [ - struct tm tm; - tm.tm_gmtoff = 1; - ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)) - if test $ac_cv_struct_tm_gmtoff = yes; then - AC_DEFINE(HAVE_TM_GMTOFF, 1, [Have tm_gmtoff]) - else - AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone, - AC_TRY_COMPILE([ - #include - ], [ - timezone = 1; - ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)) - if test $ac_cv_var_timezone = yes; then - AC_DEFINE(HAVE_TIMEZONE, 1, [Have timezone variable]) - else - AC_ERROR(unable to find a way to determine timezone) - fi - fi - - dnl ********************************* - dnl *** Checks for math functions *** - dnl ********************************* - AC_SEARCH_LIBS(sqrtf, m) - - dnl **************************************************************** - dnl *** Checks for working poll() (macosx defines it but doesn't *** - dnl *** have it in the library (duh)) *** - dnl **************************************************************** - AC_CHECK_FUNCS(poll) - - dnl ********************************** - dnl *** epoll *** - dnl ********************************** - AC_CHECK_HEADERS(sys/epoll.h) - haveepoll=no - AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], ) - if test "x$haveepoll" = "xyes" -a "x$ac_cv_header_sys_epoll_h" = "xyes"; then - AC_DEFINE(HAVE_EPOLL, 1, [epoll supported]) - fi - - havekqueue=no - - AC_CHECK_HEADERS(sys/event.h) - AC_CHECK_FUNCS(kqueue, [havekqueue=yes], ) - - dnl ************************************** - dnl * Darwin has a race that prevents us from using reliably: - dnl * http://lists.apple.com/archives/darwin-dev/2011/Jun/msg00016.html - dnl * Since kqueue is mostly used for scaling large web servers, - dnl * and very few folks run Mono on large web servers on OSX, falling - dnl * back - dnl ************************************** - if test "x$havekqueue" = "xyes" -a "x$ac_cv_header_sys_event_h" = "xyes"; then - if test "x$host_darwin" = "xno"; then - AC_DEFINE(USE_KQUEUE_FOR_THREADPOOL, 1, [Use kqueue for the threadpool]) - fi - fi - - dnl ****************************** - dnl *** Checks for SIOCGIFCONF *** - dnl ****************************** - AC_CHECK_HEADERS(sys/ioctl.h) - AC_CHECK_HEADERS(net/if.h, [], [], - [ - #ifdef HAVE_SYS_TYPES_H - # include - #endif - #ifdef HAVE_SYS_SOCKET_H - # include - #endif - ]) - AC_MSG_CHECKING(for ifreq) - AC_TRY_COMPILE([ - #include - #include - #include - ], [ - struct ifconf ifc; - struct ifreq *ifr; - void *x; - ifc.ifc_len = 0; - ifc.ifc_buf = NULL; - x = (void *) &ifr->ifr_addr; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SIOCGIFCONF, 1, [Can get interface list]) - ], [ - AC_MSG_RESULT(no) - ]) - dnl ********************************** - dnl *** Checks for sin_len *** - dnl ********************************** - AC_MSG_CHECKING(for sockaddr_in.sin_len) - AC_TRY_COMPILE([ - #include - ], [ - struct sockaddr_in saddr; - saddr.sin_len = sizeof (saddr); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [sockaddr_in has sin_len]) - ], [ - AC_MSG_RESULT(no) - ]) - dnl ********************************** - dnl *** Checks for sin6_len *** - dnl ********************************** - AC_MSG_CHECKING(for sockaddr_in6.sin6_len) - AC_TRY_COMPILE([ - #include - ], [ - struct sockaddr_in6 saddr6; - saddr6.sin6_len = sizeof (saddr6); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SOCKADDR_IN6_SIN_LEN, 1, [sockaddr_in6 has sin6_len]) - ], [ - AC_MSG_RESULT(no) - ]) - dnl ********************************** - dnl *** Check for getifaddrs *** - dnl ********************************** - AC_MSG_CHECKING(for getifaddrs) - AC_TRY_LINK([ - #include - #include - #include - #ifdef HAVE_NET_IF_H - #include - #endif - #include - ], [ - getifaddrs(NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETIFADDRS, 1, [Have getifaddrs]) - ], [ - AC_MSG_RESULT(no) - ]) - dnl ********************************** - dnl *** Check for if_nametoindex *** - dnl ********************************** - AC_MSG_CHECKING(for if_nametoindex) - AC_TRY_LINK([ - #include - #include - #include - #include - ], [ - if_nametoindex(NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IF_NAMETOINDEX, 1, [Have if_nametoindex]) - ], [ - AC_MSG_RESULT(no) - ]) - dnl ********************************** - dnl *** Check for access *** - dnl ********************************** - AC_MSG_CHECKING(for access) - AC_TRY_LINK([ - #include - ], [ - access(NULL,0); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ACCESS, 1, [Have access]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Checks for proclib *** - dnl ********************************** - AC_CHECK_HEADER(sys/errno.h, [AC_DEFINE(HAVE_SYS_ERRNO_H, 1, Define to 1 if you have the header file.)]) - dnl ********************************** - dnl *** Checks for MonoPosixHelper *** - dnl ********************************** - AC_CHECK_HEADERS(checklist.h) - AC_CHECK_HEADERS(pathconf.h) - AC_CHECK_HEADERS(fstab.h) - AC_CHECK_HEADERS(attr/xattr.h) - AC_CHECK_HEADERS(sys/extattr.h) - AC_CHECK_HEADERS(sys/sendfile.h) - AC_CHECK_HEADERS(sys/statvfs.h) - AC_CHECK_HEADERS(sys/statfs.h) - AC_CHECK_HEADERS(sys/vfstab.h) - AC_CHECK_HEADERS(sys/xattr.h) - AC_CHECK_HEADERS(sys/mman.h) - AC_CHECK_HEADERS(sys/param.h) - AC_CHECK_HEADERS(sys/mount.h, [], [], - [ - #ifdef HAVE_SYS_PARAM_H - # include - #endif - ]) - AC_CHECK_HEADERS(sys/mount.h) - AC_CHECK_FUNCS(confstr) - AC_CHECK_FUNCS(seekdir telldir) - AC_CHECK_FUNCS(getdomainname) - AC_CHECK_FUNCS(setdomainname) - AC_CHECK_FUNCS(endgrent getgrent fgetgrent setgrent) - AC_CHECK_FUNCS(setgroups) - AC_CHECK_FUNCS(endpwent getpwent fgetpwent setpwent) - AC_CHECK_FUNCS(getfsstat) - AC_CHECK_FUNCS(lutimes futimes) - AC_CHECK_FUNCS(mremap) - AC_CHECK_FUNCS(remap_file_pages) - AC_CHECK_FUNCS(posix_fadvise) - AC_CHECK_FUNCS(posix_fallocate) - AC_CHECK_FUNCS(vsnprintf) - AC_CHECK_FUNCS(sendfile) - AC_CHECK_FUNCS(gethostid sethostid) - AC_CHECK_FUNCS(sethostname) - AC_CHECK_FUNCS(statfs) - AC_CHECK_FUNCS(fstatfs) - AC_CHECK_FUNCS(statvfs) - AC_CHECK_FUNCS(fstatvfs) - AC_CHECK_FUNCS(stime) - AC_CHECK_FUNCS(ttyname_r) - AC_CHECK_FUNCS(psignal) - AC_CHECK_FUNCS(getlogin_r) - AC_CHECK_FUNCS(lockf) - AC_CHECK_FUNCS(swab) - AC_CHECK_FUNCS(setusershell endusershell) - AC_CHECK_FUNCS(futimens utimensat) - AC_CHECK_FUNCS(fstatat mknodat readlinkat) - AC_CHECK_FUNCS(readv writev preadv pwritev) - AC_CHECK_FUNCS(setpgid) - AC_CHECK_FUNCS(system) - AC_CHECK_FUNCS(fork execv execve) - AC_CHECK_FUNCS(waitpid) - AC_CHECK_FUNCS(accept4) - AC_CHECK_FUNCS(localtime_r) - AC_CHECK_FUNCS(mkdtemp) - AC_CHECK_SIZEOF(size_t) - AC_CHECK_TYPES([blksize_t], [AC_DEFINE(HAVE_BLKSIZE_T)], , - [#include - #include - #include ]) - AC_CHECK_TYPES([blkcnt_t], [AC_DEFINE(HAVE_BLKCNT_T)], , - [#include - #include - #include ]) - AC_CHECK_TYPES([suseconds_t], [AC_DEFINE(HAVE_SUSECONDS_T)], , - [#include ]) - AC_CHECK_TYPES([struct cmsghdr], [AC_DEFINE(HAVE_STRUCT_CMSGHDR)], , - [#include ]) - AC_CHECK_TYPES([struct flock], [AC_DEFINE(HAVE_STRUCT_FLOCK)], , - [#include - #include ]) - AC_CHECK_TYPES([struct iovec], [AC_DEFINE(HAVE_STRUCT_IOVEC)], , - [#include ]) - AC_CHECK_TYPES([struct linger], [AC_DEFINE(HAVE_STRUCT_LINGER)], , - [#include ]) - AC_CHECK_TYPES([struct pollfd], [AC_DEFINE(HAVE_STRUCT_POLLFD)], , - [#include ]) - AC_CHECK_TYPES([struct sockaddr], [AC_DEFINE(HAVE_STRUCT_SOCKADDR)], , - [#include ]) - AC_CHECK_TYPES([struct sockaddr_storage], [AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)], , - [#include ]) - AC_CHECK_TYPES([struct sockaddr_in], [AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN)], , - [#include ]) - AC_CHECK_TYPES([struct sockaddr_in6], [AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)], , - [#include ]) - AC_CHECK_TYPES([struct sockaddr_un], [AC_DEFINE(HAVE_STRUCT_SOCKADDR_UN)], , - [#include ]) - AC_CHECK_TYPES([struct stat], [AC_DEFINE(HAVE_STRUCT_STAT)], , - [#include - #include - #include ]) - AC_CHECK_TYPES([struct timespec], [AC_DEFINE(HAVE_STRUCT_TIMESPEC)], , - [#include ]) - AC_CHECK_TYPES([struct timeval], [AC_DEFINE(HAVE_STRUCT_TIMEVAL)], , - [#include - #include - #include ]) - AC_CHECK_TYPES([struct timezone], [AC_DEFINE(HAVE_STRUCT_TIMEZONE)], , - [#include ]) - AC_CHECK_TYPES([struct utimbuf], [AC_DEFINE(HAVE_STRUCT_UTIMBUF)], , - [#include - #include ]) - AC_CHECK_MEMBERS( - [struct dirent.d_off, struct dirent.d_reclen, struct dirent.d_type],,, - [#include - #include ]) - AC_CHECK_MEMBERS( - [struct passwd.pw_gecos],,, - [#include - #include ]) - AC_CHECK_MEMBERS( - [struct statfs.f_flags],,, - [#include - #include ]) - AC_CHECK_MEMBERS( - [struct stat.st_atim, struct stat.st_mtim, struct stat.st_atimespec, struct stat.st_ctim],,, - [#include - #include - #include ]) - - dnl Favour xattr through glibc, but use libattr if we have to - AC_CHECK_FUNC(lsetxattr, , - AC_CHECK_LIB(attr, lsetxattr, XATTR_LIB="-lattr",) - ) - AC_SUBST(XATTR_LIB) - - dnl kinfo_proc.kp_proc works on darwin but fails on other simil-bsds - AC_CHECK_MEMBERS( - [struct kinfo_proc.kp_proc],,, - [#include - #include - #include - #include - ]) - - dnl ********************************* - dnl *** Checks for Windows compilation *** - dnl ********************************* - AC_CHECK_HEADERS(sys/time.h) - AC_CHECK_HEADERS(sys/param.h) - AC_CHECK_HEADERS(dirent.h) - - dnl ****************************************** - dnl *** Checks for OSX and iOS compilation *** - dnl ****************************************** - AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h) - - dnl ********************************* - dnl *** Check for Console 2.0 I/O *** - dnl ********************************* - AC_CHECK_HEADERS([curses.h]) - AC_CHECK_HEADERS([term.h], [], [], - [#if HAVE_CURSES_H - #include - #endif - ]) - AC_CHECK_HEADERS([termios.h]) - - dnl ********************************* - dnl *** Checks for random *** - dnl ********************************* - if test x$host_darwin = xno; then - AC_CHECK_HEADERS(sys/random.h) - AC_CHECK_FUNCS(getrandom getentropy) - fi - - dnl ********************************* - dnl *** Checks for Mono.Native *** - dnl ********************************* - - # Translated from CMake in external/corefx/src/Native/Unix/configure.cmake, keep in sync! - # Note: check_c_source_compiles in CMake is AC_TRY_LINK in autoconf - - AC_MSG_CHECKING(for linux/in.h) - AC_TRY_COMPILE([ - #include - #include - ], [ - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_LINUX_IN_H, 1, [linux/in.h]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_CHECK_HEADERS([linux/if_packet.h]) - - AC_MSG_CHECKING(for struct in_pktinfo) - AC_TRY_COMPILE([ - #ifdef HAVE_LINUX_IN_H - #include - #include - #else - #include - #endif - ], [ - struct in_pktinfo pktinfo; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IN_PKTINFO, 1, [struct in_pktinfo]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING(for struct ip_mreqn) - AC_TRY_COMPILE([ - #if HAVE_LINUX_IN_H - #include - #include - #else - #include - #endif - ], [ - struct ip_mreqn mreqn; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IP_MREQN, 1, struct ip_mreqn) - ], [ - AC_MSG_RESULT(no) - ]) - - if test x$host_darwin = xno; then - AC_CHECK_TYPES([struct flock64], [AC_DEFINE(HAVE_FLOCK64, 1, struct flock64)], , [#include ]) - fi - - AC_CHECK_DECL(O_CLOEXEC, [AC_DEFINE(HAVE_O_CLOEXEC, 1, [O_CLOEXEC])], [], [[#include ]]) - AC_CHECK_DECL(F_DUPFD_CLOEXEC, [AC_DEFINE(HAVE_F_DUPFD_CLOEXEC, 1, [F_DUPFD_CLOEXEC])], [], [[#include ]]) - - # AC_CHECK_FUNC(getifaddrs, [AC_DEFINE(HAVE_GETIFADDRS, 1, [getifaddrs])]) # already done above - AC_CHECK_FUNC(Qp2getifaddrs, [AC_DEFINE(HAVE_QP2GETIFADDRS, 1, [Qp2getifaddrs])]) - - AC_CHECK_FUNC(lseek64, [AC_DEFINE(HAVE_LSEEK64, 1, [lseek64])]) - AC_CHECK_FUNC(mmap64, [AC_DEFINE(HAVE_MMAP64, 1, [mmap64])]) - AC_CHECK_FUNC(ftruncate64, [AC_DEFINE(HAVE_FTRUNCATE64, 1, [ftruncate64])]) - AC_CHECK_FUNC(posix_fadvise64, [AC_DEFINE(HAVE_POSIX_FADVISE64, 1, [posix_fadvise64])]) - - if test "x$mono_native_platform_ios" = "xno"; then - # On iOS, `stat64()` is deprecated and there is no `struct stat64` and `stat()` - # is either 32-bit or 64-bit based on the device / simulator that you're running on. - AC_CHECK_FUNC(stat64, [AC_DEFINE(HAVE_STAT64, 1, [stat64])]) - fi - - AC_CHECK_DECL(pipe2, [AC_DEFINE(HAVE_PIPE2, 1, [pipe2])]) - AC_CHECK_FUNC(getmntinfo, [AC_DEFINE(HAVE_GETMNTINFO, 1, [getmntinfo])], [], [[#include ]]) - AC_CHECK_FUNC(strcpy_s, [AC_DEFINE(HAVE_STRCPY_S, 1, [strcpy_s])]) - AC_CHECK_FUNC(strlcpy, [AC_DEFINE(HAVE_STRLCPY, 1, [strlcpy])]) - AC_CHECK_FUNC(posix_fadvise, [AC_DEFINE(HAVE_POSIX_ADVISE, 1, [posix_fadvise])]) # the define is called HAVE_POSIX_ADVISE in corefx, not a typo - AC_CHECK_FUNC(ioctl, [AC_DEFINE(HAVE_IOCTL, 1, [ioctl])]) - AC_CHECK_FUNC(sched_getaffinity, [AC_DEFINE(HAVE_SCHED_GETAFFINITY, 1, [sched_getaffinity])]) - AC_CHECK_FUNC(sched_setaffinity, [AC_DEFINE(HAVE_SCHED_SETAFFINITY, 1, [sched_setaffinity])]) - - if test "x$platform_android" != "xyes"; then - AC_CHECK_FUNC(arc4random_buf, [AC_DEFINE(HAVE_ARC4RANDOM_BUF, 1, [arc4random_buf])]) - fi - - AC_CHECK_DECL(TIOCGWINSZ, [AC_DEFINE(HAVE_TIOCGWINSZ, 1, [TIOCGWINSZ])], [], [[#include ]]) - AC_CHECK_FUNC(tcgetattr, [AC_DEFINE(HAVE_TCGETATTR, 1, [tcgetattr])]) - AC_CHECK_FUNC(tcsetattr, [AC_DEFINE(HAVE_TCSETATTR, 1, [tcsetattr])]) - AC_CHECK_DECL(ECHO, [AC_DEFINE(HAVE_ECHO, 1, [ECHO])], [], [[#include ]]) - AC_CHECK_DECL(ICANON, [AC_DEFINE(HAVE_ICANON, 1, [ICANON])], [], [[#include ]]) - AC_CHECK_DECL(TCSANOW, [AC_DEFINE(HAVE_TCSANOW, 1, [TCSANOW])], [], [[#include ]]) - - AC_CHECK_DECL(lchflags, [AC_DEFINE(HAVE_LCHFLAGS, 1, [lchflags])], [], - [[#include - #include ]]) - AC_CHECK_MEMBER(struct stat.st_flags, - [AC_DEFINE(HAVE_STAT_FLAGS, 1, [struct stat.st_flags])], - [], - [#include - #include ]) - - AC_CHECK_MEMBER(struct stat.st_birthtimespec, - [AC_DEFINE(HAVE_STAT_BIRTHTIME, 1, [struct stat.st_birthtimespec])], - [], - [#include - #include ]) - AC_CHECK_MEMBER(struct stat.st_atimespec, - [AC_DEFINE(HAVE_STAT_TIMESPEC, 1, [struct stat.st_atimespec])], - [], - [#include - #include ]) - AC_CHECK_MEMBER(struct stat.st_atim, - [AC_DEFINE(HAVE_STAT_TIM, 1, [struct stat.st_atim])], - [], - [#include - #include ]) - AC_CHECK_MEMBER(struct stat.st_atimensec, - [AC_DEFINE(HAVE_STAT_NSEC, 1, [struct stat.st_atimensec])], - [], - [#include - #include ]) - AC_CHECK_MEMBER(struct dirent.d_namlen, [AC_DEFINE(HAVE_DIRENT_NAME_LEN, 1, [struct dirent.d_namlen])], [], [#include ]) - AC_CHECK_MEMBER(struct statfs.f_fstypename, [AC_DEFINE(HAVE_STATFS_FSTYPENAME, 1, [struct statfs.f_fstypename])], [], [#include ]) - AC_CHECK_MEMBER(struct statvfs.f_fstypename, [AC_DEFINE(HAVE_STATVFS_FSTYPENAME, 1, [struct statvfs.f_fstypename])], [], [#include ]) - - AC_MSG_CHECKING(for struct statfs) - AC_TRY_COMPILE([ - #if defined(HAVE_STATFS_FSTYPENAME) || defined(HAVE_STATVFS_FSTYPENAME) - #include - #else - #include - #endif - ], [ - struct statfs; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STATFS, 1, [struct statfs]) - ], [ - AC_MSG_RESULT(no) - ]) - - if test "x$ac_cv_func_strerror_r_char_p" = "xyes" ; then - AC_DEFINE(HAVE_GNU_STRERROR_R, 1, [char* strerror(int errnum, char *buf, size_t buflen)]) - fi - - AC_MSG_CHECKING(for readdir_r) - AC_TRY_LINK([ - #include - ], [ - DIR* dir; - struct dirent* entry; - struct dirent* result; - readdir_r(dir, entry, &result); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_READDIR_R, 1, [readdir_r]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING(for kevent with void *data) - AC_TRY_LINK([ - #include - #include - ], [ - struct kevent event; - void* data; - EV_SET(&event, 0, EVFILT_READ, 0, 0, 0, data); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(KEVENT_HAS_VOID_UDATA, 1, [kevent with void *data]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_CHECK_MEMBER(struct fd_set.fds_bits, [AC_DEFINE(HAVE_FDS_BITS, 1, [struct fd_set.fds_bits])], [], [[#include ]]) - AC_CHECK_MEMBER(struct fd_set.__fds_bits, [AC_DEFINE(HAVE_PRIVATE_FDS_BITS, 1, [struct fd_set.__fds_bits])], [], [[#include ]]) - - AC_MSG_CHECKING(for sendfile with 4 arguments) - AC_TRY_LINK([ - #include - ], [ - #if defined(TARGET_ANDROID) - #if !defined(__ANDROID_API__) - #error No definition for __ANDROID_API__ even though we're targeting TARGET_ANDROID - #elif __ANDROID_API__ < 21 - #error sendfile is not supported on this Android API level - #endif - #endif - - int result = sendfile(0, 0, 0, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SENDFILE_4, 1, [sendfile with 4 arguments]) - ], [ - AC_MSG_RESULT(no) - ]) - - ORIG_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror-implicit-function-declaration" - - AC_MSG_CHECKING(for sendfile with 6 arguments) - AC_TRY_LINK([ - #include - #include - #include - #include - ], [ - int result = sendfile(0, 0, 0, NULL, NULL, 0); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SENDFILE_6, 1, [sendfile with 6 arguments]) - ], [ - AC_MSG_RESULT(no) - ]) - - CFLAGS="$ORIG_CFLAGS" - - AC_CHECK_FUNC(fcopyfile, [AC_DEFINE(HAVE_FCOPYFILE, 1, [fcopyfile])]) - AC_CHECK_FUNC(epoll_create1, [AC_DEFINE(HAVE_EPOLL, 1, [epoll_create1])]) - AC_CHECK_FUNC(accept4, [AC_DEFINE(HAVE_ACCEPT4, 1, [accept4])]) - AC_CHECK_FUNC(kqueue, [AC_DEFINE(HAVE_KQUEUE, 1, [kqueue])]) - - ORIG_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror=sign-conversion" - - AC_MSG_CHECKING(for getnameinfo with signed flags) - AC_TRY_LINK([ - #include - #include - ], [ - const struct sockaddr *addr; - socklen_t addrlen; - char *host; - socklen_t hostlen; - char *serv; - socklen_t servlen; - int flags; - int result = getnameinfo(addr, addrlen, host, hostlen, serv, servlen, flags); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETNAMEINFO_SIGNED_FLAGS, 1, [getnameinfo with signed flags]) - ], [ - AC_MSG_RESULT(no) - ]) - - CFLAGS="$ORIG_CFLAGS" - - if test "x$host_linux" = "xyes"; then - AC_DEFINE(HAVE_SUPPORT_FOR_DUAL_MODE_IPV4_PACKET_INFO, 1, [HAVE_SUPPORT_FOR_DUAL_MODE_IPV4_PACKET_INFO]) - else - AC_DEFINE(HAVE_SUPPORT_FOR_DUAL_MODE_IPV4_PACKET_INFO, 0, [HAVE_SUPPORT_FOR_DUAL_MODE_IPV4_PACKET_INFO]) - fi - - # HAVE_CLOCK_MONOTONIC check already done above - # HAVE_CLOCK_REALTIME check already done above - # HAVE_MACH_ABSOLUTE_TIME check already done above - # HAVE_MACH_TIMEBASE_INFO check already done above - # HAVE_FUTIMES check already done above - # HAVE_FUTIMENS check already done above - - ORIG_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror=sign-conversion" - - AC_MSG_CHECKING(for bind with unsigned addrlen) - AC_TRY_LINK([ - #include - ], [ - int fd; - struct sockaddr* addr; - socklen_t addrLen; - bind(fd, addr, addrLen); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(BIND_ADDRLEN_UNSIGNED, 1, [bind with unsigned addrlen]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING(for struct ipv6_mreq with unsigned ipv6mr_interface) - AC_TRY_LINK([ - #include - #include - ], [ - struct ipv6_mreq opt; - unsigned int index = 0; - opt.ipv6mr_interface = index; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(IPV6MR_INTERFACE_UNSIGNED, 1, [struct ipv6_mreq with unsigned ipv6mr_interface]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING(for inotify_rm_watch with unsigned wd) - AC_TRY_LINK([ - #include - ], [ - intptr_t fd; - uint32_t wd; - int result = inotify_rm_watch(fd, wd); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(INOTIFY_RM_WATCH_WD_UNSIGNED, 1, [inotify_rm_watch with unsigned wd]) - ], [ - AC_MSG_RESULT(no) - ]) - - case "$host" in - *-*-*freebsd*) - dnl ***************************** - dnl *** Checks for libinotify *** - dnl ***************************** - AC_CHECK_LIB(inotify, inotify_init, LIBS="$LIBS -linotify") - if test "x$ac_cv_lib_inotify_inotify_init" = "xyes" ; then - AC_DEFINE(HAVE_LIBINOTIFY, 1, [FreeBSD libinotify kqueue shim]) - dnl Needs to be done this way to avoid collision with various - dnl ports including glib and llvm* - METADATA_CFLAGS="-I/usr/local/include" - AC_SUBST(METADATA_CFLAGS) - fi - dnl Workaround due to inotify_rm_watch check failing without -I - AC_MSG_CHECKING(for inotify_rm_watch with unsigned wd in libinotify) - AC_TRY_LINK([ - #include - ], [ - intptr_t fd; - uint32_t wd; - int result = inotify_rm_watch(fd, wd); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(INOTIFY_RM_WATCH_WD_UNSIGNED, 1, [inotify_rm_watch with unsigned wd]) - ], [ - AC_MSG_RESULT(no) - ]) - esac - - CFLAGS="$ORIG_CFLAGS" - - AC_MSG_CHECKING(for shm_open that works well enough with mmap) - if test "x$ac_cv_func_shm_open" = "xno" -o "x$ac_cv_func_shm_open_working_with_mmap" = "xno" ; then - AC_MSG_RESULT(no) - elif test "x$cross_compiling" = "xyes"; then - AC_MSG_RESULT(cross compiling, assuming yes) - AC_DEFINE(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP, 1, [shm_open that works well enough with mmap]) - else - AC_TRY_RUN([ - #include - #include - #include - - int main () - { - #ifdef __PASE__ - /* IBM i doesn't implement this and returns SIGILL */ - return -1; - #endif - int fd = shm_open("/mono_configure_shm_open", O_CREAT | O_RDWR, 0777); - if (fd == -1) - return -1; - - shm_unlink("/mono_configure_shm_open"); - - // NOTE: PROT_EXEC and MAP_PRIVATE don't work well with shm_open - // on at least the current version of Mac OS X - - if (mmap(NULL, 1, PROT_EXEC, MAP_PRIVATE, fd, 0) == MAP_FAILED) - return -1; - - return 0; - } - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP, 1, [shm_open that works well enough with mmap]) - ], [ - AC_MSG_RESULT(no) - ]) - fi - - AC_MSG_CHECKING(for getpriority with int who) - AC_TRY_LINK([ - #include - ], [ - int which; - int who; - int result = getpriority(which, who); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(PRIORITY_REQUIRES_INT_WHO, 1, [getpriority with int who]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING(for kevent with int parameters) - AC_TRY_LINK([ - #include - #include - ], [ - int kg; - const struct kevent* chagelist; - int nchanges; - struct kevent* eventlist; - int nevents; - const struct timespec* timeout; - int result = kevent(kg, chagelist, nchanges, eventlist, nevents, timeout); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(KEVENT_REQUIRES_INT_PARAMS, 1, [kevent with int parameters]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_CHECK_FUNCS(mkstemps) - # AC_CHECK_FUNCS(mkstemp) # already done above - - if test "x$ac_cv_func_mkstemps" != "xyes" -a "x$ac_cv_func_mkstemp" != "xyes"; then - AC_MSG_ERROR([Cannot find mkstemps or mkstemp on this platform]) - fi - - AC_MSG_CHECKING(for tcp/var.h) - AC_TRY_LINK([ - #include - #include - #include - #include - #include - ], [ - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TCP_VAR_H, 1, [tcp/var.h]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_CHECK_HEADERS([sys/cdefs.h]) - - AC_MSG_CHECKING(for TCPSTATE enum in netinet/tcp.h) - AC_TRY_LINK([ - #ifdef HAVE_SYS_CDEFS_H - #include - #endif - #include - ], [ - int result = TCP_ESTABLISHED; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TCP_H_TCPSTATE_ENUM, 1, [TCPSTATE enum in netinet/tcp.h]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_CHECK_DECL(TCPS_ESTABLISHED, [AC_DEFINE(HAVE_TCP_FSM_H, 1, [HAVE_TCP_FSM_H])], [], [[#include ]]) - - AC_MSG_CHECKING(for struct rt_msghdr) - AC_TRY_COMPILE([ - #include - #include - ], [ - struct rt_msghdr; - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_RT_MSGHDR, 1, [struct rt_msghdr]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_CHECK_HEADERS([sys/sysctl.h]) - AC_CHECK_HEADERS([linux/rtnetlink.h]) - - AC_CHECK_FUNC(getpeereid, [AC_DEFINE(HAVE_GETPEEREID, 1, [getpeereid])]) - #AC_CHECK_FUNC(getdomainname, [AC_DEFINE(HAVE_GETDOMAINNAME, 1, [getdomainname])]) # already done above - AC_CHECK_FUNC(uname, [AC_DEFINE(HAVE_UNAME, 1, [uname])]) - - ORIG_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror=shorten-64-to-32" - - AC_MSG_CHECKING(for getdomainname with size_t namelen) - AC_TRY_LINK([ - #include - ], [ - size_t namelen = 20; - char name[20]; - int result = getdomainname(name, namelen); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETDOMAINNAME_SIZET, 1, [getdomainname with size_t namelen]) - ], [ - AC_MSG_RESULT(no) - ]) - - CFLAGS="$ORIG_CFLAGS" - - AC_CHECK_FUNC(inotify_init, [AC_DEFINE(HAVE_INOTIFY_INIT, 1, [inotify_init])]) - AC_CHECK_FUNC(inotify_add_watch, [AC_DEFINE(HAVE_INOTIFY_ADD_WATCH, 1, [inotify_add_watch])]) - AC_CHECK_FUNC(inotify_rm_watch, [AC_DEFINE(HAVE_INOTIFY_RM_WATCH, 1, [inotify_rm_watch])]) - - if test "x$ac_cv_func_inotify_init" = "xyes" -a "x$ac_cv_func_inotify_add_watch" = "xyes" -a "x$ac_cv_func_inotify_rm_watch" = "xyes"; then - AC_DEFINE(HAVE_INOTIFY, 1, [HAVE_INOTIFY]) - elif test "x$host_linux" = "xyes"; then - AC_MSG_ERROR([Cannot find inotify functions on a Linux platform.]) - fi - - # HAVE_CURLM_ADDED_ALREADY check skipped because we don't use libcurl in mono - # HAVE_CURL_HTTP_VERSION_2TLS check skipped because we don't use libcurl in mono - # HAVE_CURLPIPE_MULTIPLEX check skipped because we don't use libcurl in mono - # HAVE_CURL_SSLVERSION_TLSv1_012 check skipped because we don't use libcurl in mono - - enable_gss=no; - AC_MSG_CHECKING(for GSS/GSS.h) - AC_TRY_COMPILE([ - #include - ], [ - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GSSFW_HEADERS, 1, [GSS/GSS.h]) - AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM]) - enable_gss=yes - AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING(for gssapi/gssapi_ext.h) - AC_TRY_COMPILE([ - #include - ], [ - ],[ - AC_MSG_RESULT(yes) - enable_gss=yes - AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_MSG_CHECKING(for GSS_SPNEGO_MECHANISM) - AC_TRY_COMPILE([ - #include - #include - gss_OID_set_desc gss_mech_spnego_OID_set_desc = {.count = 1, .elements = GSS_SPNEGO_MECHANISM}; - ], [ - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM]) - ], [ - AC_MSG_RESULT(no) - ]) - - AM_CONDITIONAL(ENABLE_GSS, test x$enable_gss = xyes) - - AC_CHECK_HEADERS([crt_externs.h]) - - AC_MSG_CHECKING(for _NSGetEnviron) - AC_TRY_LINK([ - #include - ], [ - char **result = *(_NSGetEnviron()); - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_NSGETENVIRON, 1, [_NSGetEnviron]) - ], [ - AC_MSG_RESULT(no) - ]) - - AC_CHECK_DECL(IN_EXCL_UNLINK, [AC_DEFINE(HAVE_IN_EXCL_UNLINK, 1, [IN_EXCL_UNLINK])], [], [[#include ]]) - - 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) - - dnl ********************************* - dnl *** Checks for Windows compilation *** - dnl ********************************* - AC_CHECK_HEADERS(winternl.h) - - jdk_headers_found=no - AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?)) - AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?)) - AC_CHECK_LIB(ole32, main, LIBS="$LIBS -lole32", AC_ERROR(bad mingw install?)) - AC_CHECK_LIB(winmm, main, LIBS="$LIBS -lwinmm", AC_ERROR(bad mingw install?)) - AC_CHECK_LIB(oleaut32, main, LIBS="$LIBS -loleaut32", AC_ERROR(bad mingw install?)) - AC_CHECK_LIB(advapi32, main, LIBS="$LIBS -ladvapi32", AC_ERROR(bad mingw install?)) - AC_CHECK_LIB(version, main, LIBS="$LIBS -lversion", AC_ERROR(bad mingw install?)) - - AC_CHECK_TYPES([struct sockaddr_in6], [AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)], , [#include ]) - - dnl ********************************* - dnl *** Check for struct ip_mreqn *** - dnl ********************************* - AC_MSG_CHECKING(for struct ip_mreqn) - AC_TRY_COMPILE([#include ], [ - struct ip_mreqn mreq; - mreq.imr_address.s_addr = 0; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRUCT_IP_MREQN) - ], [ - # We'll just have to try and use struct ip_mreq - AC_MSG_RESULT(no) - AC_MSG_CHECKING(for struct ip_mreq) - AC_TRY_COMPILE([#include ], [ - struct ip_mreq mreq; - mreq.imr_interface.s_addr = 0; - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRUCT_IP_MREQ) - ], [ - # No multicast support - AC_MSG_RESULT(no) - ]) - ]) - - dnl ********************************** - dnl *** Check for getaddrinfo *** - dnl ********************************** - AC_MSG_CHECKING(for getaddrinfo) - AC_TRY_LINK([ - #include - #include - #include - ], [ - getaddrinfo(NULL,NULL,NULL,NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETADDRINFO, 1, [Have getaddrinfo]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for gethostbyname *** - dnl ********************************** - AC_MSG_CHECKING(for gethostbyname) - AC_TRY_LINK([ - #include - #include - #include - ], [ - gethostbyname(NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [Have gethostbyname]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for getprotobyname *** - dnl ********************************** - AC_MSG_CHECKING(for getprotobyname) - AC_TRY_LINK([ - #include - #include - #include - ], [ - getprotobyname(NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETPROTOBYNAME, 1, [Have getprotobyname]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for getnameinfo *** - dnl ********************************** - AC_MSG_CHECKING(for getnameinfo) - AC_TRY_LINK([ - #include - #include - #include - ], [ - getnameinfo (NULL, 0, NULL, 0, NULL, 0, 0); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETNAMEINFO, 1, [Have getnameinfo]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for inet_ntop *** - dnl ********************************** - AC_MSG_CHECKING(for inet_ntop) - AC_TRY_LINK([ - #include - #include - #include - ], [ - inet_ntop (0, NULL, NULL, 0); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INET_NTOP, 1, [Have inet_ntop]) - ], [ - AC_MSG_RESULT(no) - ]) - - dnl ********************************** - dnl *** Check for inet_pton *** - dnl ********************************** - AC_MSG_CHECKING(for inet_pton) - AC_TRY_LINK([ - #include - #include - #include - ], [ - #ifndef inet_pton - (void) inet_pton; - #endif - inet_pton (0, NULL, NULL); - ], [ - # Yes, we have it... - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INET_PTON, 1, [Have inet_pton]) - ], [ - AC_MSG_RESULT(no) - ]) -fi - -dnl socklen_t check -AC_MSG_CHECKING(for socklen_t) -AC_TRY_COMPILE([ -#include -#include -],[ - socklen_t foo; -],[ -ac_cv_c_socklen_t=yes - AC_DEFINE(HAVE_SOCKLEN_T, 1, [Have socklen_t]) - AC_MSG_RESULT(yes) -],[ - AC_MSG_RESULT(no) -]) - -AC_CHECK_FUNCS(execvp) - -dnl **************************** -dnl *** Look for /dev/random *** -dnl **************************** - -AC_MSG_CHECKING([if usage of random device is requested]) -AC_ARG_ENABLE(dev-random, -[ --disable-dev-random disable the use of the random device (enabled by default)], -try_dev_random=$enableval, try_dev_random=yes) - -AC_MSG_RESULT($try_dev_random) - -case "{$build}" in - -dnl IBM i does not have /dev/random, use unblocking only - - *-*-os400*) - NAME_DEV_RANDOM="/dev/urandom" - ;; - -dnl Win32 does not have /dev/random, they have their own method... - - *-mingw*|*-*-cygwin*) - ac_cv_have_dev_random=no - ;; - -dnl Everywhere else, it's /dev/random - - *) - NAME_DEV_RANDOM="/dev/random" - ;; -esac - -AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM", [Name of /dev/random]) - -dnl Now check if the device actually exists - -if test "x$try_dev_random" = "xyes"; then - AC_CACHE_CHECK(for random device, ac_cv_have_dev_random, - [if test -r "$NAME_DEV_RANDOM" ; then - ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi]) - if test "x$ac_cv_have_dev_random" = "xyes"; then - AC_DEFINE(HAVE_CRYPT_RNG, 1, [Have /dev/random]) - fi -else - AC_MSG_CHECKING(for random device) - ac_cv_have_dev_random=no - AC_MSG_RESULT(has been disabled) -fi - -if test "x$host_win32" = "xyes"; then - AC_DEFINE(HAVE_CRYPT_RNG) -fi - -if test "x$ac_cv_have_dev_random" = "xno" \ - && test "x$host_win32" = "xno"; then - AC_MSG_WARN([[ -*** -*** A system-provided entropy source was not found on this system. -*** Because of this, the System.Security.Cryptography random number generator -*** will throw a NotImplemented exception. -*** -*** If you are seeing this message, and you know your system DOES have an -*** entropy collection in place, please report an issue on GitHub and -*** provide information about the system and how to access the random device. -*** -*** Otherwise you can install either egd or prngd and set the environment -*** variable MONO_EGD_SOCKET to point to the daemon's socket to use that. -***]]) -fi - -AC_ARG_ENABLE(bcl-opt, [ --disable-bcl-opt BCL is compiled with no optimizations (allows accurate BCL debugging)], test_bcl_opt=$enableval, test_bcl_opt=yes) - -AC_MSG_CHECKING([if big-arrays are to be enabled]) -AC_ARG_ENABLE(big-arrays, [ --enable-big-arrays Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no) -if test "x$enable_big_arrays" = "xyes" ; then - if test "x$ac_cv_sizeof_void_p" = "x8"; then - AC_DEFINE(MONO_BIG_ARRAYS,1,[Enable the allocation and indexing of arrays greater than Int32.MaxValue]) - else - AC_MSG_ERROR([The allocation and indexing of arrays greater than Int32.MaxValue is not supported on this platform.]) - fi -fi -AC_MSG_RESULT($enable_big_arrays) - -dnl ************** -dnl *** DTRACE *** -dnl ************** - -AC_ARG_ENABLE(dtrace,[ --enable-dtrace Enable DTrace probes], enable_dtrace=$enableval, enable_dtrace=$has_dtrace) - -if test "x$enable_dtrace" = "xyes"; then - if test "x$has_dtrace" = "xno"; then - AC_MSG_ERROR([DTrace probes are not supported on this platform.]) - fi - AC_PATH_PROG(DTRACE, [dtrace], [no], [$PATH:/usr/sbin]) - if test "x$DTRACE" = "xno"; then - AC_MSG_RESULT([dtrace utility not found, dtrace support disabled.]) - enable_dtrace=no - elif ! $DTRACE -h -s $srcdir/data/mono.d > /dev/null 2>&1; then - AC_MSG_RESULT([dtrace doesn't support -h option, dtrace support disabled.]) - enable_dtrace=no - fi -fi - -dtrace_g=no -if test "x$enable_dtrace" = "xyes"; then - AC_DEFINE(ENABLE_DTRACE, 1, [Enable DTrace probes]) - DTRACEFLAGS= - if test "x$ac_cv_sizeof_void_p" = "x8"; then - case "$host" in - powerpc-*-darwin*) - DTRACEFLAGS="-arch ppc64" - ;; - i*86-*-darwin*) - DTRACEFLAGS="-arch x86_64" - ;; - *) - DTRACEFLAGS=-64 - ;; - esac - else - case "$host" in - powerpc-*-darwin*) - DTRACEFLAGS="-arch ppc" - ;; - i*86-*-darwin*) - DTRACEFLAGS="-arch i386" - ;; - *) - DTRACEFLAGS=-32 - ;; - esac - fi - AC_SUBST(DTRACEFLAGS) - case "$host" in - *-*-solaris*) - dtrace_g=yes - ;; - esac - AC_CHECK_HEADERS([sys/sdt.h]) -fi -AM_CONDITIONAL(ENABLE_DTRACE, [test x$enable_dtrace = xyes]) -AM_CONDITIONAL(DTRACE_G_REQUIRED, [test x$dtrace_g = xyes]) - -dnl ************************** -dnl *** AOT cross offsets *** -dnl ************************** - -AC_ARG_WITH(cross-offsets, [ --with-cross-offsets= Explicit AOT cross offsets file], - AC_DEFINE_UNQUOTED(MONO_OFFSETS_FILE, "$withval", [AOT cross offsets file])) - -dnl ************** -dnl *** LLVM *** -dnl ************** - -AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=default) -AC_ARG_ENABLE(loadedllvm,[ --enable-loadedllvm Load the LLVM back-end dynamically], enable_llvm=$enableval && enable_loadedllvm=$enableval, enable_loadedllvm=no) -AC_ARG_ENABLE(llvm-version-check,[ --enable-llvm-version-check Check that the LLVM matches the version expected by mono], enable_llvm_version_check=$enableval, enable_llvm_version_check=no) -AC_ARG_ENABLE(llvm-runtime,[ --enable-llvm-runtime Enable runtime support for llvmonly code], enable_llvm_runtime=$enableval, enable_llvm_runtime=no) -AC_ARG_ENABLE(llvm-asserts,[ --enable-llvm-asserts Enable llvm asserts (option to LLVM in CMake)], enable_llvm_asserts=$enableval, enable_llvm_asserts=no) - -AC_ARG_WITH(llvm, [ --with-llvm= Enable the LLVM back-end], enable_llvm=yes,) - -if test "x$enable_llvm" = "xdefault"; then - enable_llvm=$enable_llvm_default -fi - -if test "x$enable_loadedllvm" = "xyes"; then - AC_MSG_WARN("Loadable LLVM is no longer supported. Enabling default LLVM support instead.") - enable_llvm=yes -fi - -enable_llvm_msvc_only="no" -if test "x$enable_llvm" = "xyes"; then - if test "x$host_win32" = "xyes"; then - if test "x$cross_compiling" = "xno"; then - case "$target" in - x86_64*) - AC_MSG_WARN("LLVM for host=Windows and target=Windows is only supported on x64 MSVC builds. Disabling LLVM for GCC build.") - enable_llvm_msvc_only="yes" - ;; - i686*) - AC_MSG_ERROR("LLVM for host=Windows and target=Windows is only supported for x64 builds.") - ;; - esac - fi - fi -fi - -internal_llvm="no" -if test "x$enable_llvm" = "xyes"; then - if test "x$with_llvm" != "x"; then - EXTERNAL_LLVM_CONFIG=$with_llvm/bin/llvm-config - if test x$host_win32 = xyes; then - EXTERNAL_LLVM_CONFIG=$EXTERNAL_LLVM_CONFIG.exe - fi - if test ! -x $EXTERNAL_LLVM_CONFIG; then - AC_MSG_ERROR([LLVM executable $EXTERNAL_LLVM_CONFIG not found.]) - fi - else - internal_llvm=yes - fi - - LLVM_CODEGEN_LIBS="x86codegen" - case "$target" in - arm*) - LLVM_CODEGEN_LIBS="armcodegen" - ;; - aarch64*) - LLVM_CODEGEN_LIBS="aarch64codegen" - ;; - powerpc*) - LLVM_CODEGEN_LIBS="powerpccodegen" - ;; - esac - if test "x$host" != "x$target"; then - # No need for jit libs - LLVM_CODEGEN_LIBS= - fi - - AC_SUBST(LLVM_CODEGEN_LIBS) - AC_SUBST(EXTERNAL_LLVM_CONFIG) - - if test "x$host_win32" = "xyes" && test "x$cross_compiling" = "xno" && test "x$internal_llvm" = "xno"; then - EXTERNAL_LLVM_CONFIG_WIN32=$(cygpath -m $EXTERNAL_LLVM_CONFIG) - AC_SUBST(EXTERNAL_LLVM_CONFIG_WIN32) - fi - if test "x$enable_llvm_msvc_only" != "xyes"; then - AC_DEFINE(ENABLE_LLVM, 1, [Enable the LLVM back end]) - else - AC_DEFINE(ENABLE_LLVM_MSVC_ONLY, 1, [Enable the LLVM back end]) - fi -fi # ENABLE_LLVM - -# AC_DEFINE necessary for correct restore behavior on Linux -AM_CONDITIONAL(INTERNAL_LLVM, [test "x$internal_llvm" != "xno" && test "x$enable_llvm_msvc_only" != "xyes"]) -if test "x$internal_llvm" != "xno"; then - if test "x$enable_llvm_msvc_only" != "xyes"; then - AC_DEFINE(INTERNAL_LLVM, 1, [LLVM used is being build during mono build]) - else - AC_DEFINE(INTERNAL_LLVM_MSVC_ONLY, 1, [LLVM used is being build during mono build]) - fi -fi - -AM_CONDITIONAL(INTERNAL_LLVM_ASSERTS, [test "x$enable_llvm_asserts" != "xno" && test "x$enable_llvm_msvc_only" != "xyes"]) -if test "x$enable_llvm_asserts" != "xno"; then - if test "x$enable_llvm_msvc_only" != "xyes"; then - AC_DEFINE(INTERNAL_LLVM_ASSERTS, 1, [Build LLVM with assertions]) - else - AC_DEFINE(INTERNAL_LLVM_ASSERTS_MSVC_ONLY, 1, [Build LLVM with assertions]) - fi -fi - -AM_CONDITIONAL(ENABLE_LLVM, [test x$enable_llvm = xyes && test x$enable_llvm_msvc_only != xyes]) - -if test "x$enable_llvm" = "xyes"; then - enable_llvm_runtime=yes -fi - -AM_CONDITIONAL(ENABLE_LLVM_RUNTIME, [test x$enable_llvm_runtime = xyes && test x$enable_llvm_msvc_only != xyes]) -if test "x$enable_llvm_runtime" = "xyes"; then - if test "x$enable_llvm_msvc_only" != "xyes"; then - AC_DEFINE(ENABLE_LLVM_RUNTIME, 1, [Runtime support code for llvm enabled]) - else - AC_DEFINE(ENABLE_LLVM_RUNTIME_MSVC_ONLY, 1, [Runtime support code for llvm enabled]) - fi -fi - -TARGET="unknown" -ACCESS_UNALIGNED="yes" - -LIBC="libc.so.6" -INTL="libc.so.6" -SQLITE="libsqlite.so.0" -SQLITE3="libsqlite3.so.0" -ODBC="libodbc.so.2" -X11="libX11.so" -GDKX11="libgdk-x11-2.0.so.0" -GTKX11="libgtk-x11-2.0.so.0" -XINERAMA="libXinerama.so.1" - -sizeof_register="SIZEOF_VOID_P" - -jit_wanted=true -boehm_supported=true -BTLS_SUPPORTED=no -BTLS_PLATFORM= -INTERP_CFLAGS="" - -case "$host" in - wasm32*) - TARGET=WASM - arch_target=wasm - BTLS_SUPPORTED=no - ACCESS_UNALIGNED="no" - with_tls=pthread - target_wasm=yes - if test "x$mono_cv_clang" = "xyes"; then - INTERP_CFLAGS="-mllvm -join-liveintervals=false" - AC_SUBST(INTERP_CFLAGS) - fi - ;; - mips*) - TARGET=MIPS; - arch_target=mips; - with_tls=pthread; - ACCESS_UNALIGNED="no" - - AC_MSG_CHECKING(for mips n32) - AC_TRY_COMPILE([],[ - #if _MIPS_SIM != _ABIN32 - #error Not mips n32 - #endif - ],[ - AC_MSG_RESULT(yes) - sizeof_register=8 - ],[ - AC_MSG_RESULT(no) - ]) - ;; - i*86-*-*) - TARGET=X86; - arch_target=x86; - case $host_os in - solaris*) - LIBC="libc.so" - INTL="libintl.so" - if test "x$ac_cv_sizeof_void_p" = "x8"; then - TARGET=AMD64 - arch_target=amd64 - fi - - # On solaris 10 x86, gcc prints a warning saying 'visibility attribute not supported on this configuration; ignored', but linking fails. A test case: - # int astruct __attribute__ ((visibility ("hidden"))); - # void foo () - # { - # void *p = &astruct; - # } - # gcc -fPIC --shared -o libfoo.so foo.c - # yields: - # foo.c:6: warning: visibility attribute not supported in this configuration; ignored - # ld: fatal: relocation error: R_386_GOTOFF: file /var/tmp//ccxYR96k.o: symbol astruct: relocation must bind locally - have_visibility_hidden=no - ;; - mingw*|cygwin*) - have_visibility_hidden=no - BTLS_SUPPORTED=no - BTLS_PLATFORM=i386 - ;; - haiku*) - LIBC=libroot.so - ;; - linux*) - AOT_SUPPORTED="yes" - BTLS_SUPPORTED=yes - BTLS_PLATFORM=i386 - AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no]) - ;; - darwin*) - AOT_SUPPORTED="yes" - BTLS_SUPPORTED=yes - BTLS_PLATFORM=i386 - ;; - openbsd*|freebsd*|kfreebsd-gnu*) - AOT_SUPPORTED="yes" - BTLS_SUPPORTED=yes - BTLS_PLATFORM=i386 - ;; - esac - ;; - x86_64-*-* | amd64-*-*) - TARGET=AMD64; - arch_target=amd64; - if test "x$ac_cv_sizeof_void_p" = "x4"; then - AC_DEFINE(MONO_ARCH_ILP32, 1, [64 bit mode with 4 byte longs and pointers]) - sizeof_register=8 - fi - case $host_os in - linux*) - AOT_SUPPORTED="yes" - BTLS_SUPPORTED=yes - BTLS_PLATFORM=x86_64 - AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no]) - ;; - darwin*) - AOT_SUPPORTED="yes" - BTLS_SUPPORTED=yes - BTLS_PLATFORM=x86_64 - boehm_supported=false - ;; - openbsd*|freebsd*|kfreebsd-gnu*) - AOT_SUPPORTED="yes" - BTLS_SUPPORTED=yes - BTLS_PLATFORM=x86_64 - ;; - mingw*|cygwin*) - BTLS_SUPPORTED=no - BTLS_PLATFORM=x86_64 - ;; - esac - ;; - sparc*-*-*) - if test "x$ac_cv_sizeof_void_p" = "x8"; then - TARGET=SPARC64 - else - TARGET=SPARC - fi - arch_target=sparc; - ACCESS_UNALIGNED="no" - case $host_os in - linux*) ;; - *) - LIBC="libc.so" - INTL="libintl.so" - esac - if test x"$GCC" = xyes; then - # We don't support v8 cpus - CFLAGS="$CFLAGS -Wno-cast-align -mcpu=v9" - fi - if test x"$AR" = xfalse; then - AC_MSG_ERROR([The required utility 'ar' is not found in your PATH. Usually it can be found in /usr/ccs/bin.]) - fi - ;; - *-mingw*|*-*-cygwin*) - # When this is enabled, it leads to very strange crashes at runtime (gcc-3.4.4) - have_visibility_hidden=no - INTL="intl" - case "$host" in - x86_64*mingw*) - # Old Boehm fails to compile for x86_64-mingw. - # It is trivial to fix, but just silently drop it. - boehm_supported=false - ;; - esac - ;; - macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \ - powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | \ - powerpc*-*-freebsd* | powerpc*-*-aix* | powerpc*-*-os400* ) - if test "x$ac_cv_sizeof_void_p" = "x8"; then - TARGET=POWERPC64; - CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__" - # mono#18554 - be more robust in testing for -mminimal-toc - AC_MSG_NOTICE([Checking for PowerPC ISA -mminimal-toc support]) - AX_CHECK_COMPILE_FLAG( - [-mminimal-toc], - [CFLAGS="$CFLAGS -mminimal-toc"], - [CFLAGS="$CFLAGS"] - ) - case "$host" in - powerpc*-*-freebsd*) - # We need to be aware if we are ELFv1 or v2 here - AC_MSG_NOTICE([Checking FreeBSD ELF version]) - if ! ( echo | cc -dM -E - | awk '/_CALL_ELF/ {print $NF}'); then - AC_DEFINE([POWERPC_ELF], 1, [PowerPC ELFv1]) - else - AC_DEFINE([POWERPC_ELFV2], 1, [PowerPC ELFv2]) - fi - ;; - esac - else - TARGET=POWERPC; - CPPFLAGS="$CPPFLAGS -D__mono_ppc__" - fi - arch_target=ppc; - case $host_os in - aix*|os400*) - BTLS_SUPPORTED=yes - BTLS_PLATFORM=powerpc - ;; - linux*) - BTLS_SUPPORTED=yes - BTLS_PLATFORM=powerpc - ;; - freebsd*) - BTLS_SUPPORTED=yes - BTLS_PLATFORM=powerpc - ;; - esac - ;; - armv7k-*-darwin*) - TARGET=ARM; - TARGET_SYS=WATCHOS - arch_target=arm; - arm_fpu=VFP_HARD - ACCESS_UNALIGNED="no" - CPPFLAGS="$CPPFLAGS -D__ARM_EABI__" - ;; - - arm*-darwin*) - TARGET=ARM; - arch_target=arm; - ACCESS_UNALIGNED="no" - CPPFLAGS="$CPPFLAGS -D__ARM_EABI__" - ;; - arm*-linux*) - TARGET=ARM; - arch_target=arm; - ACCESS_UNALIGNED="no" - AOT_SUPPORTED="yes" - CPPFLAGS="$CPPFLAGS -D__ARM_EABI__" - BTLS_SUPPORTED=yes - BTLS_PLATFORM=arm - AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no]) - case "$target" in - arm*-linux*-gnueabi) - BTLS_PLATFORM=armsoft - ;; - esac - ;; - arm*-netbsd*-eabi*) - TARGET=ARM; - arch_target=arm; - ACCESS_UNALIGNED="no" - CPPFLAGS="$CPPFLAGS -D__ARM_EABI__" - ;; - aarch64-*darwin*ilp32) - TARGET=ARM6432 - arch_target=arm64 - AC_DEFINE(MONO_ARCH_ILP32, 1, [64 bit mode with 4 byte longs and pointers]) - sizeof_register=8 - # assuming no other target other than watchOS is using aarch64*darwin triple - TARGET_SYS=WATCHOS - ;; - aarch64-*) - # https://lkml.org/lkml/2012/7/15/133 - TARGET=ARM64 - arch_target=arm64 - boehm_supported=false - AOT_SUPPORTED="yes" - BTLS_SUPPORTED=yes - BTLS_PLATFORM=aarch64 - AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no]) - ;; - s390x-*-linux*) - TARGET=S390X; - arch_target=s390x; - ACCESS_UNALIGNED="yes" - BTLS_SUPPORTED=yes - BTLS_PLATFORM=s390x - CFLAGS="$CFLAGS -mbackchain" - ;; - riscv32-*) - TARGET=RISCV32 - ACCESS_UNALIGNED=no - AOT_SUPPORTED=no - BTLS_SUPPORTED=yes - BTLS_PLATFORM=riscv32 - arch_target=riscv32 - boehm_supported=false - ;; - riscv64*) - TARGET=RISCV64 - ACCESS_UNALIGNED=no - AOT_SUPPORTED=no - BTLS_SUPPORTED=yes - BTLS_PLATFORM=riscv64 - arch_target=riscv64 - boehm_supported=false - ;; -esac - -HOST=$TARGET - -if test "x$host" != "x$target"; then - AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode]) - enable_mcs_build=no - enable_support_build=no - BTLS_SUPPORTED=no - # Can't use tls, since it depends on the runtime detection of tls offsets - # in mono-compiler.h - with_tls=pthread - target_mach=no - case "$target" in - wasm32*) - TARGET=WASM - arch_target=wasm - AC_DEFINE(TARGET_WASM, 1, [Target wasm]) - ;; - arm*-darwin*) - TARGET=ARM; - CPPFLAGS="$CPPFLAGS -D__ARM_EABI__" - case "$target" in - armv7k-*) - arm_fpu=VFP_HARD - AC_DEFINE(TARGET_WATCHOS, 1, [...]) - ;; - esac - ;; - powerpc64-ps3-linux-gnu) - TARGET=POWERPC64 - arch_target=powerpc64 - AC_DEFINE(TARGET_PS3, 1, [...]) - # It would be better to just use TARGET_POWERPC64, but lots of code already - # uses this define - AC_DEFINE(__mono_ppc64__, 1, [...]) - AC_DEFINE(MONO_ARCH_ILP32, 1, [64 bit mode with 4 byte longs and pointers]) - sizeof_register=8 - target_byte_order=G_BIG_ENDIAN - ;; - powerpc64-xbox360-linux-gnu) - TARGET=POWERPC64 - arch_target=powerpc64 - AC_DEFINE(TARGET_XBOX360, 1, [...]) - # It would be better to just use TARGET_POWERPC64, but lots of code already - # uses this define - sizeof_register=8 - target_byte_order=G_BIG_ENDIAN - ;; - arm*-linux-*) - TARGET=ARM; - CPPFLAGS="$CPPFLAGS -D__ARM_EABI__" - ;; - arm*-netbsd*-eabi*) - TARGET=ARM; - CPPFLAGS="$CPPFLAGS -D__ARM_EABI__" - ;; - i686*-linux-*) - TARGET=X86; - ;; - i*86-apple-*) - TARGET=X86; - ;; - x86_64*-linux-*) - TARGET=AMD64; - ;; - x86_64-ps4-freebsd) - TARGET=AMD64; - AC_DEFINE(TARGET_PS4, 1, [...]) - AC_DEFINE(DISABLE_HW_TRAPS, 1, [...]) - CPPFLAGS="$CPPFLAGS" - target_win32=no - ;; - aarch64*darwin*_ilp32) - TARGET=ARM6432; - AC_DEFINE(MONO_ARCH_ILP32, 1, [64 bit mode with 4 byte longs and pointers]) - sizeof_register=8 - AC_DEFINE(TARGET_WATCHOS, 1, [...]) - ;; - aarch64*darwin*) - TARGET=ARM64 - # Both ios and osx/arm64 have the same aarc64-darwin triple, - # assume ios for now when cross compiling - TARGET_SYS=IOS - ;; - aarch64-*) - TARGET=ARM64 - ;; - riscv32*) - TARGET=RISCV32 - AC_DEFINE([TARGET_RISCV], [1], [Target is RISC-V]) - AC_DEFINE([TARGET_RISCV32], [1], [Target is 32-bit RISC-V]) - arch_target=riscv32 - target_mach=no - with_tls=pthread - ;; - riscv64*) - TARGET=RISCV64 - AC_DEFINE([TARGET_RISCV], [1], [Target is RISC-V]) - AC_DEFINE([TARGET_RISCV64], [1], [Target is 64-bit RISC-V]) - arch_target=riscv64 - target_mach=no - with_tls=pthread - ;; - x86_64-google-fuchsia) - TARGET=AMD64 - target_win32=nop - AC_DEFINE(HOST_FUCHSIA,1,[Targeting the Fuchsia platform]) - ;; - *) - AC_MSG_ERROR([Cross compiling is not supported for target $target]) - esac - - case "$target" in - *-darwin*) - target_mach=yes - ;; - *-linux-android*) - AC_DEFINE(TARGET_ANDROID, 1, [...]) - ;; - esac -fi - -case "$TARGET" in -WASM) - AC_DEFINE(TARGET_WASM, 1, [...]) - arch_target=wasm - ;; -X86) - AC_DEFINE(TARGET_X86, 1, [...]) - arch_target=x86 - ;; -AMD64) - AC_DEFINE(TARGET_AMD64, 1, [...]) - arch_target=amd64 - ;; -ARM) - AC_DEFINE(TARGET_ARM, 1, [...]) - arch_target=arm - ACCESS_UNALIGNED="no" - ;; -ARM64|ARM6432) - AC_DEFINE(TARGET_ARM64, 1, [...]) - arch_target=arm64 - ;; -POWERPC) - AC_DEFINE(TARGET_POWERPC, 1, [...]) - ;; -POWERPC64) - AC_DEFINE(TARGET_POWERPC, 1, [...]) - AC_DEFINE(TARGET_POWERPC64, 1, [...]) - ;; -S390X) - AC_DEFINE(TARGET_S390X, 1, [...]) - ;; -MIPS) - AC_DEFINE(TARGET_MIPS, 1, [...]) - ;; -SPARC) - AC_DEFINE(TARGET_SPARC, 1, [...]) - ;; -SPARC64) - AC_DEFINE(TARGET_SPARC64, 1, [...]) - ;; -RISCV32) - AC_DEFINE([TARGET_RISCV], [1], [Target is RISC-V]) - AC_DEFINE([TARGET_RISCV32], [1], [Target is 32-bit RISC-V]) - ;; -RISCV64) - AC_DEFINE([TARGET_RISCV], [1], [Target is RISC-V]) - AC_DEFINE([TARGET_RISCV64], [1], [Target is 64-bit RISC-V]) - ;; -esac - -case "$TARGET" in -*32* | ARM | X86 | POWERPC | MIPS | SPARC | WASM | ARM6432) - target_sizeof_void_p=4 - ;; -*64* | S390X) - target_sizeof_void_p=8 - ;; -*) - AC_MSG_ERROR([unknown target]) - ;; -esac - -case "$HOST" in -WASM) - AC_DEFINE(HOST_WASM, 1, [...]) - ;; -X86) - AC_DEFINE(HOST_X86, 1, [...]) - ;; -AMD64) - AC_DEFINE(HOST_AMD64, 1, [...]) - ;; -ARM) - AC_DEFINE(HOST_ARM, 1, [...]) - ;; -ARM64) - AC_DEFINE(HOST_ARM64, 1, [...]) - ;; -POWERPC) - AC_DEFINE(HOST_POWERPC, 1, [...]) - ;; -POWERPC64) - AC_DEFINE(HOST_POWERPC, 1, [...]) - AC_DEFINE(HOST_POWERPC64, 1, [...]) - ;; -S390X) - AC_DEFINE(HOST_S390X, 1, [...]) - ;; -MIPS) - AC_DEFINE(HOST_MIPS, 1, [...]) - ;; -SPARC) - AC_DEFINE(HOST_SPARC, 1, [...]) - ;; -SPARC64) - AC_DEFINE(HOST_SPARC64, 1, [...]) - ;; -RISCV32) - AC_DEFINE([HOST_RISCV], [1], [Host is RISC-V]) - AC_DEFINE([HOST_RISCV32], [1], [Host is 32-bit RISC-V]) - ;; -RISCV64) - AC_DEFINE([HOST_RISCV], [1], [Host is RISC-V]) - AC_DEFINE([HOST_RISCV64], [1], [Host is 64-bit RISC-V]) - ;; -esac - -MONO_ARCH_GSHAREDVT_SUPPORTED=0 -case "$HOST" in -X86 | AMD64 | ARM | ARM64) - MONO_ARCH_GSHAREDVT_SUPPORTED=1 # keep in sync with mini-{x86,amd64,arm,arm64}.h - ;; -esac - -AM_CONDITIONAL(MONO_ARCH_GSHAREDVT_SUPPORTED, test $MONO_ARCH_GSHAREDVT_SUPPORTED = 1) -AM_CONDITIONAL(TARGET_WASM, test $arch_target = wasm) - -dnl ************* -dnl *** VTUNE *** -dnl ************* - -AC_ARG_ENABLE(vtune,[ --enable-vtune Enable the VTUNE back-end], enable_vtune=$enableval, enable_vtune=no) -AC_ARG_WITH(vtune, [ --with-vtune= Enable jit vtune profiling], enable_vtune=yes,) - -AM_CONDITIONAL(HAVE_VTUNE, test x$enable_vtune = xyes) - -if test "x$enable_vtune" = "xyes"; then - if test "x$with_vtune" = "x"; then - VTUNE_PATH=/opt/intel/vtune_amplifier_xe - else - VTUNE_PATH=$with_vtune - fi - VTUNE_INCLUDE=$VTUNE_PATH/include - case "$TARGET" in - X86) - VTUNE_LIB=$VTUNE_PATH/lib32 - ;; - AMD64) - VTUNE_LIB=$VTUNE_PATH/lib64 - ;; - *) - AC_MSG_ERROR([Unsupported target $TARGET for VTUNE.]) - ;; - esac - if test ! -f $VTUNE_INCLUDE/jitprofiling.h; then - AC_MSG_ERROR([VTUNE $VTUNE_INCLUDE/jitprofiling.h not found.]) - fi - if test ! -f $VTUNE_LIB/libjitprofiling.a; then - AC_MSG_ERROR([VTUNE $VTUNE_LIB/libjitprofiling.a not found.]) - fi - - VTUNE_CFLAGS=-I$VTUNE_INCLUDE - VTUNE_LIBS="-L/$VTUNE_LIB/ -ljitprofiling" - - AC_SUBST(VTUNE_LIBS) - AC_SUBST(VTUNE_CFLAGS) -fi -dnl Use GCC atomic ops if they work on the target. -if test x$GCC = "xyes"; then - case $TARGET in - X86 | AMD64 | ARM | ARM64 | ARM6432 | POWERPC | POWERPC64 | MIPS | S390X | SPARC | SPARC64 | RISCV32 | RISCV64) - AC_DEFINE(USE_GCC_ATOMIC_OPS, 1, [...]) - ;; - esac -fi - -if test "x$target_mach" = "xyes"; then - - if test "x$TARGET_SYS" = "xWATCHOS"; then - AC_DEFINE(TARGET_WATCHOS,1,[The JIT/AOT targets WatchOS]) - CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_WATCHOS" - CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_WATCHOS" - BTLS_SUPPORTED=no - elif test "x$TARGET_SYS" = "xIOS" -o "x$TARGET" = "xARM" -o "x$TARGET" = "xARM6432"; then - AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS]) - CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS" - CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS" - BTLS_SUPPORTED=no - target_ios=yes - else - AC_TRY_COMPILE([#include "TargetConditionals.h"],[ - #if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1 - #error fail this for ios - #endif - ], [ - AC_DEFINE(TARGET_OSX,1,[The JIT/AOT targets OSX]) - CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_OSX" - CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_OSX" - target_osx=yes - if test "x$TARGET" = "xARM64"; then - BTLS_SUPPORTED=no - fi - ], [ - AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS]) - CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS" - CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS" - BTLS_SUPPORTED=no - target_ios=yes - ]) - fi - AC_DEFINE(TARGET_MACH,1,[The JIT/AOT targets Apple platforms]) -fi - -AM_CONDITIONAL(TARGET_OSX, test x$target_osx = xyes) - -AC_SUBST(SIZEOF_VOID_P,[$ac_cv_sizeof_void_p]) - -if test "x$target_byte_order" = "xG_BIG_ENDIAN"; then - AC_DEFINE(TARGET_BYTE_ORDER,G_BIG_ENDIAN,[byte order of target]) -elif test "x$target_byte_order" = "xG_LITTLE_ENDIAN"; then - AC_DEFINE(TARGET_BYTE_ORDER,G_LITTLE_ENDIAN,[byte order of target]) -else - AC_DEFINE(TARGET_BYTE_ORDER,G_BYTE_ORDER,[byte order of target]) -fi - -AC_DEFINE_UNQUOTED(TARGET_SIZEOF_VOID_P,${target_sizeof_void_p},[wordsize of target]) - -if test "x$sizeof_register" = "x4"; then - AC_DEFINE(SIZEOF_REGISTER,4,[size of target machine integer registers]) -elif test "x$sizeof_register" = "x8"; then - AC_DEFINE(SIZEOF_REGISTER,8,[size of target machine integer registers]) -else - AC_DEFINE_UNQUOTED(SIZEOF_REGISTER,${target_sizeof_void_p},[size of target machine integer registers]) -fi - -# zlib/configure detects visibility support similarly and defines HAVE_HIDDEN -# on the compiler command line (not config.h). -if test "x$have_visibility_hidden" = "xyes"; then - AC_DEFINE(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility ("hidden") attribute]) - ZLIB_CFLAGS="$ZLIB_CFLAGS -DHAVE_HIDDEN" -fi - -if test "x$have_deprecated" = "xyes"; then - AC_DEFINE(HAVE_DEPRECATED, 1, [Support for the deprecated attribute]) -fi - -dnl -dnl Simple Generational checks (sgen) -dnl -SGEN_DEFINES= -AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=yes]) -AC_ARG_WITH(sgen-default-concurrent, [ --with-sgen-default-concurrent=yes,no Use Concurrent GC, default=no],[],[with_sgen_default_concurrent=no]) -if test x$buildsgen = xyes; then - AC_DEFINE(HAVE_MOVING_COLLECTOR, 1, [Moving collector]) - SGEN_DEFINES="-DHAVE_SGEN_GC" - - conc_gc_msg="" - if test x$with_sgen_default_concurrent != xno; then - AC_DEFINE(HAVE_CONC_GC_AS_DEFAULT, 1, [Defaults to concurrent GC]) - conc_gc_msg=" (concurrent by default)" - fi - - if test "x$gc_msg" = "x"; then - gc_msg="sgen$conc_gc_msg" - else - gc_msg="sgen$conc_gc_msg and $gc_msg" - fi -fi -AC_SUBST(SGEN_DEFINES) -AM_CONDITIONAL(SUPPORT_SGEN, test x$buildsgen = xyes) - -jit_status="Building and using the JIT" - -libsuffix=".so" - -case "$host" in - *-*-aix*) - dnl on AIX/PASE, shared libraries can be and usually are inside archives - dnl so, we specify them by libfoo.a(libfoo.so.0) for libtool's conventions, - dnl or libfoo.a(shr[_64].o) for the AIX system convention, - dnl or lib.so[.0](shr[_64].o) for libtool's hybrid convention - dnl we may hardcode 64-bit names at times, but we don't do 32-bit AIX - LIBC="libc.a(shr_64.o)" - # Thanks, I hate it! This is crumbly, especially the one-liner. - AC_MSG_CHECKING([how to dlopen libintl]) - AC_LINK_IFELSE([AC_LANG_SOURCE([ - /* XXX: Check for libintl header/gettext func better? */ - #include - - int main (void) { - gettext("Dummy for autoconf"); - return 1; - } - ])], - [ - INTL="$(dump -X64 -Hp conftest$EXEEXT | grep libintl | cut -c 38- | tr -s " " | awk '{print $1"("$2")"}')" - AC_MSG_RESULT([yes, $INTL]) - ], - [ - INTL="libintl.a(libintl.so.8)" - AC_MSG_RESULT([no, falling back to $INTL]) - ]) - SQLITE3="libsqlite3.a(libsqlite3.so.0)" - # it's very tempting to set a libsuffix, but it depends on the soname value - ;; - *-*-os400*) - dnl However, IBM's packages for i try to be more "normal" than the AIX world, naming wise. - dnl The library archives has "normal" .so names, but they're members with predictable "shr" names for fat libraries. - LIBC="libc.a(shr_64.o)" - INTL="libintl.so(shr_64.o)" - SQLITE3="libsqlite3.so(shr_64.o)" - # likewise, it's safer to assume ".so(shr_64.o)" due to official IBM packages being built this way, but as with AIX, others may not be guaranteed - # it may be worth revisiting this in the future - ;; - *-*-darwin*) - libsuffix=".dylib" - LIBC="libc.dylib" - INTL="libintl.dylib" - SQLITE="libsqlite.0.dylib" - SQLITE3="libsqlite3.0.dylib" - X11="libX11.dylib" - GDKX11="libgdk-x11-2.0.dylib" - GTKX11="libgtk-x11-2.0.dylib" - ;; - *-*-*netbsd*) - LIBC="libc.so" - INTL="libintl.so" - SQLITE="libsqlite.so" - SQLITE3="libsqlite3.so" - ;; - *-*-kfreebsd*-gnu) - LIBC="libc.so.0.1" - INTL="libc.so.0.1" - X11="libX11.so.6" - ;; - *-*-*freebsd*) - LIBC="libc.so.7" - INTL="libintl.so" - SQLITE="libsqlite.so" - SQLITE3="libsqlite3.so" - ;; - *-*-*openbsd*) - LIBC="libc.so" - INTL="libintl.so" - SQLITE="libsqlite.so" - SQLITE3="libsqlite3.so" - ;; - *-*-*linux*) - if test "x$with_core" != "xonly"; then - AC_PATH_X - dlsearch_path=`(libtool --config ; echo eval echo \\$sys_lib_dlsearch_path_spec) | sh` - AC_MSG_CHECKING(for the soname of libX11.so) - for i in $x_libraries $dlsearch_path; do - for r in 4 5 6; do - if test -f $i/libX11.so.$r; then - X11=libX11.so.$r - AC_MSG_RESULT($X11) - fi - done - done - - if test "x$X11" = "xlibX11.so"; then - AC_MSG_WARN([Could not find libX11.so. Do you have X.org or XFree86 installed? Assuming libX11.so.6...]); - X11=libX11.so.6 - fi - fi - ;; -esac - -AC_SUBST(libsuffix) - -###################################### -# EGLIB CHECKS -###################################### - -GNUC_PRETTY= -GNUC_UNUSED= -BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END" -if test x$GCC = xyes; then - GNUC_UNUSED='__attribute__((__unused__))' - GNUC_NORETURN='__attribute__((__noreturn__))' - case $host_cpu in - i*86|x86_64) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;; - esac -fi -AC_SUBST(GNUC_PRETTY) -AC_SUBST(GNUC_UNUSED) -AC_SUBST(GNUC_NORETURN) -AC_SUBST(BREAKPOINT) - -AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN]) - -case $host in -*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) - PATHSEP='\\' - SEARCHSEP=';' - OS="WIN32" - PIDTYPE='void *' - ;; -*) - PATHSEP='/' - SEARCHSEP=':' - OS="UNIX" - PIDTYPE='int' - ;; -esac - -case $host in - *-*-solaris*) - CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" - ;; -esac - -case $target in -arm*-darwin*|aarch64*-*|riscv*) - CFLAGS="$CFLAGS -U_FORTIFY_SOURCE" - ;; -i*86-*-darwin*) - ORDER=G_LITTLE_ENDIAN - ;; -*-*-haiku*) - LDFLAGS="$LDFLAGS -ltextencoding" - ;; -*-*-openbsd*) - CFLAGS="$CFLAGS -pthread" - LDFLAGS="$LDFLAGS -pthread" - ;; -esac - -AC_SUBST(ORDER) -AC_SUBST(PATHSEP) -AC_SUBST(SEARCHSEP) -AC_SUBST(OS) -AC_SUBST(PIDTYPE) - -# Defined for all targets/platforms using classic Windows API support. -AC_DEFINE(HAVE_CLASSIC_WINAPI_SUPPORT, 1, [Use classic Windows API support]) -AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support]) - -AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf) -AC_CHECK_FUNCS(getrlimit) -AC_CHECK_FUNCS(fork execv execve) -AC_CHECK_FUNCS(waitpid) - -AC_ARG_WITH([overridable-allocators], [ --with-overridable-allocators allow g_*alloc/g_free to call custom allocators set via g_mem_set_vtable]) - -if test x$with_overridable_allocators = xyes; then - AC_DEFINE(ENABLE_OVERRIDABLE_ALLOCATORS,1,[Overridable allocator support enabled]) - AC_MSG_NOTICE([Overridable allocator support enabled]) -else - AC_MSG_NOTICE([Overridable allocator support disabled]) -fi - -# -# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding -# the detection of strndup on OS X so Mono built on 10.7+ still runs on 10.6. This can be -# removed once support for 10.6 is dropped. -# -# iOS detection of strndup and getpwuid_r is faulty for some reason so let's simply avoid it -# -if test x$target_osx = xyes; then -AC_CHECK_FUNCS(getpwuid_r) -elif test x$target_ios = xno; then -AC_CHECK_FUNCS(strndup getpwuid_r) -fi - -AC_SEARCH_LIBS(sqrtf, m) - -# nanosleep may not be part of libc, also search it in other libraries -AC_SEARCH_LIBS(nanosleep, rt) - -AC_SEARCH_LIBS(dlopen, dl) - -# AIX/OS400 -bsymbolic -# Apple -bind_at_load -# The rest GNU. -# -export_link_flags=--export-dynamic -case $host_os in -mingw*|cygwin*) - export_link_flags=--export-all-symbols - ;; -*-*-darwin*) - export_link_flags=--export_dynamic - ;; -esac -AX_APPEND_LINK_FLAGS([-Wl,$export_link_flags -Wl,-Bsymbolic -bsymbolic -Wl,-z,now -Wl,-bind_at_load]) - -AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h iconv.h sys/types.h sys/resource.h) -dnl giconv.c will check on HAVE_ICONV_H but we need this for link time -AC_CHECK_LIB(iconv, iconv_open) -AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0]) -AC_SUBST(HAVE_ALLOCA_H) - -# Get the exact type of size_t, not just its size. -# This is so we can find an exact printf format among u, lu, llu, I64u. -# To avoid warnings about slight mismatches. -# C99 runtime "zu" dependency is being avoided here. -# -# We have to compile as C++ because C is too lenient -# and lets the wrong thing compile, with warnings. -# -# Note: "zu" or ifdef have the advantage -# of producing installable "biarch" headers. i.e. one Mac header -# for Mac/x86 and Mac/amd64. - -AC_LANG_PUSH(C++) - -# Check long before int because it is the overwhelming Unix answer, -# across 32bit and 64bit systems -- fewer compiler invocations in autoconf. -# -# long ahead of int also tends to produce biarch-compatible headers except Windows. -# -AC_MSG_CHECKING(if size_t is unsigned long) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - unsigned long *a = (size_t*)0; -])], [ - AC_MSG_RESULT(yes) - AC_SUBST(GSIZE_FORMAT, '"lu"') -], [ - AC_MSG_RESULT(no) - AC_MSG_CHECKING(if size_t is unsigned int) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - unsigned *a = (size_t*)0; - ])], [ - AC_MSG_RESULT(yes) - AC_SUBST(GSIZE_FORMAT, '"u"') - ], [ -# At this point the majority of systems have their answer, -# and we descend into non-standard or new-standard territory. -# -# Check __int64 first because I64 on some systems predates ll, enabling -# new compiler/old runtime interop, and the types always have the same size. - AC_MSG_RESULT(no) - AC_MSG_CHECKING(if size_t is unsigned __int64) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - unsigned __int64 *a = (size_t*)0; - ])], [ - AC_MSG_RESULT(yes) - AC_SUBST(GSIZE_FORMAT, '"I64u"') - ], [ - AC_MSG_RESULT(no) - AC_MSG_CHECKING(if size_t is unsigned long long) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - unsigned long long *a = (size_t*)0; - ])], [ - AC_MSG_RESULT(yes) - AC_SUBST(GSIZE_FORMAT, '"llu"') - ], [ - AC_MSG_RESULT(no) - AC_MSG_ERROR(Unable to determine size_t among unsigned long, int, __int64, long long) - ] ) - ] ) - ] ) -] ) - -AC_LANG_POP - -# If size_t/ptrdiff_t is correct, use it. Otherwise C99 [u]intptr_t. -# This provides for an exact match with functions that -# take size_t like malloc and pthread_attr_getstacksize, avoiding warnings. -# uintptr_t is not necessarily the same. -# -# ptrdiff_t is preferred over ssize_t as it is C89 vs. new Posix. -# ssize_t looks nicer but ptrdiff_t is wrapped up as gssize anyway. - -if test $ac_cv_sizeof_void_p = $ac_cv_sizeof_size_t; then - GSIZE="size_t" - GSSIZE="ptrdiff_t" -else - GSIZE="uintptr_t" - GSSIZE="intptr_t" -fi - -AC_SUBST(GSIZE) -AC_SUBST(GSSIZE) -AC_SUBST(GSIZE_FORMAT) - -# -# END OF EGLIB CHECKS -# - -AC_ARG_WITH([libgdiplus], - [ --with-libgdiplus=installed|sibling| Override the libgdiplus used for System.Drawing tests (defaults to installed)], - [], [with_libgdiplus=installed]) - -# default install location -libgdiplus_install_loc=libgdiplus${libsuffix} -case "$host" in - *-*-*linux*) - libgdiplus_install_loc=libgdiplus${libsuffix}.0 - ;; -esac - -case $with_libgdiplus in - no) - libgdiplus_loc= - ;; - - installed) - libgdiplus_loc= - if test x$cross_compiling = xno; then - if test x$host_darwin = xyes; then - a=/Library/Frameworks/Mono.framework/Versions/Current/lib/$libgdiplus_install_loc - if test -x $a; then - libgdiplus_install_loc=$a - libgdiplus_loc=$a - fi - fi - fi - ;; - - yes|sibling) - libgdiplus_loc=`cd ../libgdiplus && pwd`/src/libgdiplus.la - ;; - - /*) # absolute path, assume it is an install location - libgdiplus_loc=$with_libgdiplus - libgdiplus_install_loc=$with_libgdiplus - ;; - - *) - libgdiplus_loc=`pwd`/$with_libgdiplus - ;; -esac -AC_SUBST(libgdiplus_loc) -AC_SUBST(libgdiplus_install_loc) - -AC_ARG_ENABLE(icall-symbol-map,[ --enable-icall-symbol-map Generate tables which map icall functions to their C symbols], icall_symbol_map=$enableval, icall_symbol_map=no) -if test "x$icall_symbol_map" = "xyes"; then - AC_DEFINE(ENABLE_ICALL_SYMBOL_MAP, 1, [Icall symbol map enabled]) -fi - -AC_ARG_ENABLE(icall-export,[ --enable-icall-export Export icall functions], icall_export=$enableval, icall_export=no) -if test "x$icall_export" = "xyes"; then - AC_DEFINE(ENABLE_ICALL_EXPORT, 1, [Icall export enabled]) -fi - -AC_ARG_ENABLE(icall-tables,[ --disable-icall-tables Disable the runtime lookup of icalls], icall_tables=$enableval, icall_tables=yes) -if test "x$icall_tables" = "xno"; then - AC_DEFINE(DISABLE_ICALL_TABLES, 1, [Icall tables disabled]) -fi - -AM_CONDITIONAL(DISABLE_ICALL_TABLES, test x$icall_tables = xno) - -if test "x$with_tls" = "x__thread"; then - AC_DEFINE(MONO_KEYWORD_THREAD, __thread, [Have __thread keyword]) - # Pass the information to libgc - CPPFLAGS="$CPPFLAGS -DUSE_COMPILER_TLS" - AC_MSG_CHECKING(if the tls_model attribute is supported) - AC_TRY_COMPILE([static __thread int foo __attribute__((tls_model("initial-exec")));], [ - ], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TLS_MODEL_ATTR, 1, [tls_model available]) - ], [ - AC_MSG_RESULT(no) - ]) -fi - -if test ${TARGET} = ARM; then - dnl ****************************************** - dnl *** Check to see what FPU is available *** - dnl ****************************************** - AC_MSG_CHECKING(which FPU to use) - - # - # This is a bit tricky: - # - # if (__ARM_PCS_VFP) { - # /* mfloat-abi=hard == VFP with hard ABI */ - # } elif (!__SOFTFP__) { - # /* mfloat-abi=softfp == VFP with soft ABI */ - # } else { - # /* mfloat-abi=soft == no VFP */ - # } - # - # The exception is iOS (w/ GCC) where none of the above - # are defined (but iOS always uses the 'softfp' ABI). - # - # No support for FPA. - # - - fpu=NONE - - # iOS GCC always uses the 'softfp' ABI. - if test x"$GCC" = xyes && test x$host_darwin = xyes; then - fpu=VFP - fi - - # Are we using the 'hard' ABI? - if test x$fpu = xNONE; then - AC_TRY_COMPILE([], [ - #ifndef __ARM_PCS_VFP - #error "Float ABI is not 'hard'" - #endif - ], [ - fpu=VFP_HARD - ], [ - fpu=NONE - ]) - fi - - # No 'hard' ABI. 'soft' or 'softfp'? - if test x$fpu = xNONE; then - AC_TRY_COMPILE([], [ - #ifdef __SOFTFP__ - #error "Float ABI is not 'softfp'" - #endif - ], [ - fpu=VFP - ], [ - fpu=NONE - ]) - fi - - if test x$arm_fpu != x; then - fpu=$arm_fpu - fi - - AC_MSG_RESULT($fpu) - CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu=1" - unset fpu - - dnl ********************************************* - dnl *** Check which ARM version(s) we can use *** - dnl ********************************************* - AC_MSG_CHECKING(which ARM version to use) - - AC_TRY_COMPILE([], [ - #if !defined(__ARM_ARCH_5T__) && !defined(__ARM_ARCH_5TE__) && !defined(__ARM_ARCH_5TEJ__) - #error Not on ARM v5. - #endif - ], [ - arm_v5=yes - - arm_ver=ARMv5 - ], []) - - AC_TRY_COMPILE([], [ - #if !defined(__ARM_ARCH_6J__) && !defined(__ARM_ARCH_6ZK__) && !defined(__ARM_ARCH_6K__) && !defined(__ARM_ARCH_6T2__) && !defined(__ARM_ARCH_6M__) - #error Not on ARM v6. - #endif - ], [ - arm_v5=yes - arm_v6=yes - - arm_ver=ARMv6 - ], []) - - AC_TRY_COMPILE([], [ - #if !defined(__ARM_ARCH_7A__) && !defined(__ARM_ARCH_7R__) && !defined(__ARM_ARCH_7EM__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7S__) - #error Not on ARM v7. - #endif - ], [ - arm_v5=yes - arm_v6=yes - arm_v7=yes - - arm_ver=ARMv7 - ], []) - - AC_MSG_RESULT($arm_ver) - - if test x$arm_v5 = xyes; then - AC_DEFINE(HAVE_ARMV5, 1, [ARM v5]) - CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV5=1" - fi - - if test x$arm_v6 = xyes; then - AC_DEFINE(HAVE_ARMV6, 1, [ARM v6]) - CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6=1" - fi - - if test x$arm_v7 = xyes; then - AC_DEFINE(HAVE_ARMV7, 1, [ARM v7]) - CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV7=1" - fi - - if test x$host_linux = xyes; then - RID="linux-arm" - COREARCH="arm" - if test x$fpu = xNONE; then - RID="linux-armel" - COREARCH="armel" - fi - fi -fi - -AC_SUBST(RID) -AC_SUBST(COREARCH) -AC_SUBST(CORETARGETS) - -if test ${TARGET} = RISCV32 -o ${TARGET} = RISCV64; then - AC_ARG_WITH([riscv-fpabi], [ --with-riscv-fpabi=auto,double,soft Select RISC-V floating point ABI (auto)], [fpabi=$withval], [fpabi=double]) - - AC_MSG_CHECKING([which RISC-V floating point ABI to use]) - - if test x$fpabi = xauto; then - AC_TRY_COMPILE([], [ - #ifdef __riscv_float_abi_double - #error "double" - #endif - ], [ - fpabi=auto - ], [ - fpabi=double - ]) - fi - - if test x$fpabi = xauto; then - AC_TRY_COMPILE([], [ - #ifdef __riscv_float_abi_single - #error "single" - #endif - ], [ - fpabi=auto - ], [ - fpabi=single - ]) - fi - - if test x$fpabi = xauto; then - AC_TRY_COMPILE([], [ - #ifdef __riscv_float_abi_soft - #error "soft" - #endif - ], [ - fpabi=auto - ], [ - fpabi=soft - ]) - fi - - case $fpabi in - double) - AC_DEFINE([RISCV_FPABI_DOUBLE], [1], [RISC-V FPABI is double-precision]) - AC_MSG_RESULT([double-precision]) - ;; - single) - AC_DEFINE([RISCV_FPABI_SINGLE], [1], [RISC-V FPABI is single-precision]) - AC_MSG_ERROR([single-precision, not supported]) - ;; - soft) - AC_DEFINE([RISCV_FPABI_SOFT], [1], [RISC-V FPABI is soft float]) - AC_MSG_RESULT([soft float]) - ;; - auto) - AC_MSG_ERROR([unknown]) - ;; - *) - AC_MSG_ERROR([invalid option: $fpabi]) - ;; - esac -fi - -if test ${TARGET} = unknown; then - CPPFLAGS="$CPPFLAGS -DNO_PORT" - AC_MSG_WARN("mono has not been ported to $host: some things may not work.") -fi - -if test "x$platform_android" = "xyes"; then - case "x${TARGET}" in - xARM) - case "x$arm_ver" in - xARMv5) - BTLS_SUPPORTED=yes - BTLS_PLATFORM=android-armv5 - ;; - xARMv6) - BTLS_SUPPORTED=yes - BTLS_PLATFORM=android-armv6 - ;; - xARMv7) - BTLS_SUPPORTED=yes - BTLS_PLATFORM=android-armv7 - ;; - *) - BTLS_SUPPORTED=no - ;; - esac - ;; - xARM64) - BTLS_SUPPORTED=yes - BTLS_PLATFORM=android-v8a - ;; - xX86) - BTLS_SUPPORTED=yes - BTLS_PLATFORM=android-x86 - ;; - xAMD64) - BTLS_SUPPORTED=yes - BTLS_PLATFORM=android-x64 - ;; - *) - BTLS_SUPPORTED=no - ;; - esac -fi - -if test ${ACCESS_UNALIGNED} = no; then - CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS" -fi - -if test x$host_darwin = xyes; then - AC_MSG_CHECKING([for ranlib that supports -no_warning_for_no_symbols option]) - AS_IF( - [$RANLIB -no_warning_for_no_symbols 2>&1 | grep -q "unknown option"], - [AC_MSG_RESULT([no])], - [ - # avoid AR calling ranlib, libtool calls it anyway. suppress no symbols warning. - AR_FLAGS="Scru" - RANLIB="$RANLIB -no_warning_for_no_symbols" - AC_MSG_RESULT([yes]) - ] - ) -fi - -case "x$libgc" in - xincluded) - # Pass CPPFLAGS to libgc configure - # We should use a separate variable for this to avoid passing useless and - # potentially problematic defines to libgc (like -D_FILE_OFFSET_BITS=64) - # This should be executed late so we pick up the final version of CPPFLAGS - # The problem with this approach, is that during a reconfigure, the main - # configure scripts gets invoked with these arguments, so we use separate - # variables understood by libgc's configure to pass CPPFLAGS and CFLAGS. - TMP_CPPFLAGS="$CPPFLAGS $CPPFLAGS_FOR_LIBGC" - if test x$TARGET = xSPARC -o x$TARGET = xSPARC64; then - TMP_CPPFLAGS=`echo $TMP_CPPFLAGS | sed -e 's/-D_FILE_OFFSET_BITS=64//g'` - fi - # Don't pass -finstrument-for-thread-suspension in, - # if these are instrumented it will be very bad news - # (infinite recursion, undefined parking behavior, etc) - TMP_CPPFLAGS=`echo $TMP_CPPFLAGS | sed -e 's/-finstrument-for-thread-suspension//g'` - ac_configure_args="$ac_configure_args --enable-single-obj-compilation --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS_FOR_LIBGC=$TMP_CPPFLAGS\" \"CFLAGS_FOR_LIBGC=$CFLAGS_FOR_LIBGC\"" - if test "x$support_boehm" = "xyes"; then - AC_CONFIG_SUBDIRS(external/bdwgc) - fi - ;; -esac - -MALLOC_MEMPOOLS=no -AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for each single mempool allocation (only for runtime debugging, defaults to no)],[ - if test x$with_malloc_mempools = xyes; then - MALLOC_MEMPOOLS=yes - AC_DEFINE(USE_MALLOC_FOR_MEMPOOLS,1,[Use malloc for each single mempool allocation]) - fi -]) - - -DISABLE_MCS_DOCS=default -AC_ARG_WITH(mcs_docs,[ --with-mcs-docs=yes,no If you want to build the documentation under mcs (defaults to yes)],[ - if test x$with_mcs_docs != xyes; then - DISABLE_MCS_DOCS=yes - fi -]) -if test -n "$INSTALL_4_x_TRUE"; then : - DISABLE_MCS_DOCS=yes -fi -if test "x$DISABLE_MCS_DOCS" = "xdefault"; then - DISABLE_MCS_DOCS=$DISABLE_MCS_DOCS_default -fi - -AC_ARG_WITH(lazy_gc_thread_creation, [ --with-lazy-gc-thread-creation=yes|no Enable lazy runtime thread creation, embedding host must do it explicitly (defaults to no)],[ - if test x$with_lazy_gc_thread_creation != xno ; then - AC_DEFINE(LAZY_GC_THREAD_CREATION,1,[Enable lazy gc thread creation by the embedding host.]) - fi -], [with_lazy_gc_thread_creation=no]) - -dnl ***************************** -dnl *** Thread suspend policy *** -dnl ***************************** - -dnl Set a default hybrid or cooperative suspend on some platforms - -dnl Coop default is set by the bitcode preset. - -dnl If coop isn't on by default, maybe hybrid should be? -if test x$enable_cooperative_suspend_default != xyes; then - case $HOST in - X86 | AMD64) - dnl Some host/target confusion, there's no host_osx (and - dnl host_darwin would be true on iOS not just macOS). - if test x$target_osx = xyes; then - enable_hybrid_suspend_default=yes - elif test x$host_linux = xyes -o x$host_win32 = xyes; then - enable_hybrid_suspend_default=yes - fi - ;; - esac -fi - -dnl Now check if there were flags overriding the defaults - -AC_ARG_WITH(cooperative_gc, [ --with-cooperative-gc=yes|no Enable cooperative stop-the-world garbage collection (sgen only) (defaults to no)], [AC_MSG_WARN([--with-cooperative-gc is deprecated, use --enable-cooperative-suspend instead])], [with_cooperative_gc=default]) -AC_ARG_ENABLE(cooperative_suspend, [ --enable-cooperative-suspend Enable cooperative stop-the-world garbage collection (sgen only) (defaults to no)], [], [enable_cooperative_suspend=default]) - -if test x$enable_cooperative_suspend = xdefault -a x$with_cooperative_gc != xdefault; then - enable_cooperative_suspend=$with_cooperative_gc -fi - -if test x$enable_cooperative_suspend = xdefault; then - enable_cooperative_suspend=$enable_cooperative_suspend_default -fi - -if test x$enable_cooperative_suspend != xno; then - AC_DEFINE(ENABLE_COOP_SUSPEND,1,[Enable cooperative stop-the-world garbage collection.]) - enable_hybrid_suspend_default=no -fi - -AM_CONDITIONAL([ENABLE_COOP_SUSPEND], [test x$enable_cooperative_suspend != xno]) - -AC_ARG_ENABLE(hybrid_suspend, [ --enable-hybrid-suspend Enable hybrid stop-the-world garbage collection (sgen only) - cooperative suspend for threads running managed and runtime code, and preemptive suspend for threads running native and P/Invoke code (defaults to no)], [], [enable_hybrid_suspend=default]) - -if test x$enable_hybrid_suspend = xdefault; then - enable_hybrid_suspend=$enable_hybrid_suspend_default -fi - -if test x$enable_hybrid_suspend != xno -a x$enable_cooperative_suspend != xno ; then - AC_MSG_ERROR([Hybrid suspend and Cooperative suspend cannot be both enabled.]) -fi - -if test x$enable_hybrid_suspend != xno ; then - AC_DEFINE(ENABLE_HYBRID_SUSPEND,1,[Enable hybrid suspend for GC stop-the-world]) -fi - -AM_CONDITIONAL([ENABLE_HYBRID_SUSPEND], [test x$enable_hybrid_suspend != xno]) - -dnl End of thread suspend policy - -dnl *************************** -dnl *** feature experiments *** -dnl *************************** - -dnl When adding experiments, also add to mono/utils/mono-experiments.def -AC_ARG_ENABLE(experiment, [ --enable-experiment=LIST Enable experimental fatures from the comma-separate LIST. Available experiments: null,tiered],[ - - if test x$enable_experiment != x ; then - AC_DEFINE(ENABLE_EXPERIMENTS,1,[Enable feature experiments]) - fi - for feature in `echo "$enable_experiment" | sed -e "s/,/ /g"`; do - eval "mono_experiment_test_enable_$feature='yes'" - done - - if test "x$mono_experiment_test_enable_all" = "xyes"; then - eval "mono_experiment_test_enable_null='yes'" - eval "mono_experiment_test_enable_tiered='yes'" - true - fi - - if test "x$mono_experiment_test_enable_null" = "xyes"; then - AC_DEFINE(ENABLE_EXPERIMENT_null, 1, [Enable experiment 'null']) - fi - if test "x$mono_experiment_test_enable_tiered" = "xyes"; then - AC_DEFINE(ENABLE_EXPERIMENT_TIERED, 1, [Enable experiment 'Tiered Compilation']) - fi -],[]) - -AM_CONDITIONAL(ENABLE_EXPERIMENT_TIERED, test x$mono_experiment_test_enable_tiered = xyes) - -dnl ********************** -dnl *** checked builds *** -dnl ********************** - -AC_ARG_ENABLE(checked_build, [ --enable-checked-build=LIST To enable checked build (expensive asserts), configure with a comma-separated LIST of checked build modules and then include that same list in the environment variable MONO_CHECK_MODE at runtime. Recognized checked build modules: all, gc, metadata, thread, private_types, crash_reporting],[ - - if test x$enable_checked_build != x ; then - AC_DEFINE(ENABLE_CHECKED_BUILD,1,[Enable checked build]) - fi - for feature in `echo "$enable_checked_build" | sed -e "s/,/ /g"`; do - eval "mono_checked_build_test_enable_$feature='yes'" - done - - if test "x$mono_checked_build_test_enable_all" = "xyes"; then - eval "mono_checked_build_test_enable_gc='yes'" - eval "mono_checked_build_test_enable_metadata='yes'" - eval "mono_checked_build_test_enable_thread='yes'" - eval "mono_checked_build_test_enable_private_types='yes'" - eval "mono_checked_build_test_enable_crash_reporting='yes'" - fi - - if test "x$mono_checked_build_test_enable_gc" = "xyes"; then - AC_DEFINE(ENABLE_CHECKED_BUILD_GC, 1, [Enable GC checked build]) - fi - - if test "x$mono_checked_build_test_enable_metadata" = "xyes"; then - AC_DEFINE(ENABLE_CHECKED_BUILD_METADATA, 1, [Enable metadata checked build]) - fi - - if test "x$mono_checked_build_test_enable_thread" = "xyes"; then - AC_DEFINE(ENABLE_CHECKED_BUILD_THREAD, 1, [Enable thread checked build]) - fi - - if test "x$mono_checked_build_test_enable_private_types" = "xyes"; then - AC_DEFINE(ENABLE_CHECKED_BUILD_PRIVATE_TYPES, 1, [Enable private types checked build]) - fi - - if test "x$mono_checked_build_test_enable_crash_reporting" = "xyes"; then - # Required - with_overridable_allocators=yes - AC_DEFINE(ENABLE_OVERRIDABLE_ALLOCATORS,1,[Overridable allocator support enabled]) - - AC_DEFINE(ENABLE_CHECKED_BUILD_CRASH_REPORTING, 1, [Enable private types checked build]) - fi -], []) - -dnl End of checked builds - -AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno || test x$with_overridable_allocators = xyes) - -AC_CHECK_HEADER([malloc.h], - [AC_DEFINE([HAVE_USR_INCLUDE_MALLOC_H], [1], - [Define to 1 if you have /usr/include/malloc.h.])],,) - -# When --disable-shared is used, libtool transforms libmono-2.0.la into libmono-2.0.so -# instead of libmono-static.a -if test "x$enable_shared" = "xno" -a "x$enable_executables" = "xyes"; then - LIBMONO_LA=libmini-static.la -else - if test x$buildsgen = xyes; then - LIBMONO_LA=libmonosgen-$API_VER.la - else - LIBMONO_LA=libmonoboehm-$API_VER.la - fi -fi -AC_SUBST(LIBMONO_LA) - -dnl ************** -dnl *** Btls *** -dnl ************** - -AC_ARG_ENABLE(btls, [ --disable-btls Disable the BoringTls provider], enable_btls=$enableval, enable_btls=$BTLS_SUPPORTED) -AC_ARG_ENABLE(btls-lib, [ --disable-btls-lib Disable building the BTLS native library], enable_btls_lib=$enableval, enable_btls_lib=$BTLS_SUPPORTED) -AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls]) -AC_ARG_WITH(btls_android_api, [ --with-btls-android-api Android NDK API level for BTLS build]) -AC_ARG_WITH(btls_android_cmake_toolchain, [ --with-btls-android-cmake-toolchain Path to the cmake toolchain file for Android]) -AC_ARG_WITH(btls_android_ndk_asm_workaround, [ --with-btls-android-ndk-asm-workaround Work around a problem with NDK r18+ clang compiler when compiling some AES assembly for ARM]) - -if test "x$with_btls_android_api" = "x" ; then - case "$BTLS_PLATFORM" in - android-armv5) - with_btls_android_api=16" ;; - android-armv6) - with_btls_android_api=16" ;; - android-armv7) - with_btls_android_api=16 ;; - android-v8a) - with_btls_android_api=21 ;; - android-x86) - with_btls_android_api=16 ;; - android-x64) - with_btls_android_api=21 ;; - esac -fi - -if test "x$enable_btls" = "xno"; then - enable_btls_lib=no -fi - -AM_CONDITIONAL(BTLS, test x$enable_btls_lib = xyes) - -btls_android=no -if test "x$enable_btls" = "xyes"; then - AC_PATH_PROG(CMAKE, [cmake], [no], [$PATH:/Applications/CMake.app/Contents/bin:/usr/local/bin]) - if test "x$CMAKE" = "xno"; then - AC_MSG_ERROR("cmake not found") - fi - - BTLS_ROOT=`cd $srcdir && pwd`/external/boringssl - AC_SUBST(BTLS_ROOT) - - btls_arch= - btls_cflags= - BTLS_CMAKE_ARGS= - - if test "x$host_win32" = "xyes"; then - AC_CHECK_PROG(HAVE_YASM, yasm, yes, no) - fi - - case "$BTLS_PLATFORM" in - i386) - btls_arch=i386 - btls_cflags="-m32" - case $host_os in - darwin*) - btls_cflags="$btls_cflags -arch i386" - ;; - mingw*|cygwin*) - btls_cflags="-DNOCRYPT $WIN32_CPPFLAGS" - if test "x$HAVE_YASM" != "xyes"; then - BTLS_CMAKE_ARGS="-DOPENSSL_NO_ASM=1" - fi - ;; - esac - ;; - x86_64) - btls_arch=x86_64 - case $host_os in - mingw*|cygwin*) - btls_cflags="-DNOCRYPT $WIN32_CPPFLAGS" - if test "x$HAVE_YASM" != "xyes"; then - BTLS_CMAKE_ARGS="-DOPENSSL_NO_ASM=1" - fi - ;; - esac - ;; - arm) - btls_arch=arm - btls_cflags="-DOPENSSL_NO_ASM=1" - ;; - armsoft) - btls_arch=arm - btls_cflags="-DOPENSSL_NO_ASM=1" - ;; - aarch64) - btls_arch=aarch64 - btls_cflags="-march=armv8-a+crypto" - ;; - s390x) - btls_arch=s390x - ;; - powerpc) - btls_arch=powerpc - case $host_os in - aix*|os400*) - btls_cflags="$btls_cflags -maix64 -mminimal-toc -pthread -D_ALL_SOURCE -D_THREAD_SAFE -D_REENTRANT" - BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DCMAKE_AR=/usr/bin/ar -DCMAKE_C_ARCHIVE_CREATE=\" -X64 cr \"" - esac - ;; - android-armv5) - BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api" - ;; - android-armv6) - BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api" - ;; - android-armv7) - BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi-v7a\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api" - ;; - android-v8a) - BTLS_CMAKE_ARGS="-DANDROID_ABI=\"arm64-v8a\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api" - ;; - android-x86) - BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api" - ;; - android-x64) - BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86_64\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api" - ;; - riscv32) - btls_arch=riscv32 - ;; - riscv64) - btls_arch=riscv64 - ;; - *) - AC_MSG_ERROR(Invalid BTLS platform) - esac - - if test "x$platform_android" = "xyes"; then - if test "x$with_btls_android_cmake_toolchain" = "x"; then - with_btls_android_cmake_toolchain="$BTLS_ROOT/util/android-cmake/android.toolchain.cmake" - fi - - if test "x$with_btls_android_ndk_asm_workaround" != "x"; then - BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DENABLE_NDK_ARM_WORKAROUND=ON" - fi - - btls_android=yes - BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=$with_btls_android_cmake_toolchain" - if test "x$with_btls_android_ndk" != "x"; then - BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DANDROID_NDK=\"$with_btls_android_ndk\"" - else - AC_MSG_ERROR([Need to pass the --with-btls-android-ndk argument when building with BTLS support on Android.]) - fi - fi - - if test "x$btls_arch" != "x"; then - BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DBTLS_ARCH=\"$btls_arch\"" - fi - - BTLS_CFLAGS="$CPPFLAGS_FOR_BTLS $btls_cflags" - AC_SUBST(BTLS_ARCH) - AC_SUBST(BTLS_CFLAGS) - AC_SUBST(BTLS_PLATFORM) - AC_SUBST(BTLS_CMAKE_ARGS) - - AC_DEFINE(HAVE_BTLS, 1, [BoringTls is supported]) -else - enable_btls=no -fi - -AM_CONDITIONAL(BTLS_ANDROID, test x$btls_android = xyes) - -## Maybe should also disable if mcsdir is invalid. Let's punt the issue for now. -AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_build != xno]) -AM_CONDITIONAL(BUILD_SUPPORT, [test x$enable_support_build != xno]) - -libmono_ldflags="$libmono_ldflags $LIBS" - -AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes) -AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno) -AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC) -AM_CONDITIONAL(SPARC64, test x$TARGET = xSPARC64) -AM_CONDITIONAL(X86, test x$TARGET = xX86) -AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64) -AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS) -AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC) -AM_CONDITIONAL(POWERPC64, test x$TARGET = xPOWERPC64) -AM_CONDITIONAL(ARM, test x$TARGET = xARM) -AM_CONDITIONAL(ARM64, test x$TARGET = xARM64 -o x$TARGET = xARM6432) -AM_CONDITIONAL(S390X, test x$TARGET = xS390X) -AM_CONDITIONAL([RISCV], [test x$TARGET = xRISCV32 -o x$TARGET = xRISCV64]) -AM_CONDITIONAL([RISCV32], [test x$TARGET = xRISCV32]) -AM_CONDITIONAL([RISCV64], [test x$TARGET = xRISCV64]) -AM_CONDITIONAL(WASM, test x$TARGET = xWASM) -AM_CONDITIONAL(HOST_X86, test x$HOST = xX86) -AM_CONDITIONAL(HOST_AMD64, test x$HOST = xAMD64) -AM_CONDITIONAL(HOST_ARM, test x$HOST = xARM) -AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64) -AM_CONDITIONAL([HOST_RISCV], [test x$HOST = xRISCV32 -o x$HOST = xRISCV64]) -AM_CONDITIONAL([HOST_RISCV32], [test x$HOST = xRISCV32]) -AM_CONDITIONAL([HOST_RISCV64], [test x$HOST = xRISCV64]) -AM_CONDITIONAL(HOST_WASM, test x$HOST = xWASM) - -AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target") - -AC_SUBST(LIBC) -AC_SUBST(INTL) -AC_SUBST(SQLITE) -AC_SUBST(SQLITE3) -AC_SUBST(ODBC) -AC_SUBST(X11) -AC_SUBST(GDKX11) -AC_SUBST(GTKX11) -AC_SUBST(XINERAMA) -AC_DEFINE_UNQUOTED(MONO_ARCHITECTURE,"$arch_target",[The architecture this is running on]) -AC_SUBST(arch_target) - -#This must always be defined when building the runtime -AC_DEFINE(MONO_INSIDE_RUNTIME,1, [Disable banned functions from being used by the runtime]) - -mono_build_root=`pwd` -AC_SUBST(mono_build_root) - -AC_ARG_ENABLE(msvc_only,[ --enable-msvc-only Build only with Visual Studio (msvc) (defaults to no). Disable gcc build.], enable_msvc_only=$enableval, enable_msvc_only=no) -if test x$host_win32 = xno; then - if test x$enable_msvc_only = xyes; then - echo "Error, --enable-msvc-only only supported for Windows builds." - exit 1 - fi -fi -AM_CONDITIONAL(ENABLE_MSVC_ONLY, test x$enable_msvc_only = xyes) - -AC_ARG_ENABLE(msvc,[ --enable-msvc Build with Visual Studio (msvc) (defaults to no)], enable_msvc=$enableval, enable_msvc=no) -if test x$host_win32 = xno; then - if test x$enable_msvc = xyes; then - echo "Error, --enable-msvc only supported for Windows builds." - exit 1 - fi -fi -if test x$enable_msvc_only = xyes; then - enable_msvc=yes -fi -AM_CONDITIONAL(ENABLE_MSVC, test x$enable_msvc = xyes) - -if test "x$enable_msvc" = "xyes"; then - mono_msvc_build_dir='$(top_srcdir)'/msvc/build/sgen - if test "x$host_cpu" = "xi686"; then - mono_msvc_build_lib_dir='$(mono_msvc_build_dir)'/Win32/lib/Release - mono_msvc_build_bin_dir='$(mono_msvc_build_dir)'/Win32/bin/Release - mono_runtime=msvc/build/sgen/Win32/bin/Release/mono-sgen.exe - mono_runtime_wrapper=$mono_runtime - else - mono_msvc_build_lib_dir='$(mono_msvc_build_dir)'/x64/lib/Release - mono_msvc_build_bin_dir='$(mono_msvc_build_dir)'/x64/bin/Release - mono_runtime=msvc/build/sgen/x64/bin/Release/mono-sgen.exe - mono_runtime_wrapper=msvc/build/sgen/x64/bin/Release/mono-sgen-msvc.sh - fi - AC_SUBST(mono_msvc_build_dir) - AC_SUBST(mono_msvc_build_lib_dir) - AC_SUBST(mono_msvc_build_bin_dir) -else - mono_runtime=mono/mini/mono - mono_runtime_wrapper=$mono_runtime -fi - -AC_SUBST(mono_runtime) -AC_SUBST(mono_runtime_wrapper) - -CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.7.0/csc.exe -VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.7.0/VBCSCompiler.exe - -if test $csc_compiler = mcs; then - CSC=$mcs_topdir/class/lib/build/mcs.exe -else - CSC=$CSC_LOCATION -fi - -AM_CONDITIONAL([CSC_IS_ROSLYN], [test x$csc_compiler != xmcs]) - -mono_cfg_root=$mono_build_root/runtime -if test x$host_win32 = xyes; then - if test "x$cross_compiling" = "xno"; then - mono_cfg_dir=`cygpath -w -a $mono_cfg_root`\\etc - CSC=`cygpath -m -a $CSC` - CSC_LOCATION=`cygpath -m -a $CSC_LOCATION` - VBCS_LOCATION=`cygpath -m -a $VBCS_LOCATION` - else - mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\'`\\etc - fi -else - mono_cfg_dir=$mono_cfg_root/etc -fi - -if test "x$platform_android" = "xyes"; then - mono_cfg_dir= -fi - -AC_SUBST(mono_cfg_dir) - -AC_SUBST(CSC) - -if test "x$with_core" != "xonly"; then - - AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config], - [ depth=../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/1.0 - cd runtime/etc/mono/1.0 - rm -f machine.config - $LN_S $reldir/data/net_1_1/machine.config machine.config - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config], - [ depth=../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/2.0 - cd runtime/etc/mono/2.0 - rm -f machine.config - $LN_S $reldir/data/net_2_0/machine.config machine.config - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config], - [ depth=../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/2.0 - cd runtime/etc/mono/2.0 - rm -f web.config - $LN_S $reldir/data/net_2_0/web.config web.config - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini], - [ depth=../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/ - cd runtime/etc/mono/ - rm -f browscap.ini - $LN_S $reldir/data/browscap.ini browscap.ini - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser], - [ depth=../../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/2.0/Browsers/ - cd runtime/etc/mono/2.0/Browsers - rm -f Compat.browser - $LN_S $reldir/data/Browsers/Compat.browser Compat.browser - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/Browsers/Compat.browser], - [ depth=../../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/4.0/Browsers/ - cd runtime/etc/mono/4.0/Browsers - rm -f Compat.browser - $LN_S $reldir/data/Browsers/Compat.browser Compat.browser - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/Browsers/Compat.browser], - [ depth=../../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/4.5/Browsers/ - cd runtime/etc/mono/4.5/Browsers - rm -f Compat.browser - $LN_S $reldir/data/Browsers/Compat.browser Compat.browser - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config], - [ depth=../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/4.0 - cd runtime/etc/mono/4.0 - rm -f machine.config - $LN_S $reldir/data/net_4_0/machine.config machine.config - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config], - [ depth=../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/4.0 - cd runtime/etc/mono/4.0 - rm -f web.config - $LN_S $reldir/data/net_4_0/web.config web.config - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/machine.config], - [ depth=../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/4.5 - cd runtime/etc/mono/4.5 - rm -f machine.config - $LN_S $reldir/data/net_4_5/machine.config machine.config - cd $depth - ],[LN_S='$LN_S']) - - AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/web.config], - [ depth=../../../.. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;; - .) reldir=$depth ;; - *) reldir=$depth/$srcdir ;; - esac - $ac_aux_dir/install-sh -d runtime/etc/mono/4.5 - cd runtime/etc/mono/4.5 - rm -f web.config - $LN_S $reldir/data/net_4_5/web.config web.config - cd $depth - ],[LN_S='$LN_S']) -fi - -# Top level Makefile.am subdirs -if test "x$with_core" = "xonly"; then - MONO_SUBDIRS="llvm mono" -else - if test "x$support_boehm" = "xyes" -a "x$libgc" = "xincluded"; then - mono_subdirs_libgc=external/bdwgc - fi - - if test x$enable_support_build != xno; then - mono_subdirs_support=support - fi - - if test x$cross_compiling = xno; then - # Some tools might not build when cross-compiling - mono_subdirs_tools=tools - fi - - if test x$DISABLE_MCS_DOCS != xyes; then - mono_subdirs_docs=docs - fi - - if test x$with_ikvm_native = xyes; then - mono_subdirs_ikvm_native=ikvm-native - fi - - MONO_SUBDIRS="po $mono_subdirs_libgc llvm mono $mono_subdirs_ikvm_native $mono_subdirs_support data runtime scripts man samples $mono_subdirs_tools $mono_subdirs_docs msvc acceptance-tests" - MONO_NOINST_SUBDIRS="$mono_subdirs_libgc" -fi - -AC_SUBST(MONO_SUBDIRS) -AC_SUBST(MONO_NOINST_SUBDIRS) - -AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/echo "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool]) -AC_CONFIG_COMMANDS([nolock-libtool], [sed -e 's/lock_old_archive_extraction=yes/lock_old_archive_extraction=no/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool]) -AC_CONFIG_COMMANDS([clean-llvm], [rm -f llvm/llvm_config.mk]) - -# -# Mono.Native Support -# ------------------- -# Mono.Native is the new name for both System.Native and System.Security.Cryptography.Apple. -# It is built as a stand-alone shared library and not bundled with the runtime because we -# may need to build two different versions of it. -# -# Starting with macOS 10.12+ and iOS 10+, Apple introduced a new Unified API for some of the -# crypto primitives that we're using as part of System.Security.Cryptography.Apple. -# -# On Desktop, we can check at runtime whether the OS version is recent enough and switch -# implementation accordingly. We build a single `libmono-native` shared library. -# -# However, on Mobile we cannot have any undefined symbols as this would break Bitcode. -# -# During the mobile build, we are called with `CFLAGS` containing an explicit minium version flag, -# which is eiter `-mmacosx-version-min=`, `-mios-simulator-version-min=` or `-miphoneos-version-min=` -# depending on platform. -# -# We build two versions of the shared library: -# - `libmono-native-compat` is built with whichever minimum version is passed to us via `CFLAGS`. -# - `libmono-native-unifed` is built with the minimum version set to macOS 10.12+ / iOS 10+. -# -# For testing purpuses, there is a function called `mono_native_get_platform_type ()` -# (see mono/native/mono-native-platform.c), which returns a `MonoNativePlatformType` enum value. -# There is also `Mono.MonoNativePlatform.GetPlatformType ()` (see mcs/class/corlib/Test/Mono/MonoNativePlatform.cs). -# -# This can be called by automated tests both to ensure that the library has been correctly installed and also -# to verify that it's the correct version of it. -# - -AC_MSG_CHECKING([Mono.Native support]) -sed_version_pattern='[[0-9]]\{1,2\}\(\.[[0-9]]\{1,2\}\)' -if test x$disable_mono_native = xyes; then - mono_native=no -elif test x$target_osx = xyes; then - MONO_NATIVE_CC=$CC - MONO_NATIVE_CXX=$CXX - MONO_NATIVE_CCASFLAGS=$CCASFLAGS - MONO_NATIVE_CPPFLAGS=$CPPFLAGS - MONO_NATIVE_CXXFLAGS=$CXXFLAGS - MONO_NATIVE_CFLAGS=$CFLAGS - MONO_NATIVE_LDFLAGS=$LDFLAGS - - mono_native=yes - MONO_NATIVE_PLATFORM=macos - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_MACOS" - - if test x$enable_gss = xyes; then - MONO_NATIVE_LDFLAGS="$MONO_NATIVE_LDFLAGS -framework GSS" - fi - - AC_MONO_APPLE_AVAILABLE(mono_native_compat, [whether we need the compatibility layer], - [!(MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12)]) - - if test x$mono_native_compat = xyes; then - mono_native_compat=yes - mono_native_text="Mac OSX (compat + unified v10.12)" - MONO_NATIVE_COMPAT_CCASFLAGS=$MONO_NATIVE_CCASFLAGS - MONO_NATIVE_COMPAT_CPPFLAGS=$MONO_NATIVE_CPPFLAGS - MONO_NATIVE_COMPAT_CXXFLAGS=$MONO_NATIVE_CXXFLAGS - MONO_NATIVE_COMPAT_CFLAGS=$MONO_NATIVE_CFLAGS - MONO_NATIVE_COMPAT_LDFLAGS=$MONO_NATIVE_LDFLAGS - - sed_remove_mac_version_pattern="s/-mmacosx-version-min=$sed_version_pattern//g" - MONO_NATIVE_UNIFIED_CCASFLAGS="`echo $CCASFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12" - MONO_NATIVE_UNIFIED_CPPFLAGS="`echo $CPPFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12" - MONO_NATIVE_UNIFIED_CXXFLAGS="`echo $CXXFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12" - MONO_NATIVE_UNIFIED_CFLAGS="`echo $CFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12" - MONO_NATIVE_UNIFIED_LDFLAGS="`echo $LDFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12" - else - mono_native_compat=no - mono_native_text="Mac OSX" - fi -elif test x$mono_native_platform_ios = xyes; then - AC_MONO_APPLE_TARGET(TARGET_OS_SIMULATOR, [mono_native_ios_sim=yes], [mono_native_ios_sim=no]) - - AC_MONO_APPLE_TARGET(TARGET_OS_IOS, [ - if test x$mono_native_ios_sim = xyes; then - mono_native_ios_target=ios-simulator - mono_native_text="iOS Simulator" - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_IPHONE | MONO_NATIVE_PLATFORM_TYPE_SIMULATOR" - else - mono_native_ios_target=iphoneos - mono_native_text="iOS Device" - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_IPHONE | MONO_NATIVE_PLATFORM_TYPE_DEVICE" - fi - mono_native_unified_version="10.0" - mono_native_compat_check="__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0" - ], [ - AC_MONO_APPLE_TARGET(TARGET_OS_TV, [ - if test x$mono_native_ios_sim = xyes; then - mono_native_ios_target=tvos-simulator - mono_native_text="AppleTV Simulator" - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_TV | MONO_NATIVE_PLATFORM_TYPE_SIMULATOR" - else - mono_native_ios_target=tvos - mono_native_text="AppleTV Device" - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_TV | MONO_NATIVE_PLATFORM_TYPE_DEVICE" - fi - mono_native_unified_version="10.0" - mono_native_compat_check="__TV_OS_VERSION_MIN_REQUIRED >= __TVOS_10_0" - ], [ - AC_MONO_APPLE_TARGET(TARGET_OS_WATCH, [ - if test x$mono_native_ios_sim = xyes; then - mono_native_ios_target=watchos-simulator - mono_native_text="Apple Watch Simulator" - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_WATCH | MONO_NATIVE_PLATFORM_TYPE_SIMULATOR" - else - mono_native_ios_target=watchos - mono_native_text="Apple Watch Device" - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_WATCH | MONO_NATIVE_PLATFORM_TYPE_DEVICE" - fi - mono_native_unified_version="5.0" - mono_native_compat_check="__WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_5_0" - ], [ - AC_MSG_ERROR([Unknown iOS Target]) - ]) - ]) - ]) - - AC_MONO_APPLE_AVAILABLE(mono_native_compat, [whether we need the compatibility layer], [!($mono_native_compat_check)]) - - if test x$with_bitcode = xyes; then - mono_native_ldflags="-framework CoreFoundation -framework Foundation -no-undefined -fatal_warnings" - MONO_NATIVE_LIBADD="../mini/$LIBMONO_LA" - else - mono_native_ldflags="-framework CoreFoundation -framework Foundation -fatal_warnings" - fi - - if test x$enable_gss = xyes; then - mono_native_ldflags="$mono_native_ldflags -framework GSS" - fi - - MONO_NATIVE_CC=$CC - MONO_NATIVE_CXX=$CXX - MONO_NATIVE_CCASFLAGS=$CCASFLAGS - MONO_NATIVE_CPPFLAGS=$CPPFLAGS - MONO_NATIVE_CXXFLAGS=$CXXFLAGS - MONO_NATIVE_CFLAGS=$CFLAGS - MONO_NATIVE_LDFLAGS="$LDFLAGS $mono_native_ldflags" - - if test x$mono_native_compat = xyes; then - mono_native_text="$mono_native_text (compat + unified v$mono_native_unified_version)" - MONO_NATIVE_COMPAT_CCASFLAGS=$MONO_NATIVE_CCASFLAGS - MONO_NATIVE_COMPAT_CPPFLAGS=$MONO_NATIVE_CPPFLAGS - MONO_NATIVE_COMPAT_CXXFLAGS=$MONO_NATIVE_CXXFLAGS - MONO_NATIVE_COMPAT_CFLAGS=$MONO_NATIVE_CFLAGS - MONO_NATIVE_COMPAT_LDFLAGS=$MONO_NATIVE_LDFLAGS - - sed_remove_ios_version_pattern="s/-m\(.*\)-version-min=$sed_version_pattern//g" - MONO_NATIVE_UNIFIED_CCASFLAGS="`echo $CCASFLAGS | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version" - MONO_NATIVE_UNIFIED_CPPFLAGS="`echo $CPPFLAGS | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version" - MONO_NATIVE_UNIFIED_CXXFLAGS="`echo $CXXFLAGS | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version" - MONO_NATIVE_UNIFIED_CFLAGS="`echo $CFLAGS | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version" - MONO_NATIVE_UNIFIED_LDFLAGS="`echo $LDFLAGS $mono_native_ldflags | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version" - fi - - mono_native=yes - MONO_NATIVE_PLATFORM=ios -elif test x$host_linux = xyes; then - mono_native_text="Linux" - MONO_NATIVE_CC=$CC - MONO_NATIVE_CXX=$CXX - MONO_NATIVE_CCASFLAGS=$CCASFLAGS - MONO_NATIVE_CPPFLAGS=$CPPFLAGS - MONO_NATIVE_CXXFLAGS=$CXXFLAGS - MONO_NATIVE_CFLAGS=$CFLAGS - MONO_NATIVE_LDFLAGS=$LDFLAGS - if test x$enable_gss = xyes; then - MONO_NATIVE_LDFLAGS="$MONO_NATIVE_LDFLAGS -lgssapi_krb5" - else - AC_MSG_WARN([GSS is not enabled, it requires libkrb5-dev package]) - fi - mono_native=yes - mono_native_compat=no - MONO_NATIVE_PLATFORM=linux - - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_LINUX" -elif test x$target_wasm = xyes; then - mono_native_text="wasm" - MONO_NATIVE_CC=$CC - MONO_NATIVE_CXX=$CXX - MONO_NATIVE_CCASFLAGS=$CCASFLAGS - # The system.native code uses _WASM_ to check for wasm - MONO_NATIVE_CPPFLAGS="$CPPFLAGS -D_WASM_" - MONO_NATIVE_CXXFLAGS=$CXXFLAGS - MONO_NATIVE_CFLAGS=$CFLAGS - MONO_NATIVE_LDFLAGS=$LDFLAGS - - mono_native=yes - mono_native_compat=no - MONO_NATIVE_PLATFORM=linux - - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_LINUX" -elif case $host_os in aix*|os400*) true;; *) false;; esac; then - mono_native_text="AIX" - MONO_NATIVE_CC=$CC - MONO_NATIVE_CXX=$CXX - MONO_NATIVE_CCASFLAGS=$CCASFLAGS - MONO_NATIVE_CPPFLAGS=$CPPFLAGS - MONO_NATIVE_CXXFLAGS=$CXXFLAGS - MONO_NATIVE_CFLAGS=$CFLAGS - dnl nosymbolic- is a hack in case -G for linking is used, as -G seems - dnl to change the way unresolved symbols work on library load in an - dnl incompatible manner. (as references to runtime functions are - dnl resolved later) Default params otherwise are that, so seems OK. - dnl Likewise, we don't seem to need to cover the entire runtime with - dnl it either, on both AIX and PASE. -brtl from -G does seem to spew - dnl Big Scary TOC Warnings (tm) from the linker, but it doesn't seem - dnl problematic with gcc's -mminimal-toc. - dnl ---- - dnl flock in AIX exists in libbsd (not the same as freedesktop.org - dnl libbsd) which Mono.Native needs. - dnl Because of the way that the library is built by default, unresolved - dnl references are kept and resolved at runtime. Often, the dependency - dnl chain means libbsd is loaded anyways, but not necessarily. It's - dnl better to explicitly link it, even though it has it shadows libc's - dnl ioctl with its own. (As for the other unresolved imports, those - dnl should be provided by the Mono runtime loaded.) - MONO_NATIVE_LDFLAGS="$LDFLAGS -lbsd -Wl,-bnosymbolic-" - - mono_native=yes - mono_native_compat=no - MONO_NATIVE_PLATFORM=aix - - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_AIX" -elif case $host_os in freebsd*) true;; *) false;; esac; then - mono_native_text="FreeBSD" - MONO_NATIVE_CC=$CC - MONO_NATIVE_CXX=$CXX - MONO_NATIVE_CPPFLAGS=$CPPFLAGS - MONO_NATIVE_CXXFLAGS=$CXXFLAGS - MONO_NATIVE_CFLAGS="$CFLAGS -I/usr/local/include" - MONO_NATIVE_LDFLAGS=$LDFLAGS - - mono_native=yes - mono_native_compat=no - MONO_NATIVE_PLATFORM=freebsd - AC_MSG_CHECKING([Mono.Native support]) - AC_MSG_RESULT(freebsd) - - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_FREEBSD" -elif case $host_os in netbsd*) true;; *) false;; esac; then - mono_native_text="NetBSD" - MONO_NATIVE_CC=$CC - MONO_NATIVE_CXX=$CXX - MONO_NATIVE_CPPFLAGS=$CPPFLAGS - MONO_NATIVE_CXXFLAGS=$CXXFLAGS - MONO_NATIVE_CFLAGS=$CFLAGS - MONO_NATIVE_LDFLAGS=$LDFLAGS - - mono_native=yes - mono_native_compat=no - MONO_NATIVE_PLATFORM=netbsd - AC_MSG_CHECKING([Mono.Native support]) - AC_MSG_RESULT(netbsd) - - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_NETBSD" -elif case $host_os in haiku*) true;; *) false;; esac; then - mono_native_text="Haiku" - MONO_NATIVE_CC=$CC - MONO_NATIVE_CXX=$CXX - MONO_NATIVE_CPPFLAGS=$CPPFLAGS - MONO_NATIVE_CXXFLAGS=$CXXFLAGS - MONO_NATIVE_CFLAGS=$CFLAGS - MONO_NATIVE_LDFLAGS=$LDFLAGS - - mono_native=yes - mono_native_compat=no - MONO_NATIVE_PLATFORM=haiku - AC_MSG_CHECKING([Mono.Native support]) - AC_MSG_RESULT(haiku) - - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_HAIKU" -elif test x$platform_android = xyes; then - mono_native_text="Android" - MONO_NATIVE_CC=$CC - MONO_NATIVE_CXX=$CXX - MONO_NATIVE_CPPFLAGS=$CPPFLAGS - MONO_NATIVE_CXXFLAGS=$CXXFLAGS - MONO_NATIVE_CFLAGS=$CFLAGS - MONO_NATIVE_LDFLAGS=$LDFLAGS - MONO_NATIVE_LIBADD="../mini/$LIBMONO_LA" - - mono_native=yes - mono_native_compat=no - MONO_NATIVE_PLATFORM=android - - MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_ANDROID" -else - mono_native=no - mono_native_text="no" -fi - -AC_MSG_RESULT($mono_native_text) - -if test x$mono_native_compat = xyes; then - MONO_NATIVE_LIBRARY_NAME=libmono-native-compat -else - MONO_NATIVE_LIBRARY_NAME=libmono-native -fi - -AC_SUBST(MONO_NATIVE_PLATFORM) -AC_SUBST(MONO_NATIVE_CC) -AC_SUBST(MONO_NATIVE_CXX) -AC_SUBST(MONO_NATIVE_CCASFLAGS) -AC_SUBST(MONO_NATIVE_COMPAT_CCASFLAGS) -AC_SUBST(MONO_NATIVE_UNIFIED_CCASFLAGS) -AC_SUBST(MONO_NATIVE_CPPFLAGS) -AC_SUBST(MONO_NATIVE_COMPAT_CPPFLAGS) -AC_SUBST(MONO_NATIVE_UNIFIED_CPPFLAGS) -AC_SUBST(MONO_NATIVE_CXXFLAGS) -AC_SUBST(MONO_NATIVE_COMPAT_CXXFLAGS) -AC_SUBST(MONO_NATIVE_UNIFIED_CXXFLAGS) -AC_SUBST(MONO_NATIVE_CFLAGS) -AC_SUBST(MONO_NATIVE_COMPAT_CFLAGS) -AC_SUBST(MONO_NATIVE_UNIFIED_CFLAGS) -AC_SUBST(MONO_NATIVE_LDFLAGS) -AC_SUBST(MONO_NATIVE_COMPAT_LDFLAGS) -AC_SUBST(MONO_NATIVE_UNIFIED_LDFLAGS) -AC_SUBST(MONO_NATIVE_LIBRARY_NAME) -AC_SUBST(MONO_NATIVE_LIBADD) - -AM_CONDITIONAL(MONO_NATIVE, test x$mono_native = xyes) -AM_CONDITIONAL(MONO_NATIVE_COMPAT, test x$mono_native_compat = xyes) -AM_CONDITIONAL(MONO_NATIVE_PLATFORM_MACOS, test x$MONO_NATIVE_PLATFORM = xmacos) -AM_CONDITIONAL(MONO_NATIVE_PLATFORM_IOS, test x$MONO_NATIVE_PLATFORM = xios) -AM_CONDITIONAL(MONO_NATIVE_PLATFORM_LINUX, test x$MONO_NATIVE_PLATFORM = xlinux) -AM_CONDITIONAL(MONO_NATIVE_PLATFORM_AIX, test x$MONO_NATIVE_PLATFORM = xaix) -AM_CONDITIONAL(MONO_NATIVE_PLATFORM_ANDROID, test x$MONO_NATIVE_PLATFORM = xandroid) -AM_CONDITIONAL(MONO_NATIVE_PLATFORM_FREEBSD, test x$MONO_NATIVE_PLATFORM = xfreebsd) -AM_CONDITIONAL(MONO_NATIVE_PLATFORM_NETBSD, test x$MONO_NATIVE_PLATFORM = xnetbsd) -AM_CONDITIONAL(MONO_NATIVE_PLATFORM_HAIKU, test x$MONO_NATIVE_PLATFORM = xhaiku) - -MONO_NATIVE_PLATFORM_TYPE_COMPAT="$MONO_NATIVE_PLATFORM_TYPE | MONO_NATIVE_PLATFORM_TYPE_COMPAT" -MONO_NATIVE_PLATFORM_TYPE_UNIFIED="$MONO_NATIVE_PLATFORM_TYPE | MONO_NATIVE_PLATFORM_TYPE_UNIFIED" -AC_SUBST(MONO_NATIVE_PLATFORM_TYPE) -AC_SUBST(MONO_NATIVE_PLATFORM_TYPE_COMPAT) -AC_SUBST(MONO_NATIVE_PLATFORM_TYPE_UNIFIED) - -### C++ Linker selection -# -# We have to lie to autotools, sometimes. -# -# If we're building with llvm compiled into Mono, set MONO_CXXLD to CXX, -# otherwise to CC. We want C linking even if we're compiling with C++ enabled -# because we do not want to link inthe C++ runtime library (-lstdc++ or -lc++), -# except if we're linking with LLVM which relies on it. -# -# Explanation of the hack: -# -# According to -# https://www.gnu.org/software/automake/manual/html_node/How-the-Linker-is-Chosen.html, -# automake chooses the linker that it used to compile a target based on the -# _SOURCES for that target. If the target is comprised of only C code, it -# chooses the C linker (on Linux and OSX this is just gcc or clang called with -# linker arguments and a -o). If the target _SOURCES include at least one C++ file, -# then automake chooses the C++ linker (usually g++ or clang++ called with linker arguments and -o). -# -# The problem for Mono is that we don't want the C++ runtime library (libstdc++ -# or libc++) linked in - even when Mono is written in C++, we take care not to -# require the runtime library. As a result, we don't want g++ or clang++ to do -# the linking. On the other hand if LLVM is enabled, then we _must_ use the -# C++ linker - LLVM doesn't have the same restrictions. -# -# So the trick is we set MONO_CXXLD here to $CXX or $CC and in -# mono/mini/Makefile.am.in we have CCLD=$MONO_CXXLD and CXXLD=$MONO_CXXLD which bypasses -# automake's autodetection and lets us use the linker that we want. -# -if test "x$enable_llvm_runtime" = "xyes"; then - AC_SUBST(MONO_CXXLD, [$CXX]) - AC_SUBST(MONO_LIBTOOL_TAG, '--tag=CXX') -else - AC_SUBST(MONO_CXXLD, [$CC]) - AC_SUBST(MONO_LIBTOOL_TAG, '') -fi - -### Set -Werror options -# -# Anything involving -Werror must be done late because autoconf depends on compiling with warnings to be success. -# -if test x"$GCC" = xyes; then - - if test "x$with_jemalloc" != "xyes"; then - - # incompatible-pointer-types requires gcc circa 5.x - - ORIG_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Wincompatible-pointer-types -Werror" - AC_MSG_CHECKING(for -Wincompatible-pointer-types option to gcc) - AC_TRY_COMPILE([],[ - ], [ - AC_MSG_RESULT(yes) - CFLAGS="$ORIG_CFLAGS -Werror=incompatible-pointer-types" - ], [ - AC_MSG_RESULT(no) - CFLAGS=$ORIG_CFLAGS - ]) - - CFLAGS="$CFLAGS -Werror=return-type" - fi - - # Implicit function declarations are not 64 bit safe - # Do this late, since this causes lots of configure tests to fail - CFLAGS="$CFLAGS -Werror-implicit-function-declaration" - # jay has a lot of implicit declarations - JAY_CFLAGS="-Wno-implicit-function-declaration" - - ORIG_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Wsometimes-uninitialized -Werror" - AC_MSG_CHECKING(for -Wsometimes-uninitialized option to gcc) - AC_TRY_COMPILE([],[ - ], [ - AC_MSG_RESULT(yes) - CFLAGS="$ORIG_CFLAGS -Werror=sometimes-uninitialized" - ], [ - AC_MSG_RESULT(no) - CFLAGS=$ORIG_CFLAGS - ]) -fi - -# zlib/configure checks if this program compiles and if so -# defines _LARGEFILE64_SOURCE on the compiler command line (not config.h). -# -AC_MSG_CHECKING([for large file support]) -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([ - #include - off64_t dummy = 0; - ])], [ - AC_MSG_RESULT(yes) - # FIXME The ramifications of _LARGEFILE64_SOURCE are not understood. - # ZLIB_CFLAGS="$ZLIB_CFLAGS -D_LARGEFILE64_SOURCE=1" - ], [ - AC_MSG_RESULT(no) - ]) - -# for icu shim -ICU_SHIM_PATH=. -if test x$with_core = xonly; then - if test x$cross_compiling = xno; then - AC_CHECK_FILE($srcdir/../libraries/Native/Unix/System.Globalization.Native/pal_icushim.h, [have_shim_globalization=yes], [have_shim_globalization=no]) - fi - if test x$have_shim_globalization = xyes || test x$cross_compiling = xyes; then - ICU_SHIM_PATH=../../../libraries/Native/Unix/System.Globalization.Native - if test x$target_wasm = xyes && test x$with_static_icu = xyes; then - ICU_CFLAGS="-DTARGET_UNIX -DU_DISABLE_RENAMING -DHAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS -DHAVE_SET_MAX_VARIABLE" - have_sys_icu=yes - elif test x$target_osx = xyes; then - ORIG_CPPFLAGS=$CPPFLAGS - # adding icu path to pkg_config_path - PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig - export PKG_CONFIG_PATH - CPPFLAGS="`pkg-config --cflags-only-I icu-uc`" - AC_CHECK_LIB(icucore, ucol_open, LIBS=$LIBS, - [AC_MSG_ERROR([Cannot find libicucore, skipping build for System.Globalization.Native. .NET globalization is not expected to function.])]) - AC_CHECK_HEADER(unicode/utypes.h, [have_sys_icu=yes], [have_sys_icu=no]) - if test x$have_sys_icu = xyes; 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 - 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 - 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).])]) - AC_CHECK_LIB(icui18n, main, LIBS=$LIBS, - [AC_MSG_ERROR([Cannot find libicui18n, try installing libicu-dev (or the appropriate package for your platform).])]) - AC_CHECK_HEADER(unicode/utypes.h, [have_sys_icu=yes], [have_sys_icu=no]) - 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 - elif test x$host_wasm = 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" - have_sys_icu=yes - else - GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM" - fi - AC_SUBST(ICU_CFLAGS) - else - GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM" - fi -else - GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM" -fi - -AC_SUBST(GLOBALIZATION_SHIM_DEFINES) -AC_SUBST(ICU_SHIM_PATH) -AM_CONDITIONAL(HAVE_SYS_ICU, test x$have_sys_icu = xyes) - -AC_SUBST(CFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(LDFLAGS) -AC_SUBST(CCLDFLAGS) -AC_SUBST(ZLIB_CFLAGS) - -# Update all submodules recursively to ensure everything is checked out -if test "x$with_core" != "xonly"; then - (cd $srcdir && scripts/update_submodules.sh) -fi - -AC_MONO_OUTPUT() - -if test x$host_win32 = xyes; then - # Get rid of 'cyg' prefixes in library names - sed -e "s/\/cyg\//\/\//" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool - # libtool seems to inherit -mno-cygwin from our CFLAGS, and uses it to compile its executable - # wrapper scripts which use exec(). gcc has no problem compiling+linking this, but the resulting - # executable doesn't work... - sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool -fi - -if test x$host_darwin = xyes; then - # This doesn't seem to be required and it slows down parallel builds - sed -e 's,lock_old_archive_extraction=yes,lock_old_archive_extraction=no,g' < libtool > libtool.new && mv libtool.new libtool && chmod +x libtool -fi - -( - case $prefix in - NONE) prefix=$ac_default_prefix ;; - esac - case $exec_prefix in - NONE) exec_prefix='${prefix}' ;; - esac - - # - # If we are cross compiling, we don't build in the mcs/ tree. Let us not clobber - # any existing config.make. This allows people to share the same source tree - # with different build directories, one native and one cross - # - if test x$cross_compiling = xno && test x$enable_mcs_build != xno; then - - test -w $mcs_topdir/build || chmod +w $mcs_topdir/build - - echo "prefix=$prefix" > $mcs_topdir/build/config.make - echo "exec_prefix=$exec_prefix" >> $mcs_topdir/build/config.make - echo "sysconfdir=$sysconfdir" >> $mcs_topdir/build/config.make - echo 'mono_libdir=${exec_prefix}/lib' >> $mcs_topdir/build/config.make - echo "mono_build_root=$mono_build_root" >> $mcs_topdir/build/config.make - echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $mcs_topdir/build/config.make - echo "JAY_CFLAGS = $JAY_CFLAGS" >> $mcs_topdir/build/config.make - echo "VERSION = $VERSION" >> $mcs_topdir/build/config.make - - case $INSTALL in - [[\\/$]]* | ?:[[\\/]]* ) mcs_INSTALL=$INSTALL ;; - *) mcs_INSTALL=$mono_build_root/$INSTALL ;; - esac - - echo "INSTALL = $mcs_INSTALL" >> $mcs_topdir/build/config.make - - export VERSION - [myver=$($AWK 'BEGIN { - split (ENVIRON["VERSION"] ".0.0.0", vsplit, ".") - if(length(vsplit [1]) > 4) { - split (substr(ENVIRON["VERSION"], 0, 4) "." substr(ENVIRON["VERSION"], 5) ".0.0", vsplit, ".") - } - print vsplit [1] "." vsplit [2] "." vsplit [3] "." vsplit [4] - }')] - - echo "MONO_VERSION = $myver" >> $mcs_topdir/build/config.make - echo "MONO_CORLIB_VERSION = $MONO_CORLIB_VERSION" >> $mcs_topdir/build/config.make - - if test x$host_darwin = xyes; then - echo "BUILD_PLATFORM = macos" >> $mcs_topdir/build/config.make - echo "HOST_PLATFORM ?= macos" >> $mcs_topdir/build/config.make - echo "XTEST_PLATFORM ?= osx" >> $mcs_topdir/build/config.make - elif test x$host_win32 = xyes; then - echo "BUILD_PLATFORM = win32" >> $mcs_topdir/build/config.make - echo "HOST_PLATFORM ?= win32" >> $mcs_topdir/build/config.make - echo "XTEST_PLATFORM ?= windows" >> $mcs_topdir/build/config.make - elif test x$host_linux = xyes; then - echo "BUILD_PLATFORM = linux" >> $mcs_topdir/build/config.make - echo "HOST_PLATFORM ?= linux" >> $mcs_topdir/build/config.make - echo "XTEST_PLATFORM ?= linux" >> $mcs_topdir/build/config.make - else - echo "BUILD_PLATFORM = unix" >> $mcs_topdir/build/config.make - echo "HOST_PLATFORM ?= unix" >> $mcs_topdir/build/config.make - echo "XTEST_PLATFORM ?= unix" >> $mcs_topdir/build/config.make - fi - - echo "PLATFORM_AOT_PREFIX = $PLATFORM_AOT_PREFIX" >> $mcs_topdir/build/config.make - if test "x$PLATFORM_AOT_SUFFIX" != "x"; then - echo "PLATFORM_AOT_SUFFIX = $PLATFORM_AOT_SUFFIX" >> $mcs_topdir/build/config.make - fi - - if test x$AOT_SUPPORTED = xyes -a x$enable_system_aot = xdefault; then - enable_system_aot=yes - fi - - if test x$host_win32 = xno -a x$enable_system_aot = xyes; then - echo "ENABLE_AOT = 1" >> $mcs_topdir/build/config.make - fi - - if test x$DISABLE_MCS_DOCS = xyes; then - echo "DISABLE_MCS_DOCS = yes" >> $mcs_topdir/build/config.make - fi - - if test x$has_extension_module != xno; then - echo "EXTENSION_MODULE = 1" >> $srcdir/$mcsdir/build/config.make - fi - - echo "DEFAULT_PROFILE = $default_profile" >> $srcdir/$mcsdir/build/config.make - - if test "x$test_bcl_opt" = "xyes"; then - echo "BCL_OPTIMIZE = 1" >> $srcdir/$mcsdir/build/config.make - fi - - echo "STANDALONE_CSC_LOCATION=$CSC_LOCATION" >> $srcdir/$mcsdir/build/config.make - echo "SERVER_CSC_LOCATION?=$CSC_LOCATION" >> $srcdir/$mcsdir/build/config.make - echo "VBCS_LOCATION?=$VBCS_LOCATION" >> $srcdir/$mcsdir/build/config.make - - if test $csc_compiler = mcs; then - echo "MCS_MODE = 1" >> $srcdir/$mcsdir/build/config.make - fi - - if test "x$AOT_BUILD_FLAGS" != "x" ; then - echo "AOT_RUN_FLAGS=$AOT_RUN_FLAGS" >> $srcdir/$mcsdir/build/config.make - echo "AOT_BUILD_ATTRS=$AOT_BUILD_ATTRS" >> $srcdir/$mcsdir/build/config.make - - if test "x$internal_llvm" != "xno" && test "x$enable_llvm_msvc_only" = "xno"; then - echo "AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS,$MONO_LLVM_PATH_OPTION" >> $srcdir/$mcsdir/build/config.make - else - echo "AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS" >> $srcdir/$mcsdir/build/config.make - fi - fi - - if test "x$AOT_MODE" != "x" ; then - echo "AOT_MODE=$AOT_MODE" >> $srcdir/$mcsdir/build/config.make - fi - - if test "x$enable_btls" = "xyes"; then - echo "HAVE_BTLS=1" >> $srcdir/$mcsdir/build/config.make - fi - - if test "x$mono_native" = "xyes"; then - echo "MONO_NATIVE_SUPPORTED=true" >> $srcdir/$mcsdir/build/config.make - else - echo "MONO_NATIVE_SUPPORTED=false" >> $srcdir/$mcsdir/build/config.make - fi - - if test x$mono_native_compat = xyes; then - echo "MONO_NATIVE_USING_COMPAT=true" >> $srcdir/$mcsdir/build/config.make - else - echo "MONO_NATIVE_USING_COMPAT=false" >> $srcdir/$mcsdir/build/config.make - fi - - force_enable_compiler_server=no; - - AC_MSG_CHECKING([compiler server]) - AC_ARG_WITH(compiler-server, [ --with-compiler-server=yes,no,default,force Enables or disables compiler server],[ - if test x$withval = xyes; then - enable_compiler_server=yes; - # force will bypass any automatic disables to allow you to test the compiler server - # in scenarios where it is disabled - elif test x$withval = xforce; then - enable_compiler_server=yes; - force_enable_compiler_server=yes; - elif test x$withval = xno; then - enable_compiler_server=no; - elif test x$withval = xdefault; then - enable_compiler_server=yes; - else - AC_MSG_ERROR([You must supply one of "yes", "no", "default" or "force" to the --with-compiler-server option]) - fi - ],[enable_compiler_server=yes]) - - AC_MSG_RESULT($enable_compiler_server) - - if test x$enable_compiler_server = xyes; then - if test x$force_enable_compiler_server = xyes; then - AC_MSG_WARN([forcing compiler server to stay enabled]) - elif test x$host_darwin = xyes || test x$host_win32 = xyes; then - AC_MSG_WARN([compiler server temporarily disabled on darwin and win32]) - enable_compiler_server=no; - elif test x$csc_compiler = xmcs; then - AC_MSG_WARN([mcs does not support the compiler server]) - enable_compiler_server=no; - fi - fi - - echo "MONO_NATIVE_PLATFORM_TYPE=$MONO_NATIVE_PLATFORM_TYPE" >> $srcdir/$mcsdir/build/config.make - echo "MONO_NATIVE_PLATFORM=$MONO_NATIVE_PLATFORM" >> $srcdir/$mcsdir/build/config.make - if test x$enable_compiler_server = xyes; then - echo "ENABLE_COMPILER_SERVER?=1" >> $srcdir/$mcsdir/build/config.make - else - echo "ENABLE_COMPILER_SERVER?=0" >> $srcdir/$mcsdir/build/config.make - fi - echo "COMPILER_SERVER_PIPENAME?=monomake" >> $srcdir/$mcsdir/build/config.make - - if test x$enable_msvc_only = xyes; then - echo "ENABLE_MSVC_ONLY=1" >> $srcdir/$mcsdir/build/config.make - fi - - fi - -) - -libgdiplus_msg=${libgdiplus_loc:-assumed to be installed} - -btls_platform_string= -if test x$enable_btls = xyes; then - if test x$btls_android = xyes; then - btls_platform_string=" (android:$BTLS_PLATFORM)" - else - btls_platform_string=" ($BTLS_PLATFORM)" - fi -fi - -thread_suspend_msg= -if test x$buildsgen = xyes; then - if test x$enable_cooperative_suspend != xno; then - thread_suspend_msg="Suspend: Cooperative" - elif test x$enable_hybrid_suspend != xno; then - thread_suspend_msg="Suspend: Hybrid" - else - thread_suspend_msg="Suspend: Preemptive" - fi -fi - -if test "x$with_core" = "xonly"; then - if test ! -e netcore/Makefile; then - # Out of tree builds - mkdir -p netcore - echo "all:" > netcore/Makefile - fi - echo "VERSION = $VERSION" > netcore/config.make - echo "RID = $RID" >> netcore/config.make - echo "COREARCH = $COREARCH" >> netcore/config.make - echo "CORETARGETS = $CORETARGETS" >> netcore/config.make - echo "MONO_CORLIB_VERSION = $MONO_CORLIB_VERSION" >> netcore/config.make - - if test x$build_darwin = xyes; then - echo "HOST_PLATFORM ?= macos" >> netcore/config.make - elif test x$host_darwin = xyes; then - echo "HOST_PLATFORM ?= macos" >> netcore/config.make - elif test x$host_win32 = xyes; then - echo "HOST_PLATFORM ?= win32" >> netcore/config.make - elif test x$host_linux = xyes; then - echo "HOST_PLATFORM ?= linux" >> netcore/config.make - else - echo "HOST_PLATFORM ?= unix" >> netcore/config.make - fi -fi - - -echo " - mcs source: $mcsdir - C# Compiler: $csc_compiler - CompilerServer:$enable_compiler_server - - Engine: - Host: $host - Target: $target - GC: $gc_msg - $thread_suspend_msg - TLS: $with_tls - SIGALTSTACK: $with_sigaltstack - Engine: $jit_status - BigArrays: $enable_big_arrays - DTrace: $enable_dtrace - LLVM Back End: $enable_llvm (built in-tree: $internal_llvm, assertions: $enable_llvm_asserts, msvc only: $enable_llvm_msvc_only) - Spectre: $spectre_mitigation_status - Mono.Native: $mono_native_text - - Libraries: - .NET 4.x: $with_profile4_x - Xamarin.Android: $with_monodroid - Xamarin.iOS: $with_monotouch - Xamarin.WatchOS: $with_monotouch_watch - Xamarin.TVOS: $with_monotouch_tv - Xamarin.Mac: $with_xammac - Windows AOT: $with_winaot - Orbis: $with_orbis - Unreal: $with_unreal - WebAssembly: $with_wasm - Test profiles: AOT Full ($with_testing_aot_full), AOT Hybrid ($with_testing_aot_hybrid), AOT Full Interp ($with_testing_aot_full_interp), Windows Full AOT Interp ($with_testing_winaot_interp) - JNI support: $jdk_headers_found - libgdiplus: $libgdiplus_msg - zlib: $zlib_msg - BTLS: $enable_btls$btls_platform_string - jemalloc: $with_jemalloc (always use: $with_jemalloc_always) - crash reporting: $crash_reporting (private crashes: $with_crash_privacy) - .NET Core: $with_core - $disabled -" -if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then - AC_MSG_WARN([Turning off static Mono is a risk, you might run into unexpected bugs]) -fi diff --git a/src/mono/llvm/Makefile.am b/src/mono/llvm/Makefile.am deleted file mode 100644 index 1664965c5a2d7e..00000000000000 --- a/src/mono/llvm/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -if ENABLE_LLVM - -if HOST_WIN32 -llvm_config=llvm-config.exe -else -llvm_config=llvm-config -endif - -if HAVE_STATIC_ZLIB -llvm_extra_libs = $(STATIC_ZLIB_PATH) -else -if HAVE_SYS_ZLIB -llvm_extra_libs=-lz -else -llvm_extra_libs= -endif -endif - -if INTERNAL_LLVM_ASSERTS -ENABLE_ASSERTS=On -else -ENABLE_ASSERTS=Off -endif - -all-local: llvm_config.mk - -clean-local: clean-llvm-config - -$(mono_build_root)/llvm/llvm_config.mk: $(top_srcdir)/llvm/Makefile.am - $(top_srcdir)/llvm/build_llvm_config.sh "$(EXTERNAL_LLVM_CONFIG)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" | tee $@ - -llvm_config.mk: $(mono_build_root)/llvm/llvm_config.mk - -clean-llvm-config: - - rm -rf llvm_config.mk - -else -all-local: - -clean-local: -endif - -# Override this so we don't try to re-copy llvm when we install mono -install: - -if TARGET_WASM -LLVM_TARGET=wasm32 -else -LLVM_TARGET= -endif - diff --git a/src/mono/llvm/build_llvm_config.sh b/src/mono/llvm/build_llvm_config.sh deleted file mode 100755 index 293de69420a6c9..00000000000000 --- a/src/mono/llvm/build_llvm_config.sh +++ /dev/null @@ -1,227 +0,0 @@ -#!/bin/bash - -llvm_config=$1 -llvm_codegen_libs="$2" -llvm_extra_libs="${@:3}" - -use_llvm_config=1 -llvm_host_win32=0 -llvm_host_win32_wsl=0 -llvm_host_win32_cygwin=0 - -function win32_format_path { - local formatted_path=$1 - if [[ $llvm_host_win32_wsl = 1 ]] && [[ $1 != "/mnt/"* ]]; then - # if path is not starting with /mnt under WSL it could be a windows path, convert using wslpath. - formatted_path="$(wslpath -a "$1")" - elif [[ $llvm_host_win32_cygwin = 1 ]] && [[ $1 != "/cygdrive/"* ]]; then - # if path is not starting with /cygdrive under CygWin it could be a windows path, convert using cygpath. - formatted_path="$(cygpath -a "$1")" - fi - echo "$formatted_path" -} - -if [[ $llvm_config = *".exe" ]]; then - llvm_host_win32=1 - # llvm-config is a windows binary. Check if we are running CygWin or WSL since then we might still be able to run llvm-config.exe - host_uname="$(uname -a)" - case "$host_uname" in - *Microsoft*) - use_llvm_config=1 - llvm_host_win32_wsl=1 - ;; - CYGWIN*) - use_llvm_config=1 - llvm_host_win32_cygwin=1 - ;; - *) - use_llvm_config=0 - esac -fi - -local_osname="$(uname -s)" -if [ "x$local_osname" == "xLinux" ]; then - local_arch="$(file /bin/bash | cut -f2 -d',')" - llvm_config_arch="$(file $llvm_config | cut -f2 -d',')" - if [ "x$llvm_config_arch" != "x$local_arch" ]; then - use_llvm_config=0 - linux_cross_llvm=1 - fi -fi - -if [[ $llvm_host_win32 = 1 ]]; then - llvm_config=$(win32_format_path "$llvm_config") -fi - -if [[ $use_llvm_config = 1 ]]; then - llvm_api_version=`$llvm_config --mono-api-version` || "0" - with_llvm=`$llvm_config --prefix` - llvm_config_cflags=`$llvm_config --cflags` - llvm_system=`$llvm_config --system-libs` - llvm_core_components=`$llvm_config --libs analysis core bitwriter` - if [[ $llvm_api_version -lt 600 ]]; then - llvm_old_jit=`$llvm_config --libs mcjit jit 2>>/dev/null` - else - llvm_old_jit=`$llvm_config --libs mcjit 2>>/dev/null` - fi - llvm_new_jit=`$llvm_config --libs orcjit 2>>/dev/null` - - if [[ ! -z $llvm_codegen_libs ]]; then - llvm_extra=`$llvm_config --libs $llvm_codegen_libs` - fi - - # When building for Windows subsystem using WSL or CygWin the path returned from llvm-config.exe - # could be a Windows style path, make sure to format it into a path usable for WSL/CygWin. - if [[ $llvm_host_win32 = 1 ]]; then - with_llvm=$(win32_format_path "$with_llvm") - fi -fi - -# If building for one architecture, but running on a different architecture, we cannot execute that arch's llvm-config -# e.g. building an ARM64 build from x64. -if [[ $linux_cross_llvm = 1 ]] && [[ $use_llvm_config = 0 ]]; then - # Assume we have llvm-config sitting in llvm-install-root/bin directory, get llvm-install-root directory. - with_llvm="$(dirname $llvm_config)" - with_llvm="$(dirname $with_llvm)" - llvm_config_path=$with_llvm/include/llvm/Config/llvm-config.h - - # llvm-config --mono-api-version - llvm_api_version=`awk '/MONO_API_VERSION/ { print $3 }' $llvm_config_path` - - # llvm-config --cflags, returned information currently not used. - llvm_config_cflags= - - # llvm-config --system-libs - llvm_system="-lz -lrt -ldl -lpthread -lm" - - # llvm-config --libs analysis core bitwriter - llvm_core_components="-lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBitReader -lLLVMBitstreamReader -lLLVMCore -lLLVMRemarks -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle" - - # llvm-config --libs mcjit - llvm_old_jit="-lLLVMMCJIT -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMProfileData -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMBitstreamReader -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCore -lLLVMRemarks -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle" - - # llvm-config --libs orcjit - llvm_new_jit="-lLLVMOrcJIT -lLLVMTransformUtils -lLLVMJITLink -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMProfileData -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMBitstreamReader -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCore -lLLVMRemarks -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle" - - # Check codegen libs and add needed libraries. - case "$llvm_codegen_libs" in - *x86codegen*) - # llvm-config --libs x86codegen - llvm_extra="-lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMX86Desc -lLLVMX86Utils -lLLVMX86Info -lLLVMMCDisassembler -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBitReader -lLLVMBitstreamReader -lLLVMCore -lLLVMRemarks -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle" - ;; - *armcodegen*) - # llvm-config --libs armcodegen - llvm_extra="-lLLVMARMCodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMBitstreamReader -lLLVMCore -lLLVMRemarks -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBinaryFormat -lLLVMARMUtils -lLLVMARMInfo -lLLVMSupport -lLLVMDemangle" - ;; - *aarch64codegen*) - # llvm-config --libs aarch64codegen - llvm_extra="-lLLVMAArch64CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMBitstreamReader -lLLVMCore -lLLVMRemarks -lLLVMAArch64Desc -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBinaryFormat -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMSupport -lLLVMDemangle" - ;; - *) - llvm_extra=$llvm_codegen_libs - esac -fi - -# When cross compiling for Windows on system not capable of running Windows binaries, llvm-config.exe can't be used to query for -# LLVM parameters. In that scenario we will need to fallback to default values. -if [[ $llvm_host_win32 = 1 ]] && [[ $use_llvm_config = 0 ]]; then - # Assume we have llvm-config sitting in llvm-install-root/bin directory, get llvm-install-root directory. - with_llvm="$(dirname $llvm_config)" - with_llvm="$(dirname $with_llvm)" - llvm_config_path=$with_llvm/include/llvm/Config/llvm-config.h - - # llvm-config.exe --mono-api-version - llvm_api_version=`awk '/MONO_API_VERSION/ { print $3 }' $llvm_config_path` - - # llvm-config.exe --cflags, returned information currently not used. - llvm_config_cflags= - - # llvm-config.exe --system-libs - if [[ $llvm_api_version -lt 600 ]]; then - llvm_system="-limagehlp -lpsapi -lshell32" - else - llvm_system="-lpsapi -lshell32 -lole32 -luuid -ladvapi32" - fi - - # llvm-config.exe --libs analysis core bitwriter - if [[ $llvm_api_version -lt 600 ]]; then - llvm_core_components="-lLLVMBitWriter -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport" - else - llvm_core_components="-lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle" - fi - - # llvm-config.exe --libs mcjit jit - if [[ $llvm_api_version -lt 600 ]]; then - llvm_old_jit="-lLLVMJIT -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMExecutionEngine -lLLVMMC -lLLVMCore -lLLVMSupport" - else - # Current build of LLVM 60 for cross Windows builds doesn't support LLVM JIT. - llvm_old_jit= - fi - - # LLVM 36 doesn't support new JIT and LLVM 60 is build without LLVM JIT support for cross Windows builds. - llvm_new_jit= - - # Check codegen libs and add needed libraries. - case "$llvm_codegen_libs" in - *x86codegen*) - # llvm-config.exe --libs x86codegen - if [[ $llvm_api_version -lt 600 ]]; then - llvm_extra="-lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMObject -lLLVMBitReader -lLLVMMCDisassembler -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport" - else - llvm_extra="-lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMX86Desc -lLLVMX86Info -lLLVMMCDisassembler -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle" - fi - ;; - *armcodegen*) - # llvm-config.exe --libs armcodegen - if [[ $llvm_api_version -lt 600 ]]; then - llvm_extra="-lLLVMARMCodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMMC -lLLVMSupport" - else - llvm_extra="-lLLVMARMCodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMARMUtils -lLLVMMC -lLLVMSupport -lLLVMDemangle" - fi - ;; - *aarch64codegen*) - # llvm-config.exe --libs aarch64codegen - if [[ $llvm_api_version -lt 600 ]]; then - llvm_extra="-lLLVMAArch64CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport" - else - llvm_extra="-lLLVMAArch64CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport -lLLVMDemangle" - fi - ;; - *) - llvm_extra=$llvm_codegen_libs - esac -fi - -if [[ $llvm_config_cflags = *"stdlib=libc++"* ]]; then - llvm_libc_c="-stdlib=libc++" - # llvm_libc_link="-lc++" -else - llvm_libc_c="" - # llvm_libc_link="-lstdc++" -fi - -if [[ $llvm_host_win32 = 1 ]]; then - host_cxxflag_additions="-std=gnu++11" - host_cflag_additions="-DNDEBUG" -else - host_cxxflag_additions="-std=c++11" - host_cflag_additions="" -fi - -if [[ ! -z $llvm_extra_libs ]]; then - llvm_extra="$llvm_extra $llvm_extra_libs" -fi - -# llvm-config --clfags adds warning and optimization flags we don't want -cflags_additions="-I$with_llvm/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_API_VERSION=$llvm_api_version $llvm_libc_c $host_cflag_additions" - -cxxflag_additions="-fno-rtti -fexceptions $host_cxxflag_additions" - -ldflags="-L$with_llvm/lib" - -llvm_lib_components="$llvm_core_components $llvm_old_jit $llvm_new_jit $llvm_extra" - -echo "LLVM_CFLAGS_INTERNAL=$cflags_additions" -echo "LLVM_CXXFLAGS_INTERNAL=$cflags_additions $cxxflag_additions" -echo "LLVM_LDFLAGS_INTERNAL=$ldflags" -echo "LLVM_LIBS_INTERNAL=$llvm_lib_components $ldflags $llvm_system $llvm_libc_link" diff --git a/src/mono/m4/.gitignore b/src/mono/m4/.gitignore deleted file mode 100644 index 7a0b214d7ba491..00000000000000 --- a/src/mono/m4/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -Makefile.in -libtool.m4 -ltoptions.m4 -ltsugar.m4 -ltversion.m4 -lt~obsolete.m4 diff --git a/src/mono/m4/Makefile.am b/src/mono/m4/Makefile.am deleted file mode 100644 index 58684627ad68f8..00000000000000 --- a/src/mono/m4/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = lib-ld.m4 lib-link.m4 lib-prefix.m4 $(wildcard *.m4) diff --git a/src/mono/m4/apple-target.m4 b/src/mono/m4/apple-target.m4 deleted file mode 100644 index 3e5844e1faeb38..00000000000000 --- a/src/mono/m4/apple-target.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# Usage: -# AC_MONO_APPLE_TARGET(target-name, action-if-found, action-if-not-found) -# -# Checks whether `target-name` is defined in "TargetConditionals.h" -# -AC_DEFUN([AC_MONO_APPLE_TARGET], [ - AC_MONO_APPLE_AVAILABLE([$1], [for $1], [$1 == 1], $2, $3) -]) - - -# Usage: -# AC_MONO_APPLE_AVAILABLE(name, message, conditional, action-if-found, action-if-not-found) -# -# Checks for `conditional` using "TargetConditionals.h" and "AvailabilityMacros.h" -# -AC_DEFUN([AC_MONO_APPLE_AVAILABLE], [ - # cache the compilation check - AC_CACHE_CHECK([$2], [ac_cv_apple_available_[]$1], [ - AC_TRY_COMPILE([ - #include "TargetConditionals.h" - #include "AvailabilityMacros.h" - ],[ - #if !($3) - #error failed - #endif - ], [ - ac_cv_apple_available_[]$1=yes - ], [ - ac_cv_apple_available_[]$1=no - ]) - ]) - # keep the actions out of the cache check because they need to be always executed. - if test x$ac_cv_apple_available_[]$1 = xyes; then - $1=yes - [$4] - else - $1=no - [$5] - fi -]) diff --git a/src/mono/m4/ax_append_flag.m4 b/src/mono/m4/ax_append_flag.m4 deleted file mode 100644 index a9f384dc46806e..00000000000000 --- a/src/mono/m4/ax_append_flag.m4 +++ /dev/null @@ -1,75 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) -# -# DESCRIPTION -# -# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space -# added in between. -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains -# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly -# FLAG. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 7 - -m4_ifndef([AS_VAR_APPEND], - [m4_define([AS_VAR_APPEND], - [$1=$$1$2])]) - -AC_DEFUN([AX_APPEND_FLAG], -[dnl -AC_PREREQ(2.63)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF -AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) -AS_VAR_SET_IF(FLAGS,[ - AS_CASE([" AS_VAR_GET(FLAGS) "], - [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], - [ - AS_VAR_APPEND(FLAGS,[" $1"]) - AC_RUN_LOG([: FLAGS="$FLAGS"]) - ]) - ], - [ - AS_VAR_SET(FLAGS,[$1]) - AC_RUN_LOG([: FLAGS="$FLAGS"]) - ]) -AS_VAR_POPDEF([FLAGS])dnl -])dnl AX_APPEND_FLAG diff --git a/src/mono/m4/ax_append_link_flags.m4 b/src/mono/m4/ax_append_link_flags.m4 deleted file mode 100644 index 6f7f174560b151..00000000000000 --- a/src/mono/m4/ax_append_link_flags.m4 +++ /dev/null @@ -1,65 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# For every FLAG1, FLAG2 it is checked whether the linker works with the -# flag. If it does, the flag is added FLAGS-VARIABLE -# -# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is -# used. During the check the flag is always added to the linker's flags. -# -# If EXTRA-FLAGS is defined, it is added to the linker's default flags -# when the check is done. The check is thus made with the flags: "LDFLAGS -# EXTRA-FLAGS FLAG". This can for example be used to force the linker to -# issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG. -# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS. -# -# LICENSE -# -# Copyright (c) 2011 Maarten Bosmans -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 6 - -AC_DEFUN([AX_APPEND_LINK_FLAGS], -[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) -AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) -for flag in $1; do - AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4]) -done -])dnl AX_APPEND_LINK_FLAGS diff --git a/src/mono/m4/ax_check_compile_flag.m4 b/src/mono/m4/ax_check_compile_flag.m4 deleted file mode 100644 index f23196ced36694..00000000000000 --- a/src/mono/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 5 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.63)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/src/mono/m4/ax_check_link_flag.m4 b/src/mono/m4/ax_check_link_flag.m4 deleted file mode 100644 index 24e9e94fcf862a..00000000000000 --- a/src/mono/m4/ax_check_link_flag.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the linker or gives an error. -# (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the linker's default flags -# when the check is done. The check is thus made with the flags: "LDFLAGS -# EXTRA-FLAGS FLAG". This can for example be used to force the linker to -# issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_LINK_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 5 - -AC_DEFUN([AX_CHECK_LINK_FLAG], -[AC_PREREQ(2.63)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl -AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $4 $1" - AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - LDFLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_LINK_FLAGS diff --git a/src/mono/m4/ax_require_defined.m4 b/src/mono/m4/ax_require_defined.m4 deleted file mode 100644 index 17c3eab7dafde6..00000000000000 --- a/src/mono/m4/ax_require_defined.m4 +++ /dev/null @@ -1,37 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_REQUIRE_DEFINED(MACRO) -# -# DESCRIPTION -# -# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have -# been defined and thus are available for use. This avoids random issues -# where a macro isn't expanded. Instead the configure script emits a -# non-fatal: -# -# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found -# -# It's like AC_REQUIRE except it doesn't expand the required macro. -# -# Here's an example: -# -# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) -# -# LICENSE -# -# Copyright (c) 2014 Mike Frysinger -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 2 - -AC_DEFUN([AX_REQUIRE_DEFINED], [dnl - m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) -])dnl AX_REQUIRE_DEFINED diff --git a/src/mono/m4/lib-ld.m4 b/src/mono/m4/lib-ld.m4 deleted file mode 100644 index ebb30528bd5abf..00000000000000 --- a/src/mono/m4/lib-ld.m4 +++ /dev/null @@ -1,110 +0,0 @@ -# lib-ld.m4 serial 4 (gettext-0.18) -dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Subroutines of libtool.m4, -dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision -dnl with libtool.m4. - -dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. -AC_DEFUN([AC_LIB_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]* | [A-Za-z]:[\\/]*)] - [re_direlt='/[^/][^/]*/\.\./'] - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL([acl_cv_path_LD], -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; - esac - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT([$LD]) -else - AC_MSG_RESULT([no]) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_LIB_PROG_LD_GNU -]) diff --git a/src/mono/m4/lib-link.m4 b/src/mono/m4/lib-link.m4 deleted file mode 100644 index c73bd8e3a478ce..00000000000000 --- a/src/mono/m4/lib-link.m4 +++ /dev/null @@ -1,774 +0,0 @@ -# lib-link.m4 serial 21 (gettext-0.18) -dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_PREREQ([2.54]) - -dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and -dnl augments the CPPFLAGS variable. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[translit([$1],[./-], [___])]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - ac_cv_lib[]Name[]_libs="$LIB[]NAME" - ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" - ac_cv_lib[]Name[]_cppflags="$INC[]NAME" - ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" - ]) - LIB[]NAME="$ac_cv_lib[]Name[]_libs" - LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" - INC[]NAME="$ac_cv_lib[]Name[]_cppflags" - LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the - dnl results of this search when this library appears as a dependency. - HAVE_LIB[]NAME=yes - popdef([NAME]) - popdef([Name]) -]) - -dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) -dnl searches for libname and the libraries corresponding to explicit and -dnl implicit dependencies, together with the specified include files and -dnl the ability to compile and link the specified testcode. The missing-message -dnl defaults to 'no' and may contain additional hints for the user. -dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} -dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and -dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs -dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[translit([$1],[./-], [___])]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - - dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - - dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, - dnl because if the user has installed lib[]Name and not disabled its use - dnl via --without-lib[]Name-prefix, he wants to use it. - ac_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - - AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ - ac_save_LIBS="$LIBS" - dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, - dnl because these -l options might require -L options that are present in - dnl LIBS. -l options benefit only from the -L options listed before it. - dnl Otherwise, add it to the front of LIBS, because it may be a static - dnl library that depends on another static library that is present in LIBS. - dnl Static libraries benefit only from the static libraries listed after - dnl it. - case " $LIB[]NAME" in - *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; - *) LIBS="$LIB[]NAME $LIBS" ;; - esac - AC_TRY_LINK([$3], [$4], - [ac_cv_lib[]Name=yes], - [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) - LIBS="$ac_save_LIBS" - ]) - if test "$ac_cv_lib[]Name" = yes; then - HAVE_LIB[]NAME=yes - AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) - AC_MSG_CHECKING([how to link with lib[]$1]) - AC_MSG_RESULT([$LIB[]NAME]) - else - HAVE_LIB[]NAME=no - dnl If $LIB[]NAME didn't lead to a usable library, we don't need - dnl $INC[]NAME either. - CPPFLAGS="$ac_save_CPPFLAGS" - LIB[]NAME= - LTLIB[]NAME= - LIB[]NAME[]_PREFIX= - fi - AC_SUBST([HAVE_LIB]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - popdef([NAME]) - popdef([Name]) -]) - -dnl Determine the platform dependent parameters needed to use rpath: -dnl acl_libext, -dnl acl_shlibext, -dnl acl_hardcode_libdir_flag_spec, -dnl acl_hardcode_libdir_separator, -dnl acl_hardcode_direct, -dnl acl_hardcode_minus_L. -AC_DEFUN([AC_LIB_RPATH], -[ - dnl Tell automake >= 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) - AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS - AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld - AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host - AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir - AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - ]) - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - dnl Determine whether the user wants rpath handling at all. - AC_ARG_ENABLE([rpath], - [ --disable-rpath do not hardcode runtime library paths], - :, enable_rpath=yes) -]) - -dnl AC_LIB_FROMPACKAGE(name, package) -dnl declares that libname comes from the given package. The configure file -dnl will then not have a --with-libname-prefix option but a -dnl --with-package-prefix option. Several libraries can come from the same -dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar -dnl macro call that searches for libname. -AC_DEFUN([AC_LIB_FROMPACKAGE], -[ - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - define([acl_frompackage_]NAME, [$2]) - popdef([NAME]) - pushdef([PACK],[$2]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - define([acl_libsinpackage_]PACKUP, - m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) - popdef([PACKUP]) - popdef([PACK]) -]) - -dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. -dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found -dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS_BODY], -[ - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) - dnl Autoconf >= 2.61 supports dots in --with options. - pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_ARG_WITH(P_A_C_K[-prefix], -[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi -]) - dnl Search the library and its dependencies in $additional_libdir and - dnl $LDFLAGS. Using breadth-first-seach. - LIB[]NAME= - LTLIB[]NAME= - INC[]NAME= - LIB[]NAME[]_PREFIX= - dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been - dnl computed. So it has to be reset here. - HAVE_LIB[]NAME= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='$1 $2' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - dnl See if it was already located by an earlier AC_LIB_LINKFLAGS - dnl or AC_LIB_HAVE_LINKFLAGS call. - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" - else - dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined - dnl that this library doesn't exist. So just drop it. - : - fi - else - dnl Search the library lib$name in $additional_libdir and $LDFLAGS - dnl and the already constructed $LIBNAME/$LTLIBNAME. - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - dnl The same code as in the loop below: - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - dnl Found the library. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - dnl Linking with a shared library. We attempt to hardcode its - dnl directory into the executable's runpath, unless it's the - dnl standard /usr/lib. - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - dnl No hardcoding is needed. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - dnl The hardcoding into $LIBNAME is system dependent. - if test "$acl_hardcode_direct" = yes; then - dnl Using DIR/libNAME.so during linking hardcodes DIR into the - dnl resulting binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - dnl Rely on "-L$found_dir". - dnl But don't add it if it's already contained in the LDFLAGS - dnl or the already constructed $LIBNAME - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH - dnl here, because this doesn't fit in flags passed to the - dnl compiler. So give up. No hardcoding. This affects only - dnl very old systems. - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - dnl Linking with a static library. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" - else - dnl We shouldn't come here, but anyway it's good to have a - dnl fallback. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" - fi - fi - dnl Assume the include files are nearby. - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = '$1'; then - LIB[]NAME[]_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = '$1'; then - LIB[]NAME[]_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - dnl Potentially add $additional_includedir to $INCNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's /usr/local/include and we are using GCC on Linux, - dnl 3. if it's already present in $CPPFLAGS or the already - dnl constructed $INCNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INC[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $INCNAME. - INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - dnl Look for dependencies. - if test -n "$found_la"; then - dnl Read the .la file. It defines the variables - dnl dlname, library_names, old_library, dependency_libs, current, - dnl age, revision, installed, dlopen, dlpreopen, libdir. - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - dnl We use only dependency_libs. - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's /usr/local/lib and we are using GCC on Linux, - dnl 3. if it's already present in $LDFLAGS or the already - dnl constructed $LIBNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - dnl Handle this in the next round. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - dnl Handle this in the next round. Throw away the .la's - dnl directory; it is already contained in a preceding -L - dnl option. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - dnl Most likely an immediate library name. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" - ;; - esac - done - fi - else - dnl Didn't find the library; assume it is in the system directories - dnl known to the linker and runtime loader. (All the system - dnl directories known to the linker should also be known to the - dnl runtime loader, otherwise the system is severely misconfigured.) - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user must - dnl pass all path elements in one option. We can arrange that for a - dnl single library, but not when more than one $LIBNAMEs are used. - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - else - dnl The -rpath options are cumulative. - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - dnl When using libtool, the option that works for both libraries and - dnl executables is -R. The -R options are cumulative. - for found_dir in $ltrpathdirs; do - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" - done - fi - popdef([P_A_C_K]) - popdef([PACKLIBS]) - popdef([PACKUP]) - popdef([PACK]) - popdef([NAME]) -]) - -dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, -dnl unless already present in VAR. -dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes -dnl contains two or three consecutive elements that belong together. -AC_DEFUN([AC_LIB_APPENDTOVAR], -[ - for element in [$2]; do - haveit= - for x in $[$1]; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - [$1]="${[$1]}${[$1]:+ }$element" - fi - done -]) - -dnl For those cases where a variable contains several -L and -l options -dnl referring to unknown libraries and directories, this macro determines the -dnl necessary additional linker options for the runtime path. -dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) -dnl sets LDADDVAR to linker options needed together with LIBSVALUE. -dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, -dnl otherwise linking without libtool is assumed. -AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], -[ - AC_REQUIRE([AC_LIB_RPATH]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - $1= - if test "$enable_rpath" != no; then - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode directories into the resulting - dnl binary. - rpathdirs= - next= - for opt in $2; do - if test -n "$next"; then - dir="$next" - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then - rpathdirs="$rpathdirs $dir" - fi - next= - else - case $opt in - -L) next=yes ;; - -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then - rpathdirs="$rpathdirs $dir" - fi - next= ;; - *) next= ;; - esac - fi - done - if test "X$rpathdirs" != "X"; then - if test -n ""$3""; then - dnl libtool is used for linking. Use -R options. - for dir in $rpathdirs; do - $1="${$1}${$1:+ }-R$dir" - done - else - dnl The linker is used for linking directly. - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user - dnl must pass all path elements in one option. - alldirs= - for dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="$flag" - else - dnl The -rpath options are cumulative. - for dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="${$1}${$1:+ }$flag" - done - fi - fi - fi - fi - fi - AC_SUBST([$1]) -]) diff --git a/src/mono/m4/lib-prefix.m4 b/src/mono/m4/lib-prefix.m4 deleted file mode 100644 index 1601ceaefd3c2b..00000000000000 --- a/src/mono/m4/lib-prefix.m4 +++ /dev/null @@ -1,224 +0,0 @@ -# lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -dnl require excessive bracketing. -ifdef([AC_HELP_STRING], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) - -dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed -dnl to access previously installed libraries. The basic assumption is that -dnl a user will want packages to use other packages he previously installed -dnl with the same --prefix option. -dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate -dnl libraries, but is otherwise very convenient. -AC_DEFUN([AC_LIB_PREFIX], -[ - AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi -]) - if test $use_additional = yes; then - dnl Potentially add $additional_includedir to $CPPFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's already present in $CPPFLAGS, - dnl 3. if it's /usr/local/include and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - for x in $CPPFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $CPPFLAGS. - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" - fi - fi - fi - fi - dnl Potentially add $additional_libdir to $LDFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's already present in $LDFLAGS, - dnl 3. if it's /usr/local/lib and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - for x in $LDFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LDFLAGS. - LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" - fi - fi - fi - fi - fi -]) - -dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, -dnl acl_final_exec_prefix, containing the values to which $prefix and -dnl $exec_prefix will expand at the end of the configure script. -AC_DEFUN([AC_LIB_PREPARE_PREFIX], -[ - dnl Unfortunately, prefix and exec_prefix get only finally determined - dnl at the end of configure. - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the -dnl variables prefix and exec_prefix bound to the values they will have -dnl at the end of the configure script. -AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], -[ - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - $1 - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_PREPARE_MULTILIB creates -dnl - a variable acl_libdirstem, containing the basename of the libdir, either -dnl "lib" or "lib64" or "lib/64", -dnl - a variable acl_libdirstem2, as a secondary possible value for -dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or -dnl "lib/amd64". -AC_DEFUN([AC_LIB_PREPARE_MULTILIB], -[ - dnl There is no formal standard regarding lib and lib64. - dnl On glibc systems, the current practice is that on a system supporting - dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine - dnl the compiler's default mode by looking at the compiler's library search - dnl path. If at least one of its elements ends in /lib64 or points to a - dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. - dnl Otherwise we use the default, namely "lib". - dnl On Solaris systems, the current practice is that on a system supporting - dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or - dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. - AC_REQUIRE([AC_CANONICAL_HOST]) - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment - dnl . - dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." - dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the - dnl symlink is missing, so we set acl_libdirstem2 too. - AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], - [AC_EGREP_CPP([sixtyfour bits], [ -#ifdef _LP64 -sixtyfour bits -#endif - ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) - ]) - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" -]) diff --git a/src/mono/m4/mono-output.m4 b/src/mono/m4/mono-output.m4 deleted file mode 100644 index 40d72ea7d6d144..00000000000000 --- a/src/mono/m4/mono-output.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# Usage: -# AC_MONO_OUTPUT() -# -# Generates the output files used by Mono. -# -AC_DEFUN([AC_MONO_OUTPUT], [ - - AC_OUTPUT([ - Makefile - llvm/Makefile - mono/Makefile - mono/utils/Makefile - mono/metadata/Makefile - mono/zlib/Makefile - mono/arch/Makefile - mono/arch/x86/Makefile - mono/arch/amd64/Makefile - mono/arch/ppc/Makefile - mono/arch/sparc/Makefile - mono/arch/s390x/Makefile - mono/arch/arm/Makefile - mono/arch/arm64/Makefile - mono/arch/mips/Makefile - mono/arch/riscv/Makefile - mono/sgen/Makefile - mono/mini/Makefile - mono/profiler/Makefile - mono/eglib/Makefile - mono/eglib/eglib-config.h - mono/eglib/test/Makefile - ]) -]) diff --git a/src/mono/m4/nls.m4 b/src/mono/m4/nls.m4 deleted file mode 100644 index 93e89ee4632b0b..00000000000000 --- a/src/mono/m4/nls.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ([2.50]) - -AC_DEFUN([AM_NLS], -[ - AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE([nls], - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=profile_default) - AC_MSG_RESULT([$USE_NLS]) - AC_SUBST([USE_NLS]) -]) diff --git a/src/mono/m4/po.m4 b/src/mono/m4/po.m4 deleted file mode 100644 index 2c9532f0950968..00000000000000 --- a/src/mono/m4/po.m4 +++ /dev/null @@ -1,449 +0,0 @@ -# po.m4 serial 17 (gettext-0.18) -dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ([2.50]) - -dnl Checks for all prerequisites of the po subdirectory. -AC_DEFUN([AM_PO_SUBDIRS], -[ - AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AC_PROG_MKDIR_P])dnl - AC_REQUIRE([AM_NLS])dnl - - dnl Release version of the gettext macros. This is used to ensure that - dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) - - dnl Perform the following tests also if --disable-nls has been given, - dnl because they are needed for "make dist" to work. - - dnl Search for GNU msgfmt in the PATH. - dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. - dnl The second test excludes FreeBSD msgfmt. - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) - - dnl Test whether it is GNU msgfmt >= 0.15. -changequote(,)dnl - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([MSGFMT_015]) -changequote(,)dnl - case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; - *) GMSGFMT_015=$GMSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([GMSGFMT_015]) - - dnl Search for GNU xgettext 0.12 or newer in the PATH. - dnl The first test excludes Solaris xgettext and early GNU xgettext versions. - dnl The second test excludes FreeBSD xgettext. - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - - dnl Test whether it is GNU xgettext >= 0.15. -changequote(,)dnl - case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; - *) XGETTEXT_015=$XGETTEXT ;; - esac -changequote([,])dnl - AC_SUBST([XGETTEXT_015]) - - dnl Search for GNU msgmerge 0.11 or newer in the PATH. - AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, - [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - - dnl Installation directories. - dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we - dnl have to define it here, so that it can be used in po/Makefile. - test -n "$localedir" || localedir='${datadir}/locale' - AC_SUBST([localedir]) - - dnl Support for AM_XGETTEXT_OPTION. - test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= - AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) - - AC_CONFIG_COMMANDS([po-directories], [[ - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done]], - [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - ]) -]) - -dnl Postprocesses a Makefile in a directory containing PO files. -AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], -[ - # When this code is run, in config.status, two variables have already been - # set: - # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, - # - LINGUAS is the value of the environment variable LINGUAS at configure - # time. - -changequote(,)dnl - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - # Find a way to echo strings without interpreting backslash. - if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='echo' - else - if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='printf %s\n' - else - echo_func () { - cat < "$ac_file.tmp" - if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - cat >> "$ac_file.tmp" < /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. - -AC_PREREQ([2.50]) - -# Search path for a program which passes the given test. - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN([AM_PATH_PROG_WITH_TEST], -[ -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL([ac_cv_path_$1], -[case "[$]$1" in - [[\\/]]* | ?:[[\\/]]*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in ifelse([$5], , $PATH, [$5]); do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then - AC_MSG_RESULT([$][$1]) -else - AC_MSG_RESULT([no]) -fi -AC_SUBST([$1])dnl -]) diff --git a/src/mono/mono/.editorconfig b/src/mono/mono/.editorconfig index 6cf31b1fd23254..d3d491d0bc74f2 100644 --- a/src/mono/mono/.editorconfig +++ b/src/mono/mono/.editorconfig @@ -14,8 +14,3 @@ curly_bracket_next_line = false spaces_around_operators = true spaces_around_brackets = outside -[Makefile*] -indent_style = tab - -[*.mk] -indent_style = tab diff --git a/src/mono/mono/.gitignore b/src/mono/mono/.gitignore index f7903956ce7635..7f77cf509ab7f1 100644 --- a/src/mono/mono/.gitignore +++ b/src/mono/mono/.gitignore @@ -1,6 +1,3 @@ -/ -/Makefile -/Makefile.in /semantic.cache /TAGS /.metadata diff --git a/src/mono/mono/Makefile.am b/src/mono/mono/Makefile.am deleted file mode 100644 index 7e3be9d7047505..00000000000000 --- a/src/mono/mono/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -if SUPPORT_SGEN -sgen_dirs = sgen -endif - -if BTLS -btls_dirs = btls -endif - -if MONO_NATIVE -native_dirs = native -endif - -if ENABLE_NETCORE -btls_dirs = -managed_unit_test_dirs = -native_unit_test_dirs = -culture_dirs = -else -managed_unit_test_dirs = tests -native_unit_test_dirs = unit-tests -culture_dirs = culture -endif - -if ENABLE_NETCORE -SUBDIRS = eglib arch utils sgen zlib metadata mini profiler $(native_unit_test_dirs) -else - -if CROSS_COMPILING -SUBDIRS = $(btls_dirs) $(culture_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis profiler $(native_dirs) -else -if INSTALL_MONOTOUCH -SUBDIRS = $(btls_dirs) $(culture_dirs) eglib arch utils zlib $(sgen_dirs) metadata mini profiler $(native_dirs) -else -SUBDIRS = $(btls_dirs) $(culture_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler $(native_dirs) -endif -endif -endif - -DIST_SUBDIRS = btls $(culture_dirs) native eglib arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler diff --git a/src/mono/mono/arch/.gitignore b/src/mono/mono/arch/.gitignore index 16c98405570c40..50c176fea584d6 100644 --- a/src/mono/mono/arch/.gitignore +++ b/src/mono/mono/arch/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.deps /.libs /*.la diff --git a/src/mono/mono/arch/Makefile.am b/src/mono/mono/arch/Makefile.am deleted file mode 100644 index 8d4b2883716e68..00000000000000 --- a/src/mono/mono/arch/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -DIST_SUBDIRS = x86 ppc sparc arm arm64 s390x amd64 mips riscv - -AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) - -if ARM -# arm needs to build some stuff even in JIT mode -SUBDIRS = arm -endif - -if RISCV -SUBDIRS = riscv -endif diff --git a/src/mono/mono/arch/amd64/.gitignore b/src/mono/mono/arch/amd64/.gitignore index 6930f61fc444df..a4f894eb66d596 100644 --- a/src/mono/mono/arch/amd64/.gitignore +++ b/src/mono/mono/arch/amd64/.gitignore @@ -1,4 +1,2 @@ -/Makefile.in -/Makefile /.deps /.libs diff --git a/src/mono/mono/arch/amd64/Makefile.am b/src/mono/mono/arch/amd64/Makefile.am deleted file mode 100644 index e59611801c5007..00000000000000 --- a/src/mono/mono/arch/amd64/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -EXTRA_DIST = amd64-codegen.h - diff --git a/src/mono/mono/arch/arm/.gitignore b/src/mono/mono/arch/arm/.gitignore index 7040246bec9fcd..28d5fc8cf4f1a4 100644 --- a/src/mono/mono/arch/arm/.gitignore +++ b/src/mono/mono/arch/arm/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.deps /.libs /*.o diff --git a/src/mono/mono/arch/arm/Makefile.am b/src/mono/mono/arch/arm/Makefile.am deleted file mode 100644 index d5c244cacbdaf7..00000000000000 --- a/src/mono/mono/arch/arm/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) - -arm_dpimacros.h: dpiops.sh mov_macros.th dpi_macros.th cmp_macros.th - (cd $(srcdir); bash ./dpiops.sh) > $@t - mv $@t $@ - -arm_vfpmacros.h: vfpops.sh vfpm_macros.th vfp_macros.th - (cd $(srcdir); bash ./vfpops.sh) > $@t - mv $@t $@ - -gen: arm_dpimacros.h arm_vfpmacros.h - -EXTRA_DIST = arm-codegen.h dpiops.sh mov_macros.th dpi_macros.th cmp_macros.th \ - vfpm_macros.th vfp_macros.th arm-vfp-codegen.h vfpops.sh \ - arm_dpimacros.h arm_vfpmacros.h - - diff --git a/src/mono/mono/arch/arm64/.gitignore b/src/mono/mono/arch/arm64/.gitignore index 13efac709a53d3..b2e060876b97a3 100644 --- a/src/mono/mono/arch/arm64/.gitignore +++ b/src/mono/mono/arch/arm64/.gitignore @@ -1,6 +1,4 @@ / -/Makefile -/Makefile.in /*.o /*.lo /.deps diff --git a/src/mono/mono/arch/arm64/Makefile.am b/src/mono/mono/arch/arm64/Makefile.am deleted file mode 100644 index e735d0ed69aa1d..00000000000000 --- a/src/mono/mono/arch/arm64/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -EXTRA_DIST = arm64-codegen.h codegen-test.c - -test-codegen: - $(CC) $(CFLAGS) -I../../.. -I../../eglib/ ../../eglib/.libs/libeglib.a -o codegen-test codegen-test.c - ./codegen-test > tmp.s - $(CC) $(CFLAGS) -c -o tmp.o tmp.s - objdump -d --triple=arm64e tmp.o diff --git a/src/mono/mono/arch/mips/.gitignore b/src/mono/mono/arch/mips/.gitignore index 13efac709a53d3..b2e060876b97a3 100644 --- a/src/mono/mono/arch/mips/.gitignore +++ b/src/mono/mono/arch/mips/.gitignore @@ -1,6 +1,4 @@ / -/Makefile -/Makefile.in /*.o /*.lo /.deps diff --git a/src/mono/mono/arch/mips/Makefile.am b/src/mono/mono/arch/mips/Makefile.am deleted file mode 100644 index 6c217265f16475..00000000000000 --- a/src/mono/mono/arch/mips/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) - -noinst_LTLIBRARIES = libmonoarch-mips.la - -libmonoarch_mips_la_SOURCES = mips-codegen.h - diff --git a/src/mono/mono/arch/ppc/.gitignore b/src/mono/mono/arch/ppc/.gitignore index c577ff628bb7af..04b4e1edf5da7e 100644 --- a/src/mono/mono/arch/ppc/.gitignore +++ b/src/mono/mono/arch/ppc/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.libs /.deps /*.la diff --git a/src/mono/mono/arch/ppc/Makefile.am b/src/mono/mono/arch/ppc/Makefile.am deleted file mode 100644 index ddd90f9a214b72..00000000000000 --- a/src/mono/mono/arch/ppc/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -EXTRA_DIST = ppc-codegen.h \ No newline at end of file diff --git a/src/mono/mono/arch/riscv/.gitignore b/src/mono/mono/arch/riscv/.gitignore index f1e931fc7708bf..e314ec5e5fceab 100644 --- a/src/mono/mono/arch/riscv/.gitignore +++ b/src/mono/mono/arch/riscv/.gitignore @@ -1,4 +1,3 @@ -/Makefile /riscv-codegen-test /riscv-codegen /riscv-codegen.elf diff --git a/src/mono/mono/arch/riscv/Makefile.am b/src/mono/mono/arch/riscv/Makefile.am deleted file mode 100644 index 16505ff8e5a18f..00000000000000 --- a/src/mono/mono/arch/riscv/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -AM_CPPFLAGS = $(GLIB_CFLAGS) - -EXTRA_DIST = riscv-codegen.h - -bin_PROGRAMS = riscv-codegen-test - -riscv_codegen_test_SOURCES = riscv-codegen-test.c - -if RISCV64 -bits = 64 -else -bits = 32 -endif - -check-local: riscv-codegen-test - ./riscv-codegen-test > riscv-codegen.s - $(AS) riscv-codegen.s -o riscv-codegen.elf - $(OBJDUMP) -D -M numeric,no-aliases riscv-codegen.elf > riscv-codegen.res - diff -u riscv-codegen.exp$(bits) riscv-codegen.res diff --git a/src/mono/mono/arch/s390x/.gitignore b/src/mono/mono/arch/s390x/.gitignore index 341daec37efc6e..7a28a933e221ea 100644 --- a/src/mono/mono/arch/s390x/.gitignore +++ b/src/mono/mono/arch/s390x/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.libs /.deps /*.la diff --git a/src/mono/mono/arch/s390x/Makefile.am b/src/mono/mono/arch/s390x/Makefile.am deleted file mode 100644 index b28f582fcc7815..00000000000000 --- a/src/mono/mono/arch/s390x/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) - -noinst_LTLIBRARIES = libmonoarch-s390x.la - -libmonoarch_s390x_la_SOURCES = tramp.c s390x-codegen.h - diff --git a/src/mono/mono/arch/sparc/.gitignore b/src/mono/mono/arch/sparc/.gitignore index dc1ebd209ac431..e49a737d5cba95 100644 --- a/src/mono/mono/arch/sparc/.gitignore +++ b/src/mono/mono/arch/sparc/.gitignore @@ -1,3 +1 @@ -/Makefile -/Makefile.in /.deps diff --git a/src/mono/mono/arch/sparc/Makefile.am b/src/mono/mono/arch/sparc/Makefile.am deleted file mode 100644 index 38b962b878b9b3..00000000000000 --- a/src/mono/mono/arch/sparc/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -EXTRA_DIST = sparc-codegen.h - diff --git a/src/mono/mono/arch/x86/.gitignore b/src/mono/mono/arch/x86/.gitignore index 341daec37efc6e..7a28a933e221ea 100644 --- a/src/mono/mono/arch/x86/.gitignore +++ b/src/mono/mono/arch/x86/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.libs /.deps /*.la diff --git a/src/mono/mono/arch/x86/Makefile.am b/src/mono/mono/arch/x86/Makefile.am deleted file mode 100644 index f7bf4484b888f1..00000000000000 --- a/src/mono/mono/arch/x86/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -EXTRA_DIST = x86-codegen.h \ No newline at end of file diff --git a/src/mono/mono/benchmark/Makefile b/src/mono/mono/benchmark/Makefile deleted file mode 100644 index b75b2254a83a16..00000000000000 --- a/src/mono/mono/benchmark/Makefile +++ /dev/null @@ -1 +0,0 @@ -# empty placeholder for netcore build diff --git a/src/mono/mono/btls/Makefile b/src/mono/mono/btls/Makefile deleted file mode 100644 index b75b2254a83a16..00000000000000 --- a/src/mono/mono/btls/Makefile +++ /dev/null @@ -1 +0,0 @@ -# empty placeholder for netcore build diff --git a/src/mono/mono/cil/.gitignore b/src/mono/mono/cil/.gitignore deleted file mode 100644 index b336cc7cec946a..00000000000000 --- a/src/mono/mono/cil/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/src/mono/mono/cil/Makefile.am b/src/mono/mono/cil/Makefile.am deleted file mode 100644 index 7888a649df3a2f..00000000000000 --- a/src/mono/mono/cil/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -# opcode.def is not built by default -- based on timestamps. -# CI does not have the dependencies installed (perl, XML::Parser). -# The derived file is checked in. -opcode.def: make-opcodes-def.pl cil-opcodes.xml - perl $(srcdir)/make-opcodes-def.pl $(srcdir)/cil-opcodes.xml $@.tmp - mv $@.tmp $@ - -defdir = $(includedir)/mono-$(API_VER)/mono/cil -def_DATA = opcode.def - -xmldir = $(datadir)/mono-$(API_VER)/mono/cil -xml_DATA = cil-opcodes.xml - -EXTRA_DIST=tables.def opcode.def make-opcodes-def.pl make-opcode-def.xsl $(xml_DATA) $(def_DATA) diff --git a/src/mono/mono/culture/Makefile b/src/mono/mono/culture/Makefile deleted file mode 100644 index b75b2254a83a16..00000000000000 --- a/src/mono/mono/culture/Makefile +++ /dev/null @@ -1 +0,0 @@ -# empty placeholder for netcore build diff --git a/src/mono/mono/dis/Makefile b/src/mono/mono/dis/Makefile deleted file mode 100644 index b75b2254a83a16..00000000000000 --- a/src/mono/mono/dis/Makefile +++ /dev/null @@ -1 +0,0 @@ -# empty placeholder for netcore build diff --git a/src/mono/mono/eglib/.gitignore b/src/mono/mono/eglib/.gitignore index 6635df1a9f5947..4ea60f0fc7be02 100644 --- a/src/mono/mono/eglib/.gitignore +++ b/src/mono/mono/eglib/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.libs /.deps /*.lo diff --git a/src/mono/mono/eglib/Makefile.am b/src/mono/mono/eglib/Makefile.am deleted file mode 100644 index fac81325d9f648..00000000000000 --- a/src/mono/mono/eglib/Makefile.am +++ /dev/null @@ -1,101 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -if !ENABLE_MSVC_ONLY - -SUBDIRS = . test - -noinst_LTLIBRARIES = libeglib.la - -AM_CFLAGS = $(SHARED_CFLAGS) - -win_files = \ - eglib-config.hw \ - gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \ - gmodule-win32.c gtimer-win32.c gunicode-win32.c - -unix_files = \ - gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c \ - gmodule-unix.c gtimer-unix.c gmodule-aix.c \ - gspawn.c - -if HOST_WIN32 -os_files = $(win_files) -else -os_files = $(unix_files) -endif - -libeglib_la_SOURCES = \ - eglib-remap.h \ - sort.frag.h \ - glib.h \ - garray.c \ - gbytearray.c \ - gerror.c \ - ghashtable.c \ - giconv.c \ - gmem.c \ - gmodule.h \ - goutput.c \ - gqsort.c \ - gstr.c \ - gslist.c \ - gstring.c \ - gptrarray.c \ - glist.c \ - gqueue.c \ - gpath.c \ - gshell.c \ - gfile.c \ - gfile-posix.c \ - gpattern.c \ - gmarkup.c \ - gutf8.c \ - gunicode.c \ - unicode-data.h \ - $(os_files) - -endif # !ENABLE_MSVC_ONLY - -CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) @CXX_ADD_CFLAGS@ - -if !ENABLE_MSVC_ONLY - -eglibdir=$(datadir)/mono-$(API_VER)/mono/eglib -eglib_DATA = eglib-config.h - -libeglib_la_CFLAGS = -g -Wall -D_GNU_SOURCE - -if !HOST_WIN32 -libeglib_la_CFLAGS += -D_FORTIFY_SOURCE=2 -endif - -AM_CPPFLAGS = -I$(srcdir) - -if HOST_ANDROID -libeglib_la_LIBADD = -lm -llog -else -if HOST_WIN32 -libeglib_la_LIBADD = -lm -lpsapi $(LTLIBICONV) -else -libeglib_la_LIBADD = -lm $(LTLIBICONV) -endif -endif - -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files) - -endif # !ENABLE_MSVC_ONLY - -if ENABLE_MSVC_ONLY - -all-local: - - make -C $(top_srcdir)/msvc eglib - -clean-local: - - make -C $(top_srcdir)/msvc clean-eglib - - -endif # ENABLE_MSVC_ONLY diff --git a/src/mono/mono/eglib/test/.gitignore b/src/mono/mono/eglib/test/.gitignore index c5d4b231c63826..fcd22e529f4b7e 100644 --- a/src/mono/mono/eglib/test/.gitignore +++ b/src/mono/mono/eglib/test/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.libs /.deps /*.lo diff --git a/src/mono/mono/eglib/test/Makefile.am b/src/mono/mono/eglib/test/Makefile.am deleted file mode 100644 index b7dda5f54fac86..00000000000000 --- a/src/mono/mono/eglib/test/Makefile.am +++ /dev/null @@ -1,71 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -EXTRA_DIST = UTF-8.txt UTF-16BE.txt UTF-16LE.txt UTF-32BE.txt UTF-32LE.txt test-eglib.exp - -SOURCES = \ - enum.cpp \ - test.c \ - test.h \ - tests.h \ - driver.c \ - hashtable.c \ - string-util.c \ - string.c \ - slist.c \ - sizes.c \ - ptrarray.c \ - list.c \ - array.c \ - fake.c \ - path.c \ - queue.c \ - shell.c \ - spawn.c \ - timer.c \ - file.c \ - pattern.c \ - dir.c \ - markup.c \ - unicode.c \ - utf8.c \ - endian.c \ - module.c \ - memory.c - -test_eglib_SOURCES = $(SOURCES) - -GLIB_TEST_FLAGS_COMMON = -Wall -DEGLIB_TESTS=1 -I$(srcdir)/.. -I.. -DDRIVER_NAME=\"EGlib\" -if !HOST_WIN32 -GLIB_TEST_FLAGS_COMMON += -D_FORTIFY_SOURCE=2 -endif -CFLAGS += $(GLIB_TEST_FLAGS_COMMON) -CXXFLAGS += $(GLIB_TEST_FLAGS_COMMON) @CXXFLAGS_COMMON@ -if HOST_AIX -# This export file is required so test symbols are visible. -LDFLAGS += -Wl,-bE:test-eglib.exp -endif - -test_eglib_LDADD = ../libeglib.la $(LTLIBICONV) -assertf_LDADD = ../libeglib.la $(LTLIBICONV) - -abs_srcdir = $(abspath $(srcdir)) - -if DISABLE_EXECUTABLES -run-eglib: -else -# FIXME: Various unit tests are broken on Win32, see https://github.com/mono/mono/issues/16576 -if HOST_WIN32 -run-eglib: -else -run-eglib: - srcdir="$(abs_srcdir)" ./test-eglib - -noinst_PROGRAMS = test-eglib assertf -endif # !HOST_WIN32 -endif # DISABLE_EXECUTABLES - -run-both: run-eglib - -check-local: run-both - -MAINTAINERCLEANFILES = Makefile.in diff --git a/src/mono/mono/metadata/.gitignore b/src/mono/mono/metadata/.gitignore index a326d895150473..050a7adaf3da63 100644 --- a/src/mono/mono/metadata/.gitignore +++ b/src/mono/mono/metadata/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /monosn /monodiet /.libs diff --git a/src/mono/mono/metadata/Makefile.am b/src/mono/mono/metadata/Makefile.am deleted file mode 100644 index 45392bbed42a66..00000000000000 --- a/src/mono/mono/metadata/Makefile.am +++ /dev/null @@ -1,526 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -if !ENABLE_MSVC_ONLY - -if HOST_WIN32 -win32_sources = \ - console-win32.c \ - w32file-win32.c \ - icall-windows.c \ - marshal-windows.c \ - mono-security-windows.c \ - w32mutex-win32.c \ - w32semaphore-win32.c \ - w32event-win32.c \ - w32process-win32.c \ - w32socket-win32.c \ - w32error-win32.c - -platform_sources = $(win32_sources) - -# Use -m here. This will use / as directory separator (C:/WINNT). -# The files that use MONO_ASSEMBLIES and/or MONO_CFG_DIR replace the -# / by \ if running under WIN32. -if CROSS_COMPILING -assembliesdir = ${libdir} -confdir = ${sysconfdir} -else -assembliesdir = `cygpath -m "${libdir}"` -confdir = `cygpath -m "${sysconfdir}"` -endif -export HOST_CC -# The mingw math.h has "extern inline" functions that dont appear in libs, so -# optimisation is required to actually inline them -AM_CFLAGS = -O -else - -assembliesdir = $(exec_prefix)/lib -confdir = $(sysconfdir) -unix_sources = \ - console-unix.c \ - w32mutex-unix.c \ - w32semaphore-unix.c \ - w32event-unix.c \ - w32process-unix.c \ - w32process-unix-internals.h \ - w32process-unix-osx.c \ - w32process-unix-bsd.c \ - w32process-unix-haiku.c \ - w32process-unix-default.c \ - w32socket-unix.c \ - w32file-unix.c \ - w32file-unix-glob.c \ - w32file-unix-glob.h \ - w32error-unix.c - -platform_sources = $(unix_sources) -endif - -glib_libs = $(top_builddir)/mono/eglib/libeglib.la - -if HOST_WASM -platform_sources += threadpool-worker-wasm.c -else -platform_sources += threadpool-worker-default.c -endif - -if BITCODE -libmonoldflags = -no-undefined -endif - -if SUPPORT_SGEN -sgen_libraries = libmonoruntimesgen.la -endif - -if SUPPORT_BOEHM -boehm_libraries = libmonoruntime.la -endif - -if DISABLE_ICALL_TABLES -icall_table_libraries = libmono-icall-table.la -endif - -if !ENABLE_ILGEN -ilgen_libraries = libmono-ilgen.la -endif - -BUNDLE_ZLIB_PATH=$(top_builddir)/mono/zlib/libz.la - -if HAVE_STATIC_ZLIB -Z_LIBS=$(STATIC_ZLIB_PATH) -else -if HAVE_SYS_ZLIB -Z_LIBS=-lz -else -Z_LIBS=$(BUNDLE_ZLIB_PATH) -endif -endif - -noinst_LTLIBRARIES = libmonoruntime-config.la $(support_libraries) $(boehm_libraries) $(sgen_libraries) $(shim_libraries) - -lib_LTLIBRARIES = $(icall_table_libraries) $(ilgen_libraries) - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS) $(METADATA_CFLAGS) - -# -# Make sure any prefix changes are updated in the binaries too. -# -# This won't result in many more false positives than AC_DEFINEing them -# in configure.ac. -# -mono-config-dirs.lo: Makefile - -# -# This library is used to localize the usage of MONO_BINDIR etc. to just one source file, thus enabling -# ccache to work even if the value of these defines change. We need to use a convenience library since automake -# doesn't support per file cflags. -# -libmonoruntime_config_la_SOURCES = \ - mono-config-dirs.h \ - mono-config-dirs.c -libmonoruntime_config_la_CPPFLAGS = $(AM_CPPFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\" -DMONO_RELOC_LIBDIR=\"../$(reloc_libdir)\" @CXX_ADD_CFLAGS@ - -# -# Support is a separate library because it is not valid C++. -# -support_libraries = libmonoruntime-support.la - -libmonoruntime_support_la_SOURCES = support.c -libmonoruntime_support_la_LDFLAGS = $(Z_LIBS) -libmonoruntime_support_la_CFLAGS = $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) @ZLIB_CFLAGS@ - -if ENABLE_NETCORE -if HAVE_SYS_ICU - -# symlink ICU sources to a local dir so automake puts intermediates into the target-specific folder -icushim/%.c: @ICU_SHIM_PATH@/%.c - $(LN_S) $^ $@ - -shim_libraries = libmonoruntime-shimglobalization.la - -nodist_libmonoruntime_shimglobalization_la_SOURCES = \ - icushim/pal_calendarData.c \ - icushim/pal_casing.c \ - icushim/pal_collation.c \ - icushim/pal_idna.c \ - icushim/pal_locale.c \ - icushim/pal_localeNumberData.c \ - icushim/pal_localeStringData.c \ - icushim/pal_normalization.c \ - icushim/pal_timeZoneInfo.c \ - icushim/entrypoints.c - -libmonoruntime_shimglobalization_la_CFLAGS = @ICU_CFLAGS@ -I$(top_srcdir)/../libraries/Native/Unix/System.Globalization.Native/ -I$(top_srcdir)/../libraries/Native/Unix/Common/ - -if STATIC_ICU -nodist_libmonoruntime_shimglobalization_la_SOURCES += icushim/pal_icushim_static.c -else -nodist_libmonoruntime_shimglobalization_la_SOURCES += icushim/pal_icushim.c -endif # STATIC_ICU - -endif # HAVE_SYS_ICU -endif # ENABLE_NETCORE - -if !ENABLE_NETCORE -culture_libraries = ../culture/libmono-culture.la -endif - -# -# This library contains the icall tables if the runtime was configured with --disable-icall-tables -# -if DISABLE_ICALL_TABLES -libmono_icall_table_la_SOURCES = \ - icall-table.c -# Add CXX_ADD_CFLAGS per-library until/unless https://github.com/dotnet/corefx/pull/31342. -libmono_icall_table_la_CFLAGS = $(SGEN_DEFINES) @CXX_ADD_CFLAGS@ -libmono_icall_table_la_LDFLAGS = $(libmonoldflags) -if BITCODE -if WASM -libmono_icall_table_la_LIBADD = # empty to avoid duplicate symbols when enabling dynamic linking -else -libmono_icall_table_la_LIBADD = $(glib_libs) ../utils/libmonoutils.la ../sgen/libmonosgen.la libmonoruntimesgen.la -endif -endif -endif - -# -# This library contains code to generate IL at runtime -# -if !ENABLE_ILGEN -libmono_ilgen_la_SOURCES = \ - method-builder-ilgen.c \ - method-builder-ilgen.h \ - method-builder-ilgen-internals.h \ - marshal-ilgen.c \ - marshal-ilgen.h \ - sgen-mono-ilgen.c \ - sgen-mono-ilgen.h -# Add CXX_ADD_CFLAGS per-library until/unless https://github.com/dotnet/corefx/pull/31342. -libmono_ilgen_la_CFLAGS = $(SGEN_DEFINES) @CXX_ADD_CFLAGS@ -libmono_ilgen_la_LDFLAGS = $(libmonoldflags) -if BITCODE -if WASM -libmono_ilgen_la_LIBADD = # empty to avoid duplicate symbols when enabling dynamic linking -else -libmono_ilgen_la_LIBADD = $(glib_libs) ../utils/libmonoutils.la ../sgen/libmonosgen.la libmonoruntimesgen.la -endif -endif -endif - - -CLEANFILES = mono-bundle.stamp - -null_sources = \ - console-null.c - -null_gc_sources = \ - null-gc.c \ - null-gc-handles.h \ - null-gc-handles.c - -if !DISABLE_ICALL_TABLES -icall_tables_sources = \ - icall-table.c -endif - -if ENABLE_ILGEN -ilgen_sources = \ - method-builder-ilgen.c \ - method-builder-ilgen.h \ - method-builder-ilgen-internals.h \ - marshal-ilgen.c \ - marshal-ilgen.h \ - sgen-mono-ilgen.c \ - sgen-mono-ilgen.h -endif - -common_sources = \ - $(platform_sources) \ - appdomain.c \ - assembly-load-context.c \ - domain.c \ - appdomain-icalls.h \ - assembly.c \ - assembly-internals.h \ - attach.h \ - attach.c \ - cil-coff.h \ - class.c \ - class-getters.h \ - class-init.h \ - class-init.c \ - class-init-internals.h \ - class-internals.h \ - class-inlines.h \ - class-private-definition.h \ - class-setup-vtable.c \ - class-accessors.c \ - cominterop.c \ - cominterop.h \ - console-io.h \ - coree.c \ - coree.h \ - coree-internals.h \ - debug-helpers.c \ - debug-mono-symfile.h \ - debug-mono-symfile.c \ - debug-mono-ppdb.h \ - debug-mono-ppdb.c \ - domain-internals.h \ - environment.c \ - environment.h \ - environment-internals.h \ - icall-eventpipe.c \ - exception.c \ - exception.h \ - exception-internals.h \ - external-only.h \ - w32file.c \ - w32file.h \ - w32file-internals.h \ - filewatcher.c \ - filewatcher.h \ - gc-internals.h \ - icall.c \ - icalls.h \ - icall-decl.h \ - icall-def.h \ - icall-internals.h \ - icall-signatures.h \ - icall-table.h \ - image.c \ - image-internals.h \ - jit-icall-reg.h \ - jit-info.c \ - loader.c \ - loader-internals.h \ - loaded-images-internals.h \ - loaded-images.c \ - loaded-images-global.c \ - loaded-images-netcore.c \ - locales.h \ - lock-tracer.c \ - lock-tracer.h \ - marshal.c \ - marshal.h \ - marshal-internals.h \ - marshal-noilgen.c \ - mempool.c \ - mempool.h \ - mempool-internals.h \ - metadata.c \ - metadata-verify.c \ - metadata-internals.h \ - metadata-update.h \ - metadata-update.c \ - method-builder.h \ - method-builder-internals.h \ - method-builder.c \ - mono-basic-block.c \ - mono-basic-block.h \ - mono-config-internals.h \ - mono-config.c \ - mono-debug.h \ - mono-debug.c \ - debug-internals.h \ - mono-endian.c \ - mono-endian.h \ - mono-hash-internals.h \ - mono-hash.c \ - mono-hash.h \ - mono-conc-hash.c \ - mono-conc-hash.h \ - mono-mlist.c \ - mono-mlist.h \ - mono-perfcounters.c \ - mono-perfcounters.h \ - mono-perfcounters-def.h \ - mono-ptr-array.h \ - mono-route.c \ - monitor.h \ - normalization-tables.h \ - number-formatter.h \ - number-ms.h \ - object.c \ - object-forward.h \ - object-internals.h \ - opcodes.c \ - property-bag.h \ - property-bag.c \ - w32socket.c \ - w32socket.h \ - w32socket-internals.h \ - w32process.c \ - w32process.h \ - w32process-internals.h \ - profiler.c \ - profiler-private.h \ - profiler-legacy.h \ - rand.h \ - rand.c \ - remoting.h \ - remoting.c \ - runtime.c \ - runtime.h \ - mono-security.c \ - security.h \ - security-core-clr.c \ - security-core-clr.h \ - security-manager.c \ - security-manager.h \ - string-icalls.c \ - string-icalls.h \ - sysmath.c \ - tabledefs.h \ - threads.c \ - threads-types.h \ - threadpool.c \ - threadpool.h \ - threadpool-worker.h \ - threadpool-io.c \ - threadpool-io.h \ - verify.c \ - verify-internals.h \ - wrapper-types.h \ - dynamic-image-internals.h \ - dynamic-stream.c \ - dynamic-stream-internals.h \ - reflection-cache.h \ - custom-attrs-internals.h \ - sre-internals.h \ - reflection-internals.h \ - file-mmap-posix.c \ - file-mmap-windows.c \ - file-mmap.h \ - object-offsets.h \ - abi-details.h \ - class-abi-details.h \ - metadata-cross-helpers.c \ - seq-points-data.h \ - seq-points-data.c \ - handle.c \ - handle-decl.h \ - handle.h \ - w32mutex.h \ - w32semaphore.h \ - w32event.h \ - w32handle-namespace.h \ - w32handle-namespace.c \ - w32handle.h \ - w32handle.c \ - w32error.h \ - reflection.c \ - dynamic-image.c \ - sre.c \ - sre-encode.c \ - sre-save.c \ - custom-attrs.c \ - fdhandle.h \ - fdhandle.c \ - callspec.h \ - callspec.c \ - abi.c \ - memory-manager.c \ - native-library.c \ - native-library.h \ - native-library-qcall.c \ - qcall-def.h - -# These source files have compile time dependencies on GC code -gc_dependent_sources = \ - gc-stats.c \ - gc.c \ - monitor.c - -boehm_sources = \ - boehm-gc.c - -sgen_sources = \ - sgen-bridge.c \ - sgen-bridge.h \ - sgen-bridge-internals.h \ - sgen-dynarray.h \ - sgen-old-bridge.c \ - sgen-new-bridge.c \ - sgen-tarjan-bridge.c \ - sgen-toggleref.c \ - sgen-toggleref.h \ - sgen-stw.c \ - sgen-mono.c \ - sgen-mono.h \ - sgen-client-mono.h - -endif # !ENABLE_MSVC_ONLY - -# Per-library to workaround CoreFX/native until/unless https://github.com/dotnet/corefx/pull/31342. -#CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) @CXX_ADD_CFLAGS@ -CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) - -if !ENABLE_MSVC_ONLY - -libmonoruntime_la_SOURCES = $(common_sources) $(icall_tables_sources) $(ilgen_sources) $(gc_dependent_sources) $(null_gc_sources) $(boehm_sources) -# Add CXX_ADD_CFLAGS per-library until/unless https://github.com/dotnet/corefx/pull/31342. -libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES) $(GLOBALIZATION_SHIM_DEFINES) @CXX_ADD_CFLAGS@ -libmonoruntime_la_LIBADD = libmonoruntime-config.la $(culture_libraries) $(support_libraries) $(shim_libraries) - -libmonoruntimesgen_la_SOURCES = $(common_sources) $(icall_tables_sources) $(ilgen_sources) $(gc_dependent_sources) $(sgen_sources) -# Add CXX_ADD_CFLAGS per-library until/unless https://github.com/dotnet/corefx/pull/31342. -libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES) $(GLOBALIZATION_SHIM_DEFINES) @CXX_ADD_CFLAGS@ -libmonoruntimesgen_la_LIBADD = libmonoruntime-config.la $(culture_libraries) $(support_libraries) $(shim_libraries) - -endif # !ENABLE_MSVC_ONLY - -libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata - -# This list is sorted for easier searching. -# These are public headers. -# They may not use G_BEGIN_DECLS, guint, glib.h, etc. -# debug-mono-symfile.h is an exception. It is only semi-public. -libmonoruntimeinclude_HEADERS = \ - appdomain.h \ - assembly.h \ - attrdefs.h \ - blob.h \ - class.h \ - debug-helpers.h \ - debug-mono-symfile.h \ - environment.h \ - exception.h \ - image.h \ - loader.h \ - metadata.h \ - mono-config.h \ - mono-debug.h \ - mono-gc.h \ - mono-private-unstable.h \ - object.h \ - object-forward.h \ - opcodes.h \ - profiler.h \ - profiler-events.h \ - reflection.h \ - row-indexes.h \ - sgen-bridge.h \ - threads.h \ - tokentype.h \ - verify.h - -if !ENABLE_MSVC_ONLY - -EXTRA_DIST = $(null_sources) \ - external-only.c \ - threadpool-io-poll.c threadpool-io-epoll.c threadpool-io-kqueue.c - -endif # !ENABLE_MSVC_ONLY - -if ENABLE_MSVC_ONLY - -all-local: - - make -C $(top_srcdir)/msvc libmonoruntime - -clean-local: - - make -C $(top_srcdir)/msvc clean-libmonoruntime - -endif # ENABLE_MSVC_ONLY diff --git a/src/mono/mono/mini/.gitignore b/src/mono/mono/mini/.gitignore index 9a7142542c7d28..fd3e6b0d3f38e4 100644 --- a/src/mono/mono/mini/.gitignore +++ b/src/mono/mono/mini/.gitignore @@ -1,6 +1,3 @@ -/Makefile -/Makefile.in -/Makefile.am /*.o /*.g.c /*.so diff --git a/src/mono/mono/mini/Makefile.am.in b/src/mono/mono/mini/Makefile.am.in deleted file mode 100755 index 90cbfa8877bd88..00000000000000 --- a/src/mono/mono/mini/Makefile.am.in +++ /dev/null @@ -1,1151 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -## Set the C++ linker based on configure settings, see comment in configure.ac -## about why we need to do this. -CXXLD=$(MONO_CXXLD) -CCLD=$(MONO_CXXLD) - -count=100000 -mtest=for_loop -monodir=$(top_builddir) -mono=$(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),mono) - -if HOST_WIN32 -PLATFORM_PATH_SEPARATOR=; -else -PLATFORM_PATH_SEPARATOR=: -endif - -if !ENABLE_MSVC_ONLY - -# This is needed for automake dependency generation -if SUPPORT_NULLGC -libgc_libs= -libgc_static_libs= -else -libgc_libs=$(monodir)/external/bdwgc/libgc.la -libgc_static_libs=$(monodir)/external/bdwgc/libgc-static.la -endif - -glib_libs = $(monodir)/mono/eglib/libeglib.la - -boehm_libs= \ - $(monodir)/mono/metadata/libmonoruntime.la \ - $(monodir)/mono/utils/libmonoutils.la \ - $(glib_libs) \ - $(libgc_libs) - -sgen_libs = \ - $(monodir)/mono/metadata/libmonoruntimesgen.la \ - $(monodir)/mono/sgen/libmonosgen.la \ - $(monodir)/mono/utils/libmonoutils.la \ - $(glib_libs) - -if ENABLE_LLVM - -include $(mono_build_root)/llvm/llvm_config.mk -LLVM_CFLAGS=$(LLVM_CFLAGS_INTERNAL) $(LLVM_CFLAGS_EXTERNAL) -LLVM_CXXFLAGS=$(LLVM_CXXFLAGS_INTERNAL) $(LLVM_CXXFLAGS_EXTERNAL) -LLVM_LDFLAGS=$(LLVM_LDFLAGS_INTERNAL) $(LLVM_LDFLAGS_EXTERNAL) -LLVM_LIBS=$(LLVM_LIBS_INTERNAL) $(LLVM_LIBS_EXTERNAL) - -$(mono_build_root)/llvm/llvm_config.mk: - $(MAKE) -C $(top_builddir)/llvm $(mono_build_root)/llvm/llvm_config.mk - -endif - -endif # !ENABLE_MSVC_ONLY - -if FULL_AOT_TESTS -# if the tests are going to run with framework assemblies compiled with -# -d:MOBILE, tell the runtime to remap framework assemblies using the mobile -# runtime info -MOBILE_RUNTIME_ARG=--runtime=mobile -else -MOBILE_RUNTIME_ARG= -endif - -CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE) - -RUNTIME_EXECUTABLE = $(if $(BOEHM),$(top_builddir)/mono/mini/mono-boehm,$(top_builddir)/runtime/mono-wrapper) - -MINI_RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME_EXECUTABLE) $(MOBILE_RUNTIME_ARG) -TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper -INTERP_RUNTIME = $(MINI_RUNTIME) --interpreter -RUNTIME_AOTCHECK = MONO_PATH="$(CLASS)$(PLATFORM_PATH_SEPARATOR)." $(RUNTIME_EXECUTABLE) - -MCS = CSC_SDK_PATH_DISABLED= $(TOOLS_RUNTIME) $(CSC) -langversion:8.0 -nostdlib -unsafe -nowarn:0162 -nologo -noconfig -r:$(CLASS)/mscorlib.dll -r:$(CLASS)/System.dll -r:$(CLASS)/System.Core.dll -ILASM = $(TOOLS_RUNTIME) $(mcs_topdir)/class/lib/build/ilasm.exe - -if !ENABLE_MSVC_ONLY - -AM_CFLAGS = \ - -I$(top_srcdir) \ - $(GLIB_CFLAGS) \ - $(LLVM_CFLAGS) \ - $(JEMALLOC_CFLAGS) \ - $(PLATFORM_CFLAGS) $(ARCH_CFLAGS) $(SHARED_CFLAGS) - -AM_CXXFLAGS = -I$(top_srcdir) $(LLVM_CXXFLAGS) $(GLIB_CFLAGS) - -if HOST_WIN32 -export HOST_CC -# The mingw math.h has "extern inline" functions that dont appear in libs, so -# optimisation is required to actually inline them -PLATFORM_CFLAGS = -O -endif - -monoldflags=$(export_ldflags) -monobinldflags=$(export_ldflags) $(extra_runtime_ldflags) - -if HOST_WIN32 -libmonoldflags=-no-undefined -avoid-version -Wl,--kill-at $(monoldflags) -else -if HOST_ANDROID -libmonoldflags= -avoid-version $(monoldflags) -else -libmonoldflags=$(monoldflags) -version-info 1:0:0 -endif -endif - -if SUPPORT_SGEN -sgen_binaries = mono-sgen -sgen_libraries = libmonosgen-2.0.la -sgen_static_libraries = libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(sgen_libs) -endif - -if SUPPORT_BOEHM -boehm_libraries = libmonoboehm-2.0.la -boehm_static_libraries = libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(boehm_libs) -boehm_binaries = mono-boehm -endif - -endif # !ENABLE_MSVC_ONLY - -if SUPPORT_SGEN -mono_bin_suffix = sgen -libmono_suffix = sgen -else -mono_bin_suffix = boehm -libmono_suffix = boehm -endif - -if DISABLE_EXECUTABLES -else -if !ENABLE_MSVC_ONLY -mono: mono-$(mono_bin_suffix) - ln -sf $< $@ - -mono.exe: mono-$(mono_bin_suffix).exe - ln -sf $< $@ -else # !ENABLE_MSVC_ONLY -.PHONY: mono -mono: - make -C $(top_srcdir)/msvc mono - ln -sf $(mono_msvc_build_bin_dir)/mono-$(mono_bin_suffix)$(EXEEXT) ./mono.exe -if SUPPORT_SGEN - ln -sf $(mono_msvc_build_bin_dir)/mono-$(mono_bin_suffix)$(EXEEXT) ./mono-sgen.exe -endif - -mono.exe: mono - -monow.exe: mono - -all-local: mono - -clean-mono: - make -C $(top_srcdir)/msvc clean-mono - -endif # !ENABLE_MSVC_ONLY - -install-exec-hook: - (cd $(DESTDIR)$(bindir) && ln -sf mono-$(mono_bin_suffix)$(EXEEXT) mono$(EXEEXT)) - (cd $(DESTDIR)$(libdir); shopt -s nullglob 2>/dev/null; for i in libmono$(libmono_suffix)*; do ln -sf $$i `echo $$i | sed s/$(libmono_suffix)//` ; done) -endif - -if !ENABLE_MSVC_ONLY - -if DISABLE_EXECUTABLES -else -if HOST_WIN32 -bin_PROGRAMS = $(boehm_binaries) $(sgen_binaries) monow -else -bin_PROGRAMS = $(boehm_binaries) $(sgen_binaries) -endif -endif - -if DISABLE_EXECUTABLES -noinst_PROGRAMS = -else -noinst_PROGRAMS = mono -endif - -if DISABLE_EXECUTABLES -shared_libraries = $(boehm_libraries) $(sgen_libraries) -else -if SHARED_MONO -shared_libraries = $(boehm_libraries) $(sgen_libraries) -endif -endif - -lib_LTLIBRARIES = $(shared_libraries) - -if DISABLE_INTERPRETER -lib_LTLIBRARIES += $(interp_libs) -endif - -if SHARED_MONO -mini_common_lib = libmini.la -else -mini_common_lib = -endif - -noinst_LTLIBRARIES = $(mini_common_lib) - -noinst_LIBRARIES = libmain.a - -libmain_a_SOURCES = main-sgen.c -if SUPPORT_BOEHM -libmain_a_SOURCES += main.c -endif -libmain_a_CFLAGS = $(AM_CFLAGS) @CXX_ADD_CFLAGS@ - -# we need this to prevent automake from generating a default mono_SOURCES = mono.c -mono_SOURCES = - -mono_boehm_SOURCES = -mono_boehm_CFLAGS = $(AM_CFLAGS) @CXX_REMOVE_CFLAGS@ - -AM_CPPFLAGS = $(LIBGC_CPPFLAGS) - -mono_sgen_SOURCES = -mono_sgen_CFLAGS = $(AM_CFLAGS) @CXX_REMOVE_CFLAGS@ - -BUILD_DATE = $(shell SOURCE_DATE_EPOCH="$${SOURCE_DATE_EPOCH:-$$(date +%s)}" ;date -u -d "@$$SOURCE_DATE_EPOCH" 2>/dev/null || date -u -r "$$SOURCE_DATE_EPOCH" 2>/dev/null || date -u) - -# We build this after libmono was built so it contains the date when the final -# link was done -if SUPPORT_BOEHM -buildver-boehm.h: libmini.la $(monodir)/mono/metadata/libmonoruntime.la - @echo "const char *build_date = \"$(BUILD_DATE)\";" > buildver-boehm.h -libmain_a-main.$(OBJEXT): buildver-boehm.h -endif - -buildver-sgen.h: libmini.la $(monodir)/mono/metadata/libmonoruntimesgen.la $(monodir)/mono/sgen/libmonosgen.la - @echo "const char *build_date = \"$(BUILD_DATE)\";" > buildver-sgen.h - -libmain_a-main-sgen.$(OBJEXT): buildver-sgen.h - -if DTRACE_G_REQUIRED -LIBMONO_DTRACE_OBJECT = .libs/mono-dtrace.$(OBJEXT) -if STATIC_MONO -MONO_DTRACE_OBJECT = mono-dtrace.$(OBJEXT) -else -MONO_DTRACE_OBJECT = -endif -else -MONO_DTRACE_OBJECT = -LIBMONO_DTRACE_OBJECT = -endif - -if STATIC_MONO -# Link libmono into mono statically -# This leads to higher performance, especially with TLS -MONO_LIB=$(boehm_static_libraries) -MONO_SGEN_LIB=$(sgen_static_libraries) -else -MONO_LIB=libmonoboehm-2.0.la -MONO_SGEN_LIB=libmonosgen-2.0.la -endif - -LLVMMONOF=$(LLVM_LIBS) $(LLVM_LDFLAGS) - -mono_boehm_LDADD = \ - libmain_a-main.$(OBJEXT) \ - $(MONO_LIB) \ - $(glib_libs) \ - $(LLVMMONOF) \ - $(LIBICONV) \ - $(Z_LIBS) \ - -lm \ - $(MONO_DTRACE_OBJECT) - -mono_boehm_LDFLAGS = \ - $(static_flags) $(monobinldflags) $(monobin_platform_ldflags) - -mono_sgen_LDADD = \ - libmain_a-main-sgen.$(OBJEXT) \ - $(MONO_SGEN_LIB) \ - $(glib_libs) \ - $(LLVMMONOF) \ - $(LIBICONV) \ - $(Z_LIBS) \ - -lm \ - $(MONO_DTRACE_OBJECT) - - -mono_sgen_LDFLAGS = $(static_flags) $(monobinldflags) $(monobin_platform_ldflags) - -if ENABLE_STATIC_GCC_LIBS -mono_sgen_LDFLAGS += -all-static -endif - -if BITCODE -libmonoldflags += -no-undefined -endif - -# if SUPPORT_SGEN -# -# mono_LDADD = $(mono_sgen_LDADD) -# mono_LDFLAGS = $(mono_sgen_LDFLAGS) -# -# endif - - -if DTRACE_G_REQUIRED - -mono-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d mini.lo $(monodir)/mono/metadata/libmonoruntime-static.la - DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \ - $@ $(top_srcdir)/data/mono.d $(monodir)/mono/metadata/libmonoruntime-static.la mini.lo - -.libs/mono-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d mini.lo $(monodir)/mono/metadata/libmonoruntime.la - DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \ - --pic $@ $(top_srcdir)/data/mono.d $(monodir)/mono/metadata/libmonoruntime.la mini.lo - -endif - -# Create monow.exe, linked for the 'windows' subsystem -if HOST_WIN32 -if SUPPORT_BOEHM -monow_LDADD = $(mono_boehm_LDADD) -monow_LDFLAGS = $(mono_boehm_LDFLAGS) -mwindows -monow_SOURCES = $(mono_boehm_SOURCES) -else -monow_LDADD = $(mono_sgen_LDADD) -monow_LDFLAGS = $(mono_sgen_LDFLAGS) -mwindows -monow_SOURCES = $(mono_sgen_SOURCES) -endif -endif - -wasm_sources = \ - mini-wasm.c \ - mini-wasm.h \ - mini-wasm-debugger.c \ - debugger-engine.c \ - exceptions-wasm.c \ - tramp-wasm.c - -x86_sources = \ - mini-x86.c \ - mini-x86.h \ - exceptions-x86.c \ - tramp-x86.c \ - mini-x86-gsharedvt.c \ - tramp-x86-gsharedvt.c - -amd64_sources = \ - mini-amd64.c \ - mini-amd64.h \ - exceptions-amd64.c \ - tramp-amd64.c \ - mini-amd64-gsharedvt.c \ - mini-amd64-gsharedvt.h \ - tramp-amd64-gsharedvt.c - -ppc_sources = \ - mini-ppc.c \ - mini-ppc.h \ - exceptions-ppc.c \ - tramp-ppc.c - -arm_sources = \ - mini-arm.c \ - mini-arm.h \ - exceptions-arm.c \ - tramp-arm.c \ - mini-arm-gsharedvt.c \ - tramp-arm-gsharedvt.c - -arm64_sources = \ - mini-arm64.c \ - mini-arm64.h \ - exceptions-arm64.c \ - tramp-arm64.c \ - mini-arm64-gsharedvt.c \ - mini-arm64-gsharedvt.h \ - tramp-arm64-gsharedvt.c - -mips_sources = \ - mini-mips.c \ - mini-mips.h \ - exceptions-mips.c \ - tramp-mips.c - -sparc_sources = \ - mini-sparc.c \ - mini-sparc.h \ - exceptions-sparc.c \ - tramp-sparc.c - -s390x_sources = \ - mini-s390x.c \ - mini-s390x.h \ - support-s390x.h \ - exceptions-s390x.c \ - tramp-s390x.c - -riscv_sources = \ - mini-riscv.c \ - mini-riscv.h \ - exceptions-riscv.c \ - tramp-riscv.c - -darwin_sources = \ - mini-darwin.c - -windows_sources = \ - mini-windows.c \ - mini-windows-tls-callback.c \ - mini-windows.h \ - mini-windows-dllmain.c \ - mini-windows-dlldac.c - -posix_sources = \ - mini-posix.c - -if ENABLE_LLVM -llvm_sources = \ - mini-llvm.c \ - mini-llvm-cpp.cpp \ - llvm-jit.cpp -endif - -interp_sources = \ - interp/interp.h \ - interp/interp-internals.h \ - interp/interp.c \ - interp/interp-intrins.h \ - interp/interp-intrins.c \ - interp/mintops.h \ - interp/mintops.def \ - interp/mintops.c \ - interp/transform.h \ - interp/transform.c - -interp_libs = libmono-ee-interp.la - -if !DISABLE_INTERPRETER -interp_libs_with_mini = $(interp_libs) -endif - -if ENABLE_LLVM -llvm_runtime_sources = \ - llvm-runtime.cpp -else -if ENABLE_LLVM_RUNTIME -llvm_runtime_sources = \ - llvm-runtime.cpp -endif -endif - -if ENABLE_NETCORE -netcore_sources = \ - main-core.c -endif - -common_sources = \ - mini.c \ - mini-runtime.c \ - seq-points.c \ - seq-points.h \ - ir-emit.h \ - method-to-ir.c \ - cfgdump.h \ - cfgdump.c \ - decompose.c \ - mini.h \ - version.h \ - optflags-def.h \ - jit-icalls.h \ - jit-icalls.c \ - trace.c \ - trace.h \ - patch-info.h \ - mini-ops.h \ - mini-arch.h \ - dominators.c \ - cfold.c \ - regalloc.h \ - helpers.c \ - liveness.c \ - ssa.c \ - abcremoval.c \ - abcremoval.h \ - local-propagation.c \ - driver.c \ - debug-mini.c \ - linear-scan.c \ - aot-compiler.h \ - aot-compiler.c \ - aot-runtime.c \ - aot-runtime-wasm.c \ - wasm_m2n_invoke.g.h \ - graph.c \ - mini-codegen.c \ - mini-exceptions.c \ - mini-trampolines.c \ - branch-opts.c \ - mini-generic-sharing.c \ - simd-methods.h \ - simd-methods-netcore.h \ - tasklets.c \ - tasklets.h \ - simd-intrinsics.c \ - simd-intrinsics-netcore.c \ - mini-native-types.c \ - mini-unwind.h \ - unwind.c \ - image-writer.h \ - image-writer.c \ - dwarfwriter.h \ - dwarfwriter.c \ - mini-gc.h \ - mini-gc.c \ - debugger-agent.h \ - debugger-engine.h \ - debugger-protocol.h \ - debugger-agent-stubs.c \ - debugger-state-machine.h \ - xdebug.c \ - mini-llvm.h \ - mini-llvm-cpp.h \ - llvm-jit.h \ - alias-analysis.c \ - mini-cross-helpers.c \ - arch-stubs.c \ - llvm-runtime.h \ - llvm-intrinsics.h \ - type-checking.c \ - calls.c \ - lldb.h \ - lldb.c \ - memory-access.c \ - intrinsics.c \ - mini-profiler.c \ - interp-stubs.c \ - llvmonly-runtime.h \ - llvmonly-runtime.c \ - aot-runtime.h \ - ee.h \ - tiered.h \ - tiered.c \ - mini-runtime.h \ - monovm.h \ - monovm.c - -endif # !ENABLE_MSVC_ONLY - -# keep in sync with mcs/class/Mono.Runtime.Tests -test_sources = \ - basic-calls.cs \ - basic-long.cs \ - bench.cs \ - builtin-types.cs \ - objects.cs \ - arrays.cs \ - basic-float.cs \ - basic-math.cs \ - basic.cs \ - exceptions.cs \ - devirtualization.cs \ - iltests.il \ - test.cs \ - generics.cs \ - generics-variant-types.il\ - basic-simd.cs \ - basic-vectors.cs \ - aot-tests.cs \ - gc-test.cs \ - gshared.cs \ - unaligned.cs \ - MemoryIntrinsics.il \ - mixed.cs \ - ratests.cs - -regtests_UNIVERSAL = \ - aot-tests.exe \ - basic.exe \ - basic-float.exe \ - basic-long.exe \ - basic-calls.exe \ - builtin-types.exe \ - gshared.exe \ - objects.exe \ - arrays.exe \ - basic-math.exe \ - exceptions.exe \ - iltests.exe \ - devirtualization.exe \ - generics.exe \ - basic-simd.exe \ - unaligned.exe \ - basic-vectors.exe \ - ratests.exe - -regtests_DISABLED = - -if FULL_AOT_TESTS -regtests_DISABLED += builtin-types.exe -endif - -regtests = $(filter-out $(regtests_DISABLED),$(regtests_UNIVERSAL)) - -if !ENABLE_MSVC_ONLY - -if WASM -arch_sources = $(wasm_sources) -arch_built=cpu-wasm.h -arch_define=__wasm__ -target_define=TARGET_WASM -endif - -if X86 -arch_sources = $(x86_sources) -arch_built=cpu-x86.h -arch_define=__i386__ -target_define=TARGET_X86 -endif - -if AMD64 -arch_sources = $(amd64_sources) -arch_built=cpu-amd64.h -arch_define=__x86_64__ -target_define=TARGET_AMD64 -ARCH_FULLAOT_EXCLUDE= -endif - -if POWERPC -arch_sources = $(ppc_sources) -arch_built=cpu-ppc.h -arch_define=__ppc__ -target_define=TARGET_POWERPC -endif - -if POWERPC64 -arch_sources = $(ppc_sources) -arch_built=cpu-ppc64.h -arch_define=__ppc64__ -target_define=TARGET_POWERPC -endif - -if MIPS -arch_sources = $(mips_sources) -arch_built=cpu-mips.h -arch_define=__mips__ -target_define=TARGET_MIPS -endif - -if ARM -# pick up arm_dpimacros.h -ARCH_CFLAGS = -I../arch/arm -arch_sources = $(arm_sources) -arch_built=cpu-arm.h -arch_define=__arm__ -target_define=TARGET_ARM -endif - -if ARM64 -arch_sources = $(arm64_sources) -arch_built=cpu-arm64.h -arch_define=__aarch64__ -target_define=TARGET_ARM64 -endif - -if SPARC -arch_sources = $(sparc_sources) -arch_built=cpu-sparc.h -arch_define=__sparc__ -target_define=TARGET_SPARC -endif - -if SPARC64 -arch_sources = $(sparc_sources) -arch_built=cpu-sparc.h -arch_define=__sparc__ -target_define=TARGET_SPARC -endif - -if S390X -arch_sources = $(s390x_sources) -arch_built=cpu-s390x.h -arch_define=__s390__ -target_define=TARGET_S390X -endif - -if RISCV32 -arch_sources = $(riscv_sources) -arch_built = cpu-riscv32.h -arch_define = __riscv -target_define = TARGET_RISCV32 -endif - -if RISCV64 -arch_sources = $(riscv_sources) -arch_built = cpu-riscv64.h -arch_define = __riscv -target_define = TARGET_RISCV64 -endif - -if HOST_WIN32 -os_sources = $(windows_sources) -monobin_platform_ldflags= -endif - -if HOST_SIGPOSIX -os_sources = $(posix_sources) -monobin_platform_ldflags= -endif - -if HOST_DARWIN -os_sources = $(darwin_sources) $(posix_sources) -#monobin_platform_ldflags=-sectcreate __TEXT __info_plist $(top_srcdir)/mono/mini/Info.plist -framework CoreFoundation -framework Foundation -monobin_platform_ldflags=-framework CoreFoundation -framework Foundation -endif - -if MONO_JEMALLOC_ENABLED -libmonoldflags += $(JEMALLOC_LDFLAGS) -endif - -libmono_ee_interp_la_SOURCES = $(interp_sources) -libmono_ee_interp_la_CFLAGS = $(AM_CFLAGS) @CXX_ADD_CFLAGS@ $(INTERP_CFLAGS) -if BITCODE -libmono_ee_interp_la_LDFLAGS = $(libmonoldflags) -if DISABLE_INTERPRETER -libmono_ee_interp_la_LIBADD = libmonosgen-2.0.la -endif -endif - -if !WASM -extra_libmono_dbg_source = debugger-engine.c -endif - -libmono_dbg_la_SOURCES = debugger-agent.c debugger-protocol.c debugger-state-machine.c $(extra_libmono_dbg_source) -libmono_dbg_la_CFLAGS = $(AM_CFLAGS) @CXX_ADD_CFLAGS@ -if BITCODE -if DISABLE_DEBUGGER_AGENT -libmono_dbg_la_LIBADD = libmonosgen-2.0.la -endif -endif - -dbg_libs = libmono-dbg.la - -if DISABLE_DEBUGGER_AGENT -lib_LTLIBRARIES += $(dbg_libs) -endif - -if !DISABLE_DEBUGGER_AGENT -dbg_libs_with_mini = $(dbg_libs) -noinst_LTLIBRARIES += $(dbg_libs) -endif - -# -# This library is shared between mono and mono-sgen, since the code in mini/ doesn't contain -# compile time dependencies on boehm/sgen. -# -libmini_la_SOURCES = $(common_sources) $(llvm_sources) $(llvm_runtime_sources) $(arch_sources) $(os_sources) $(netcore_sources) -libmini_la_CFLAGS = $(AM_CFLAGS) @CXX_ADD_CFLAGS@ - -libmonoboehm_2_0_la_SOURCES = -libmonoboehm_2_0_la_CFLAGS = $(mono_boehm_CFLAGS) @CXX_ADD_CFLAGS@ - -libmonoboehm_2_0_la_LIBADD = libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(boehm_libs) $(LIBMONO_DTRACE_OBJECT) $(LLVMMONOF) -libmonoboehm_2_0_la_LDFLAGS = $(libmonoldflags) $(monobin_platform_ldflags) $(CCLDFLAGS) - -libmonosgen_2_0_la_SOURCES = -libmonosgen_2_0_la_CFLAGS = $(mono_sgen_CFLAGS) @CXX_ADD_CFLAGS@ - -libmonosgen_2_0_la_LIBADD = libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(sgen_libs) $(LIBMONO_DTRACE_OBJECT) $(LLVMMONOF) -libmonosgen_2_0_la_LDFLAGS = $(libmonoldflags) $(monobin_platform_ldflags) $(CCLDFLAGS) -libmonosgen_2_0_la_LIBTOOLFLAGS = $(MONO_LIBTOOL_TAG) - -noinst_LIBRARIES += libmaintest.a - -libmaintest_a_SOURCES = interp/whitebox.c -libmaintest_a_CFLAGS = $(AM_CFLAGS) @CXX_ADD_CFLAGS@ - -WHITEBOX_ASSEMBLY=interp/whitebox-snippets.exe -test_mono_interp_whitebox_SOURCES = -test_mono_interp_whitebox_CFLAGS = $(AM_CFLAGS) @CXX_REMOVE_CFLAGS@ -test_mono_interp_whitebox_LDADD = interp/libmaintest_a-whitebox.$(OBJEXT) libmini.la $(interp_libs_with_mini) $(dbg_libs_with_mini) $(sgen_libs) $(LIBMONO_DTRACE_OBJECT) $(LLVMMONOF) -test_mono_interp_whitebox_LDFLAGS = $(libmonoldflags) $(monobin_platform_ldflags) -test_mono_interp_whitebox_DEPENDENCIES = $(WHITEBOX_ASSEMBLY) - -check_PROGRAMS = test-mono-interp-whitebox - -endif # !ENABLE_MSVC_ONLY - -libmonoincludedir = $(includedir)/mono-$(API_VER)/mono/jit - -# These are public headers. -# They should not use glib.h, G_BEGIN_DECLS, guint, etc. -# They should be wrapped in MONO_BEGIN_DECLS / MONO_END_DECLS. -libmonoinclude_HEADERS = \ - jit.h \ - mono-private-unstable.h - -CSFLAGS = -unsafe -nowarn:0219,0169,0414,0649,0618 - -basic-simd.exe: basic-simd.cs TestDriver.dll - $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:$(CLASS)/Mono.Simd.dll - -basic-vectors.exe: basic-vectors.cs TestDriver.dll - $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:$(CLASS)/System.Numerics.dll -r:$(CLASS)/System.Numerics.Vectors.dll - -builtin-types.exe: builtin-types.cs TestDriver.dll - $(MCS) -out:$@ $(CSFLAGS) -define:ARCH_$(shell echo $$((8 * $(SIZEOF_VOID_P)))) $< -r:TestDriver.dll - -nacl.exe: nacl.cs TestDriver.dll - $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:$(CLASS)/Mono.Simd.dll - -generics.exe: generics.cs TestDriver.dll generics-variant-types.dll - $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:generics-variant-types.dll -r:$(CLASS)/System.Core.dll - -unaligned.exe: unaligned.cs TestDriver.dll MemoryIntrinsics.dll - $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:MemoryIntrinsics.dll - -%.exe: %.cs TestDriver.dll - $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll - -%.exe: %.il TestDriver.dll - $(ILASM) -output=$@ $< - -TestDriver.dll: $(srcdir)/TestDriver.cs $(srcdir)/TestHelpers.cs - $(MCS) -out:$@ -target:library $^ - -generics-variant-types.dll: generics-variant-types.il - $(ILASM) -dll -output=$@ $< - -MemoryIntrinsics.dll: MemoryIntrinsics.il - $(ILASM) -dll -output=$@ $< - -GENMDESC_OPTS= - -GENMDESC_PRG=$(PYTHON) $(srcdir)/genmdesc.py $(target_define) $(srcdir) - -cpu-wasm.h: mini-ops.h cpu-wasm.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-wasm.h wasm_desc $(srcdir)/cpu-wasm.md - -cpu-x86.h: mini-ops.h cpu-x86.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-x86.h x86_desc $(srcdir)/cpu-x86.md - -cpu-amd64.h: mini-ops.h cpu-amd64.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-amd64.h amd64_desc $(srcdir)/cpu-amd64.md - -cpu-ppc.h: mini-ops.h cpu-ppc.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-ppc.h ppcg4 $(srcdir)/cpu-ppc.md - -cpu-ppc64.h: mini-ops.h cpu-ppc64.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-ppc64.h ppc64_cpu_desc $(srcdir)/cpu-ppc64.md - -cpu-arm.h: mini-ops.h cpu-arm.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-arm.h arm_cpu_desc $(srcdir)/cpu-arm.md - -cpu-arm64.h: mini-ops.h cpu-arm64.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-arm64.h arm64_cpu_desc $(srcdir)/cpu-arm64.md - -cpu-sparc.h: mini-ops.h cpu-sparc.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-sparc.h sparc_desc $(srcdir)/cpu-sparc.md - -cpu-s390x.h: mini-ops.h cpu-s390x.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-s390x.h s390x_cpu_desc $(srcdir)/cpu-s390x.md - -cpu-mips.h: mini-ops.h cpu-mips.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-mips.h mips_desc $(srcdir)/cpu-mips.md - -cpu-riscv32.h: cpu-riscv32.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-riscv32.h riscv32_cpu_desc $(srcdir)/cpu-riscv32.md - -cpu-riscv64.h: cpu-riscv64.md $(srcdir)/genmdesc.py - $(GENMDESC_PRG) cpu-riscv64.h riscv64_cpu_desc $(srcdir)/cpu-riscv64.md - -testi: mono test.exe - $(MINI_RUNTIME) -v -v --ncompile 1 --compile Test:$(mtest) test.exe - -test-local: $(regtests) - -test-bundle-local: - mkdir -p $(TEST_BUNDLE_PATH)/tests/mini - cp -L $(regtests) TestDriver.dll MemoryIntrinsics.dll generics-variant-types.dll $(TEST_BUNDLE_PATH)/tests/mini/ - cp -L mono-sgen $(TEST_BUNDLE_PATH)/ - chmod +x $(TEST_BUNDLE_PATH)/mono-sgen -if SUPPORT_BOEHM - cp -L mono-boehm $(TEST_BUNDLE_PATH)/ - chmod +x $(TEST_BUNDLE_PATH)/mono-boehm -endif - -# ensure the tests are actually correct -checktests: $(regtests) - for i in $(regtests); do $(MINI_RUNTIME) $$i; done - -rcheck-nunit: mono $(regtests) - $(MINI_RUNTIME) --regression $(regtests) > regressiontests.out 2>&1; cat regressiontests.out; \ - if grep -q "100% pass" regressiontests.out; then successbool=True; failurescount=0; else successbool=False; failurescount=1; fi; \ - echo "\ - \ - \ - " > TestResult-regression.xml; \ - if [ "$$successbool" = "False" ]; then echo "" >> TestResult-regression.xml; fi; \ - echo "\ - \ - " >> TestResult-regression.xml; exit $$failurescount - -rcheck: mono $(regtests) - $(MINI_RUNTIME) --regression $(regtests) - -richeck: mono $(regtests) - $(INTERP_RUNTIME) --regression $(regtests) - -interp-whitebox: test-mono-interp-whitebox - MONO_PATH=$(CLASS) ./$< $(WHITEBOX_ASSEMBLY) - -mixedcheck: mono mixed.exe - $(MINI_RUNTIME) --interp=jit=JitClass mixed.exe - -check-seq-points: - -# This test is fragile so disabled by default. -# single_imm_size support is incomplete. -# __declspec (thread) support breaks it. -# See https://github.com/mono/mono/pull/15599#issuecomment-509444313. -# See https://github.com/mono/mono/pull/15567. -# It was already previously disabled for ARM. -check-seq-points-force: mono $(regtests) - rm -f TestResult-op_il_seq_point.xml - for i in $(regtests); do $(srcdir)/test_op_il_seq_point.sh $(DEFAULT_PROFILE) $$i || ($(srcdir)/test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done - for i in $(regtests); do $(srcdir)/test_op_il_seq_point.sh $(DEFAULT_PROFILE) $$i --aot || ($(srcdir)/test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done - $(srcdir)/test_op_il_seq_point_headerfooter.sh - -gctest: mono gc-test.exe - MONO_DEBUG_OPTIONS=clear-nursery-at-gc $(MINI_RUNTIME) --regression gc-test.exe - -LLVM_AOT_RUNTIME_OPTS=$(if $(LLVM),--llvm,) -LLVM_AOT_COMPILER_OPTS=mcpu=native -GSHAREDVT_RUNTIME_OPTS=$(if $(GSHAREDVT),-O=gsharedvt,) - -aotcheck: mono $(regtests) - rm -rf *.exe.so *.exe.dylib *.exe.dylib.dSYM *.exe.dll - $(MINI_RUNTIME) $(LLVM_AOT_RUNTIME_OPTS) --aot="$(LLVM_AOT_COMPILER_OPTS)" $(regtests) || exit 1 - for i in $(regtests); do $(RUNTIME_AOTCHECK) --regression $$i || exit 1; done - rm -rf *.exe.so *.exe.dylib *.exe.dylib.dSYM *.exe.dll - -llvmaotcheck: - $(MAKE) aotcheck LLVM=1 - -gsharedvtcheck: - $(MAKE) fullaotcheck GSHAREDVT=1 - -hybridcheck: - $(MAKE) fullaotcheck HYBRID=1 - -# FIXME: force preemptive suspend while interpreter doesn't support coop/hybird suspend -fullaotmixedcheck: - $(MAKE) fullaotcheck MIXED=1 MONO_THREADS_SUSPEND=preemptive - -fullaot_regtests = $(regtests) -fullaot_testing_deps = generics-variant-types.dll TestDriver.dll MemoryIntrinsics.dll -fullaot_testing_deps_commas = generics-variant-types.dll,TestDriver.dll,MemoryIntrinsics.dll - -FULLAOT_LIBS_UNIVERSAL = \ - mscorlib.dll \ - System.Core.dll \ - System.dll \ - System.Xml.dll \ - System.Security.dll \ - Mono.Simd.dll \ - Mono.Security.dll \ - System.Numerics.dll \ - System.Numerics.Vectors.dll \ - Mono.Posix.dll \ - System.Configuration.dll - -FULLAOT_LIBS_DISABLED = - -# Skip aoting the tests that aren't compiled -# on the full aot profiles because they're skipped -# on mobile profiles -if FULL_AOT_TESTS -FULLAOT_LIBS_DISABLED += \ - Mono.Posix.dll \ - System.Configuration.dll -else -if FULL_AOT_INTERP_TESTS -FULLAOT_LIBS_DISABLED += \ - Mono.Posix.dll \ - System.Configuration.dll -endif -endif - -FULLAOT_LIBS = $(filter-out $(FULLAOT_LIBS_DISABLED),$(FULLAOT_LIBS_UNIVERSAL)) - -FULLAOT_TMP_DIR=$(top_builddir)/mono/mini/fullaot-tmp -if FULL_AOT_TESTS -# use the available testing profile -FULLAOT_MONO_PATH=$(CLASS) -else -FULLAOT_MONO_PATH=$(FULLAOT_TMP_DIR) -endif - -FULLAOT_AOT_ARGS=$(if $(HYBRID),hybrid,full,interp),$(MONO_FULLAOT_ADDITIONAL_ARGS)$(INVARIANT_AOT_OPTIONS) -FULLAOT_ARGS=$(if $(HYBRID),--hybrid-aot,--full-aot) - -# This currently only works on amd64/arm -fullaotcheck: $(mono) $(fullaot_regtests) $(fullaot_testing_deps) - rm -rf $(FULLAOT_TMP_DIR) - mkdir $(FULLAOT_TMP_DIR) -if !FULL_AOT_TESTS - $(MAKE) fullaot-libs AOT_FLAGS="$(FULLAOT_AOT_ARGS)" -endif - cp $(fullaot_regtests) $(fullaot_testing_deps) $(FULLAOT_TMP_DIR)/ - MONO_PATH=$(FULLAOT_MONO_PATH) $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) $(LLVM_AOT_RUNTIME_OPTS) $(GSHAREDVT_RUNTIME_OPTS) --aot="$(FULLAOT_AOT_ARGS),$(LLVM_AOT_COMPILER_OPTS)" $(FULLAOT_TMP_DIR)/{$(fullaot_testing_deps_commas),*.exe} || exit 1 - ln -s $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),$$PWD/mono) $(FULLAOT_TMP_DIR)/ - for i in $(fullaot_regtests); do echo $$i; MONO_PATH=$(FULLAOT_MONO_PATH) $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) $(FULLAOT_ARGS) $(FULLAOT_TMP_DIR)/$$i --exclude '!FULLAOT' $(ARCH_FULLAOT_EXCLUDE) || exit 1; done - if test x$(MIXED) == x1; then failed=0;i=0; while test $$i -lt 900; do i=`expr $$i + 1`; bash -c "echo -n '.'"; MONO_PATH=$(FULLAOT_MONO_PATH) MONO_DEBUG=aot-skip=$$i $(top_builddir)/runtime/mono-wrapper --full-aot-interp $(FULLAOT_TMP_DIR)/basic.exe > $(FULLAOT_TMP_DIR)/mixed.log || failed=1; if test $$failed -eq 1; then echo "Failed at $$i"; exit $$failed; fi; done; fi - -# This can run in parallel -fullaot-libs: $(patsubst %,fullaot-tmp/%.dylib,$(FULLAOT_LIBS)) - -fullaot-tmp/%.dylib: $(CLASS)/% - cp $(CLASS)/$* fullaot-tmp/ - mkdir fullaot-tmp/$*-tmp - MONO_PATH="fullaot-tmp/$(PLATFORM_PATH_SEPARATOR)$(CLASS)" $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) $(LLVM_AOT_RUNTIME_OPTS) $(GSHAREDVT_RUNTIME_OPTS) --aot=$(AOT_FLAGS),temp-path=fullaot-tmp/$*-tmp fullaot-tmp/$* - rm -rf fullaot-tmp/$*-tmp - -llvmfullaotcheck: - $(MAKE) fullaotcheck LLVM=1 GSHAREDVT=1 - -llvmonly_regtests = $(fullaot_regtests) gshared.exe - -llvmonlycheck: mono $(llvmonly_regtests) - rm -rf fullaot-tmp - mkdir fullaot-tmp - $(MAKE) fullaot-libs AOT_FLAGS="llvmonly,clangxx=clang++-6.0,$(MONO_FULLAOT_ADDITIONAL_ARGS)$(INVARIANT_AOT_OPTIONS)" - cp $(llvmonly_regtests) $(fullaot_testing_deps) fullaot-tmp/ - MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) --aot=llvmonly,clangxx=clang++-6.0 fullaot-tmp/{$(fullaot_testing_deps_commas),*.exe} || exit 1 - ln -s $$PWD/mono fullaot-tmp/ - for i in $(llvmonly_regtests); do echo $$i; MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) --llvmonly fullaot-tmp/$$i --exclude '!BITCODE' || exit 1; done - -gccheck: gc-test.exe - MONO_GC_PARAMS=stack-mark=precise MONO_GC_DEBUG=clear-at-gc ./mono-sgen gc-test.exe - -bench: mono test.exe - time env $(MINI_RUNTIME) --ncompile $(count) --compile Test:$(mtest) test.exe - -mbench: test.exe - time $(monodir)/mono/jit/mono --ncompile $(count) --compile Test:$(mtest) test.exe - -stat1: mono bench.exe - $(MINI_RUNTIME) --verbose --statfile stats.pl --regression bench.exe - perl viewstat.pl stats.pl - -stat2: mono basic.exe - $(MINI_RUNTIME) --verbose --statfile stats.pl --regression basic.exe - perl viewstat.pl -e stats.pl - -stat3: mono bench.exe - $(MINI_RUNTIME) --statfile stats.pl --ncompile 1000 --compile Tests:test_0_many_nested_loops bench.exe - perl viewstat.pl stats.pl - -docu: mini.sgm - docbook2txt mini.sgm - -# We need these because automake can't process normal make conditionals -check_local_targets = $(if $(EMIT_NUNIT), rcheck-nunit, rcheck) - -check-local: $(check_local_targets) - -clean-local: - rm -f mono mono.exe monow.exe mono-sgen.exe a.out gmon.out *.o buildver-boehm.h buildver-sgen.h test.exe regressionexitcode.out TestResult-op_il_seq_point.xml* - -pkgconfigdir = $(libdir)/pkgconfig - -BUILT_SOURCES = version.h $(arch_built) - -CLEANFILES= $(BUILT_SOURCES) *.exe *.dll -EXTRA_DIST = TestDriver.cs \ - TestHelpers.cs \ - genmdesc.py \ - $(test_sources) \ - $(wasm_sources) cpu-wasm.md \ - $(x86_sources) cpu-x86.md \ - $(amd64_sources) cpu-amd64.md \ - $(ppc_sources) cpu-ppc.md cpu-ppc64.md \ - $(arm_sources) cpu-arm.md \ - $(arm64_sources) cpu-arm64.md \ - $(mips_sources) cpu-mips.md \ - $(sparc_sources) cpu-sparc.md \ - $(s390x_sources) cpu-s390x.md \ - $(riscv_sources) cpu-riscv32.md cpu-riscv64.md \ - $(windows_sources) \ - $(darwin_sources) Info.plist \ - $(posix_sources) \ - test_op_il_seq_point.sh \ - test_op_il_seq_point_headerfooter.sh \ - interp/whitebox-snippets.il \ - Makefile.am.in - -if ENABLE_NETCORE -version.h: Makefile - echo "#define FULL_VERSION \"netcore\"" > version.h -else -version.h: Makefile - if test -e $(top_srcdir)/.git; then \ - (cd $(top_srcdir); \ - LANG=C; export LANG; \ - if test -z "$$ghprbPullId"; then \ - branch=`git branch | grep '^\*' | sed 's/.*detached .*/explicit/' | cut -d ' ' -f 2`; \ - else \ - branch="pull-request-$$ghprbPullId"; \ - fi; \ - version=`git log --no-color --first-parent -n1 --pretty=format:%h`; \ - echo "#define FULL_VERSION \"$$branch/$$version\""; \ - ); \ - else \ - if test -z "$$MONO_BRANCH" -o -z "$$MONO_BUILD_REVISION"; then \ - echo "#define FULL_VERSION \"tarball\""; \ - else \ - echo "#define FULL_VERSION \"$$MONO_BRANCH/$$MONO_BUILD_REVISION\""; \ - fi \ - fi > version.h -endif - -# Utility target for patching libtool to speed up linking -patch-libtool: - sed -e 's,if (for obj in $$oldobjs,if (for obj in "",g' < ../../libtool > 2; mv 2 ../../libtool - chmod a+x ../../libtool - -# Utility target for patching libtool to get rid of the 'ranlib: file has no symbols" warnings -patch-osx-libtool: - sed -e 's/old_archive_cmds=.*/old_archive_cmds="libtool -no_warning_for_no_symbols -static -o \\$$oldlib \\$$oldobjs"/g' < ../../libtool > 2; mv 2 ../../libtool - chmod a+x ../../libtool - -# Utility target to patch automake to generate the same format silent output as the old mono silent build did -patch-automake: - src="@echo \" '. \$$name . ' ' x (8 - length (\$$name)) . '\""; dst="@echo \"'. \$$name . ' ' x (7 - length (\$$name)) .'\""; sed -e "s/$$src/$$dst/g" < $$EXE > 2 && cp 2 $$EXE && rm -f 2 - -tags: - etags -o TAGS `find .. -name "*.h" -o -name "*.c"` - -if ENABLE_LLVM -llvm_makefile_dep = $(mono_build_root)/llvm/llvm_config.mk -endif - -if HAS_EXTENSION_MODULE -else -Makefile.am: Makefile.am.in - echo "##################### Generated from Makefile.am.in, do not modify ##########################" > $@ - cat $< >> $@ - -endif - -# Per-library because linking doesn't like -xc++, it treats libraries as C++. -CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) diff --git a/src/mono/mono/native/.gitignore b/src/mono/mono/native/.gitignore deleted file mode 100644 index 910685fe3f2dc7..00000000000000 --- a/src/mono/mono/native/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/Makefile -/Makefile.in -/Makefile.am -/.libs -/.deps -/*.lo -/*.la -/*.o -/*.a -/platform-type.c -/platform-type-compat.c -/platform-type-unified.c diff --git a/src/mono/mono/native/Makefile.am b/src/mono/mono/native/Makefile.am deleted file mode 100644 index 2237b25e5c674c..00000000000000 --- a/src/mono/mono/native/Makefile.am +++ /dev/null @@ -1,224 +0,0 @@ -if !ENABLE_MSVC_ONLY -if MONO_NATIVE_COMPAT -lib_LTLIBRARIES = libmono-native-compat.la libmono-native-unified.la -else -lib_LTLIBRARIES = libmono-native.la -endif -endif # !ENABLE_MSVC_ONLY - -CC = $(MONO_NATIVE_CC) -CCLD = $(MONO_NATIVE_CC) -CCAS = $(MONO_NATIVE_CC) -CPP = $(MONO_NATIVE_CC) -E -CXX = $(MONO_NATIVE_CXX) -CXXCPP = $(MONO_NATIVE_CXX) -E -CC_FOR_BUILD = $(MONO_NATIVE_CC) - -if !ENABLE_MSVC_ONLY - -common_sources = \ - pal_config.h \ - mono-native-platform.h \ - mono-native-platform.c \ - ../../external/corefx/src/Native/Unix/Common/pal_compiler.h \ - ../../external/corefx/src/Native/Unix/Common/pal_safecrt.h \ - ../../external/corefx/src/Native/Unix/Common/pal_types.h \ - ../../external/corefx/src/Native/Unix/Common/pal_utilities.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_errno.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_errno.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_maphardwaretype.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_maphardwaretype.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_memory.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_memory.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_uid.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_uid.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_time.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_time.h \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/dictionary_hash.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/backward_references_hq.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/histogram.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/memory.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/entropy_encode.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/compress_fragment_two_pass.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/block_splitter.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/encode.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/cluster.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/backward_references.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/utf8_util.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/compress_fragment.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/brotli_bit_stream.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/bit_cost.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/static_dict.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/literal_cost.c \ - ../../external/corefx/src/Native/AnyOS/brotli/enc/metablock.c \ - ../../external/corefx/src/Native/AnyOS/brotli/dec/state.c \ - ../../external/corefx/src/Native/AnyOS/brotli/dec/decode.c \ - ../../external/corefx/src/Native/AnyOS/brotli/dec/huffman.c \ - ../../external/corefx/src/Native/AnyOS/brotli/dec/bit_reader.c \ - ../../external/corefx/src/Native/AnyOS/brotli/common/dictionary.c - -macos_sources = $(unix_sources) - -ios_sources = \ - pal-icalls.h \ - pal-icalls.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_io.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_io.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_networking.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_networking.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_tcpstate.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_tcpstate.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_random.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_random.h - -linux_sources = $(unix_sources) - -aix_sources = $(unix_sources) - -freebsd_sources = $(unix_sources) - -netbsd_sources = $(unix_sources) - -haiku_sources = $(unix_sources) - -android_sources = \ - pal-android.h \ - pal-android.c \ - pal-icalls.h \ - pal-icalls.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_io.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_io.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_networkstatistics.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_networkstatistics.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_random.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_random.h - - -unix_sources = \ - pal-icalls.h \ - pal-icalls.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_io.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_io.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_networking.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_networking.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_networkstatistics.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_networkstatistics.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_tcpstate.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_tcpstate.h \ - ../../external/corefx/src/Native/Unix/System.Native/pal_random.c \ - ../../external/corefx/src/Native/Unix/System.Native/pal_random.h - -gss_sources = \ - ../../external/corefx/src/Native/Unix/System.Net.Security.Native/pal_gssapi.c \ - ../../external/corefx/src/Native/Unix/System.Net.Security.Native/pal_gssapi.h - -if ENABLE_GSS -macos_sources += $(gss_sources) -linux_sources += $(gss_sources) -ios_sources += $(gss_sources) -android_sources += $(gss_sources) -endif - -EXTRA_libmono_native_la_SOURCES = $(common_sources) $(macos_sources) $(ios_sources) $(linux_sources) $(aix_sources) $(freebsd_sources) $(netbsd_sources) $(haiku_sources) $(unix_sources) $(gss_sources) - -if MONO_NATIVE_PLATFORM_MACOS -platform_sources = $(macos_sources) -else -if MONO_NATIVE_PLATFORM_IOS -platform_sources = $(ios_sources) -else -if MONO_NATIVE_PLATFORM_LINUX -platform_sources = $(linux_sources) -else -if MONO_NATIVE_PLATFORM_AIX -platform_sources = $(aix_sources) -else -if MONO_NATIVE_PLATFORM_ANDROID -platform_sources = $(android_sources) -else -if MONO_NATIVE_PLATFORM_FREEBSD -platform_sources = $(freebsd_sources) -else -if MONO_NATIVE_PLATFORM_NETBSD -platform_sources = $(netbsd_sources) -else -if MONO_NATIVE_PLATFORM_HAIKU -platform_sources = $(haiku_sources) -endif -endif -endif -endif -endif -endif -endif -endif - -common_cppflags = -I$(top_srcdir) -I$(top_srcdir)/mono - -common_cflags = \ - -I$(abs_top_srcdir)/external/corefx/src/Native/Unix/Common \ - -I$(abs_top_srcdir)/external/corefx/src/Native/Unix/System.Native \ - -I$(abs_top_srcdir)/external/corefx/src/Native/AnyOS/brotli/include \ - $(GLIB_CFLAGS) \ - $(SHARED_CFLAGS) \ - -DBROTLI_BUILD_NO_RBIT \ - -Wno-typedef-redefinition - -endif # !ENABLE_MSVC_ONLY - -# clear these flags as we set values for each target separately and automake always appends CFLAGS -CFLAGS= -CPPFLAGS= -CXXFLAGS= -LDFLAGS= -CCASFLAGS= - -if !ENABLE_MSVC_ONLY - -libmono_native_la_SOURCES = $(common_sources) $(platform_sources) platform-type.c - -libmono_native_la_CFLAGS = $(MONO_NATIVE_CFLAGS) $(common_cflags) - -libmono_native_la_CPPFLAGS = $(MONO_NATIVE_CPPFLAGS) $(common_cppflags) - -libmono_native_la_CXXFLAGS = $(MONO_NATIVE_CXXFLAGS) - -libmono_native_la_LDFLAGS = $(MONO_NATIVE_LDFLAGS) - -libmono_native_la_CCASFLAGS = $(MONO_NATIVE_CCASFLAGS) - -libmono_native_la_LIBADD = $(MONO_NATIVE_LIBADD) - -libmono_native_compat_la_SOURCES = $(common_sources) $(platform_sources) platform-type-compat.c - -libmono_native_compat_la_CFLAGS = $(MONO_NATIVE_COMPAT_CFLAGS) $(common_cflags) - -libmono_native_compat_la_CPPFLAGS = $(MONO_NATIVE_COMPAT_CPPFLAGS) $(common_cppflags) - -libmono_native_compat_la_CXXFLAGS = $(MONO_NATIVE_COMPAT_CXXFLAGS) - -libmono_native_compat_la_LDFLAGS = $(MONO_NATIVE_COMPAT_LDFLAGS) - -libmono_native_compat_la_CCASFLAGS = $(MONO_NATIVE_COMPAT_CCASFLAGS) - -libmono_native_compat_la_LIBADD = $(MONO_NATIVE_LIBADD) - -libmono_native_unified_la_SOURCES = $(common_sources) $(platform_sources) platform-type-unified.c - -libmono_native_unified_la_CFLAGS = $(MONO_NATIVE_UNIFIED_CFLAGS) $(common_cflags) - -libmono_native_unified_la_CPPFLAGS = $(MONO_NATIVE_UNIFIED_CPPFLAGS) $(common_cppflags) - -libmono_native_unified_la_CXXFLAGS = $(MONO_NATIVE_UNIFIED_CXXFLAGS) - -libmono_native_unified_la_LDFLAGS = $(MONO_NATIVE_UNIFIED_LDFLAGS) - -libmono_native_unified_la_CCASFLAGS = $(MONO_NATIVE_UNIFIED_CCASFLAGS) - -libmono_native_unified_la_LIBADD = $(MONO_NATIVE_LIBADD) - -test-bundle-local: - mkdir -p $(TEST_BUNDLE_PATH) - cp -L .libs/libmono-native$(libsuffix) $(TEST_BUNDLE_PATH)/ - -endif # !ENABLE_MSVC_ONLY diff --git a/src/mono/mono/native/mono-native-platform.c b/src/mono/mono/native/mono-native-platform.c deleted file mode 100644 index a269c239fb161f..00000000000000 --- a/src/mono/mono/native/mono-native-platform.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include "mono/utils/mono-threads-api.h" -#include "mono/utils/atomic.h" -#include "mono/metadata/icall-internals.h" - -#include "mono-native-platform.h" - -extern MonoNativePlatformType mono_native_platform_type; -volatile static gboolean module_initialized; -volatile static gint32 module_counter; - -int32_t -mono_native_get_platform_type (void) -{ - return mono_native_platform_type; -} - -static int32_t -ves_icall_MonoNativePlatform_IncrementInternalCounter (void) -{ - return mono_atomic_inc_i32 (&module_counter); -} - -int32_t -mono_native_is_initialized (void) -{ - return module_initialized; -} - -void -mono_native_initialize (void) -{ - if (mono_atomic_cas_i32 (&module_initialized, TRUE, FALSE) != FALSE) - return; - - mono_add_internal_call_with_flags ("Mono.MonoNativePlatform::IncrementInternalCounter", ves_icall_MonoNativePlatform_IncrementInternalCounter, TRUE); -} diff --git a/src/mono/mono/native/mono-native-platform.h b/src/mono/mono/native/mono-native-platform.h deleted file mode 100644 index c9575da293e5a6..00000000000000 --- a/src/mono/mono/native/mono-native-platform.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#include "mono/utils/mono-publib.h" - -// Keep in sync with mcs/class/corlib/Test/Mono/MonoNativePlatformType.cs - -typedef enum { - MONO_NATIVE_PLATFORM_TYPE_UNKNOWN = 0, - MONO_NATIVE_PLATFORM_TYPE_MACOS = 1, - MONO_NATIVE_PLATFORM_TYPE_IOS = 2, - MONO_NATIVE_PLATFORM_TYPE_LINUX = 3, - MONO_NATIVE_PLATFORM_TYPE_AIX = 4, - MONO_NATIVE_PLATFORM_TYPE_ANDROID = 5, - MONO_NATIVE_PLATFORM_TYPE_FREEBSD = 6, - MONO_NATIVE_PLATFORM_TYPE_HAIKU = 7, - MONO_NATIVE_PLATFORM_TYPE_NETBSD = 8, - - MONO_NATIVE_PLATFORM_TYPE_IPHONE = 0x100, - MONO_NATIVE_PLATFORM_TYPE_TV = 0x200, - MONO_NATIVE_PLATFORM_TYPE_WATCH = 0x400, - - MONO_NATIVE_PLATFORM_TYPE_COMPAT = 0x1000, - MONO_NATIVE_PLATFORM_TYPE_UNIFIED = 0x2000, - - MONO_NATIVE_PLATFORM_TYPE_SIMULATOR = 0x4000, - MONO_NATIVE_PLATFORM_TYPE_DEVICE = 0x8000 -} MonoNativePlatformType; - -MONO_API int32_t -mono_native_get_platform_type (void); - -MONO_API int32_t -mono_native_is_initialized (void); - -MONO_API void -mono_native_initialize (void); diff --git a/src/mono/mono/native/pal-android.c b/src/mono/mono/native/pal-android.c deleted file mode 100644 index 3db94bd484d54e..00000000000000 --- a/src/mono/mono/native/pal-android.c +++ /dev/null @@ -1,7 +0,0 @@ -/** - * \file - * System.Native PAL internal calls (Android) - * Adapter code between the Mono runtime and the CoreFX Platform Abstraction Layer (PAL) - * Copyright 2018 Microsoft - * Licensed under the MIT license. See LICENSE file in the project root for full license information. -*/ diff --git a/src/mono/mono/native/pal-android.h b/src/mono/mono/native/pal-android.h deleted file mode 100644 index 5de4ca375e2fc0..00000000000000 --- a/src/mono/mono/native/pal-android.h +++ /dev/null @@ -1,18 +0,0 @@ -/** - * \file - * System.Native PAL internal calls (Android) - * Adapter code between the Mono runtime and the CoreFX Platform Abstraction Layer (PAL) - * Copyright 2018 Microsoft - * Licensed under the MIT license. See LICENSE file in the project root for full license information. -*/ - -#include "pal_compiler.h" - -/** - * Reads the number of bytes specified into the provided buffer from the specified, opened file descriptor. - * - * Returns the number of bytes read on success; otherwise, -1 is returned an errno is set. - * - * Note - on fail. the position of the stream may change depending on the platform; consult man 2 read for more info - */ -DLLEXPORT int32_t SystemNative_Read(intptr_t fd, void* buffer, int32_t bufferSize); diff --git a/src/mono/mono/native/pal-icalls.c b/src/mono/mono/native/pal-icalls.c deleted file mode 100644 index 895ad6464f0608..00000000000000 --- a/src/mono/mono/native/pal-icalls.c +++ /dev/null @@ -1,82 +0,0 @@ -/** - * \file - * System.Native PAL internal calls - * Adapter code between the Mono runtime and the CoreFX Platform Abstraction Layer (PAL) - * Copyright 2018 Microsoft - * Licensed under the MIT license. See LICENSE file in the project root for full license information. -*/ - -#if !defined (HOST_WATCHOS) && !defined (HOST_TVOS) /* These platforms don't support async suspend and do not need this code for now */ - -#include -#include -#include "mono/utils/mono-threads-api.h" -#include "mono/utils/atomic.h" -#include "mono/metadata/icall-internals.h" -#include "pal-icalls.h" - - -/* - * mono_pal_init: - * - * Initializes Mono's usage of the PAL (probably just by registering the necessary internal calls). - * This is called only from managed code, by any Interop.* classes that need to use the code here. - * The function may be called multiple times. - * - */ -void -mono_pal_init (void) -{ - volatile static gboolean module_initialized = FALSE; - if (mono_atomic_cas_i32 (&module_initialized, TRUE, FALSE) == FALSE) { - mono_add_internal_call_with_flags ("Interop/Sys::Read", ves_icall_Interop_Sys_Read, TRUE); - -#if defined(__APPLE__) - mono_add_internal_call_with_flags ("Interop/RunLoop::CFRunLoopRun", ves_icall_Interop_RunLoop_CFRunLoopRun, TRUE); -#endif - } - -} - -gint32 -ves_icall_Interop_Sys_Read (intptr_t fd, gchar* buffer, gint32 count) -{ - gint32 result; - MONO_ENTER_GC_SAFE; - result = SystemNative_Read (fd, buffer, count); - mono_marshal_set_last_error (); - MONO_EXIT_GC_SAFE; - return result; -} - -#if defined(__APPLE__) - -#include - -static void -interrupt_CFRunLoop (gpointer data) -{ - g_assert (data); - CFRunLoopStop ((CFRunLoopRef)data); -} - -void -ves_icall_Interop_RunLoop_CFRunLoopRun (void) -{ - gpointer runloop_ref = CFRunLoopGetCurrent (); - gboolean interrupted; - mono_thread_info_install_interrupt (interrupt_CFRunLoop, runloop_ref, &interrupted); - - if (interrupted) - return; - - MONO_ENTER_GC_SAFE; - CFRunLoopRun (); - MONO_EXIT_GC_SAFE; - - mono_thread_info_uninstall_interrupt (&interrupted); -} - -#endif - -#endif /* !defined (HOST_WATCHOS) && !defined (HOST_TVOS) */ diff --git a/src/mono/mono/native/pal-icalls.h b/src/mono/mono/native/pal-icalls.h deleted file mode 100644 index 25dfd7ab4230ba..00000000000000 --- a/src/mono/mono/native/pal-icalls.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * \file - * System.Native PAL internal calls - * Adapter code between the Mono runtime and the CoreFX Platform Abstraction Layer (PAL) - * Copyright 2018 Microsoft - * Licensed under the MIT license. See LICENSE file in the project root for full license information. -*/ - -#ifndef __MONO_METADATA_PAL_ICALLS_H__ -#define __MONO_METADATA_PAL_ICALLS_H__ - -#include "mono/metadata/metadata.h" -#include "mono/metadata/class-internals.h" - -MONO_API void mono_pal_init (void); - -extern void mono_marshal_set_last_error (void); -extern int32_t SystemNative_Read(intptr_t fd, void* buffer, int32_t bufferSize); -gint32 ves_icall_Interop_Sys_Read (intptr_t fd, gchar* buffer, gint32 count); - -#if defined(__APPLE__) -extern void mono_thread_info_install_interrupt (void (*callback) (gpointer data), gpointer data, gboolean *interrupted); -extern void mono_thread_info_uninstall_interrupt (gboolean *interrupted); -void ves_icall_Interop_RunLoop_CFRunLoopRun (void); -#endif - -#endif diff --git a/src/mono/mono/native/pal_config.h b/src/mono/mono/native/pal_config.h deleted file mode 100644 index 44fd5e50253124..00000000000000 --- a/src/mono/mono/native/pal_config.h +++ /dev/null @@ -1,8 +0,0 @@ -#include - -#define MONO 1 -/* clock_gettime () is found by configure on Apple builds, but its only present from ios 10, macos 10.12, tvos 10 and watchos 3 */ -#if defined (TARGET_WASM) || defined (TARGET_IOS) || defined (TARGET_OSX) || defined (TARGET_WATCHOS) || defined (TARGET_TVOS) -#undef HAVE_CLOCK_MONOTONIC -#undef HAVE_CLOCK_MONOTONIC_COARSE -#endif diff --git a/src/mono/mono/native/platform-type-compat.c.in b/src/mono/mono/native/platform-type-compat.c.in deleted file mode 100644 index 3e1116cf4d8dc4..00000000000000 --- a/src/mono/mono/native/platform-type-compat.c.in +++ /dev/null @@ -1,3 +0,0 @@ -#include "mono-native-platform.h" - -MonoNativePlatformType mono_native_platform_type = @MONO_NATIVE_PLATFORM_TYPE_COMPAT@; diff --git a/src/mono/mono/native/platform-type-unified.c.in b/src/mono/mono/native/platform-type-unified.c.in deleted file mode 100644 index 031926ea2de7f4..00000000000000 --- a/src/mono/mono/native/platform-type-unified.c.in +++ /dev/null @@ -1,4 +0,0 @@ -#include "mono-native-platform.h" - -MonoNativePlatformType mono_native_platform_type = @MONO_NATIVE_PLATFORM_TYPE_UNIFIED@; - diff --git a/src/mono/mono/native/platform-type.c.in b/src/mono/mono/native/platform-type.c.in deleted file mode 100644 index cb5cd81789a78f..00000000000000 --- a/src/mono/mono/native/platform-type.c.in +++ /dev/null @@ -1,3 +0,0 @@ -#include "mono-native-platform.h" - -MonoNativePlatformType mono_native_platform_type = @MONO_NATIVE_PLATFORM_TYPE@; diff --git a/src/mono/mono/profiler/.gitignore b/src/mono/mono/profiler/.gitignore index add52fd4a78a2e..96fff604757c91 100644 --- a/src/mono/mono/profiler/.gitignore +++ b/src/mono/mono/profiler/.gitignore @@ -1,4 +1,3 @@ -/Makefile /*.a /*.la /*.lo diff --git a/src/mono/mono/profiler/Makefile.am b/src/mono/mono/profiler/Makefile.am deleted file mode 100644 index 0e91101ab9d1fb..00000000000000 --- a/src/mono/mono/profiler/Makefile.am +++ /dev/null @@ -1,227 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -if !ENABLE_MSVC_ONLY - -AM_CPPFLAGS = \ - -DSUPPRESSION_DIR=\""$(datadir)/mono-$(API_VER)/mono/profiler"\" \ - -I$(top_srcdir) \ - $(GLIB_CFLAGS) \ - $(SHARED_CFLAGS) - -glib_libs = $(top_builddir)/mono/eglib/libeglib.la - -prof_ldflags = $(CCLDFLAGS) - -if !HOST_WIN32 -if !DISABLE_LIBRARIES -if !DISABLE_PROFILER - -if !DISABLE_EXECUTABLES -bin_PROGRAMS = mprof-report -endif - -if HAVE_VTUNE -vtune_libs = \ - libmono-profiler-vtune.la \ - libmono-profiler-vtune-static.la -endif - -lib_LTLIBRARIES = \ - libmono-profiler-aot.la \ - libmono-profiler-aot-static.la \ - libmono-profiler-log.la \ - libmono-profiler-log-static.la \ - libmono-profiler-coverage.la \ - libmono-profiler-coverage-static.la \ - $(vtune_libs) - -suppressiondir = $(datadir)/mono-$(API_VER)/mono/profiler -suppression_DATA = mono-profiler-coverage.suppression - -# FIXME: The profiler tests currently don't work with coop because the -# sampling infrastructure depends on signals being available. -# -# See: https://bugzilla.xamarin.com/show_bug.cgi?id=57011 -if !ENABLE_COOP_SUSPEND -check_targets = run-test -endif - -endif -endif -endif - -# On Apple hosts, we want to allow undefined symbols when building the -# profiler modules as, just like on Linux, we don't link them to libmono, -# but rather let the dynamic linker sort things out. -# -# Bitcode, specifically, doesn't allow undefined symbols at all, even for -# shared libraries, so we want errors if the profiler modules contain any. -if HOST_DARWIN -if BITCODE -prof_ldflags += -no-undefined -else -prof_ldflags += -Wl,-undefined -Wl,suppress -Wl,-flat_namespace -endif -endif - -# Versioned libraries are problematic on Android. In particular, we're not -# allowed to place versioned libraries inside APKs, so if libmono and the -# profiler modules contain versioned sonames, things will fail to resolve -# at runtime. -if HOST_ANDROID -prof_ldflags += -avoid-version -endif - -# Linking to libmono on desktop can cause problems when loading a profiler -# module into a statically-linked mono executable, e.g. running library -# constructors multiple times, which can easily break LLVM libraries. So, -# we don't want to link to libmono on desktop. On Android, libmono is -# always loaded dynamically, so we do need to link to libmono there or the -# dynamic linker will have trouble resolving everything. On iOS, the story -# is similar to Android when running in the simulator. -if HOST_ANDROID -libmono_dep = $(top_builddir)/mono/mini/$(LIBMONO_LA) -else -if HOST_IOS -# Note that BITCODE implies HOST_IOS, so this case ensures that we link to -# libmono when building a bitcode runtime. -libmono_dep = $(top_builddir)/mono/mini/$(LIBMONO_LA) -else -if HOST_TIZEN -libmono_dep = $(top_builddir)/mono/mini/$(LIBMONO_LA) -else -# BITCODE => -no-undefined -if HOST_DARWIN -if BITCODE -libmono_dep = $(top_builddir)/mono/mini/$(LIBMONO_LA) -else -libmono_dep = -endif -else -libmono_dep = -endif -endif -endif -endif - -if HAVE_STATIC_ZLIB -zlib_dep = $(STATIC_ZLIB_PATH) -else -if HAVE_SYS_ZLIB -# The log profiler uses zlib for output compression when available. -zlib_dep = -lz -else -zlib_dep = -endif -endif - -# We build a separate, static version of each profiler for use on targets -# which do not support dynamic linking (e.g. iOS). We still want to build -# the shared version on those targets since it's useful for e.g. simulator -# builds. - -libmono_profiler_aot_la_SOURCES = aot.c helper.c -libmono_profiler_aot_la_LIBADD = $(libmono_dep) $(glib_libs) -libmono_profiler_aot_la_LDFLAGS = $(prof_ldflags) -libmono_profiler_aot_static_la_SOURCES = aot.c helper.c -libmono_profiler_aot_static_la_LDFLAGS = -static - -libmono_profiler_log_la_SOURCES = log.c log-args.c helper.c -libmono_profiler_log_la_LIBADD = $(libmono_dep) $(glib_libs) $(zlib_dep) -libmono_profiler_log_la_LDFLAGS = $(prof_ldflags) -libmono_profiler_log_static_la_SOURCES = log.c log-args.c helper.c -libmono_profiler_log_static_la_LDFLAGS = -static - -libmono_profiler_coverage_la_SOURCES = coverage.c -libmono_profiler_coverage_la_LIBADD = $(libmono_dep) $(glib_libs) -libmono_profiler_coverage_la_LDFLAGS = $(prof_ldflags) -libmono_profiler_coverage_static_la_SOURCES = coverage.c -libmono_profiler_coverage_static_la_LDFLAGS = -static - -if HAVE_VTUNE -libmono_profiler_vtune_la_SOURCES = vtune.c -libmono_profiler_vtune_la_CFLAGS = $(VTUNE_CFLAGS) -libmono_profiler_vtune_la_LIBADD = $(VTUNE_LIBS) $(libmono_dep) $(glib_libs) -libmono_profiler_vtune_la_LDFLAGS = $(prof_ldflags) -libmono_profiler_vtune_static_la_SOURCES = vtune.c -libmono_profiler_vtune_static_la_LDFLAGS = -static -libmono_profiler_vtune_static_la_CFLAGS = $(VTUNE_CFLAGS) -libmono_profiler_vtune_static_la_LIBADD = $(VTUNE_LIBS) -endif - -mprof_report_SOURCES = mprof-report.c -mprof_report_LDADD = $(glib_libs) $(zlib_dep) -mprof_report_LDFLAGS = -no-undefined - -noinst_LTLIBRARIES = libproftest_pinvokes.la - -libproftest_pinvokes_la_SOURCES = proftest-pinvokes.c -if HOST_WIN32 -# (borrowed from mono/tests/Makefile.am libtest_la_LDFLAGS) -# the exported names created by gcc for stdcall functions are missing the leading _, so MS.NET -# can't find them. So we use --kill-at to remove the @ suffix as well. -libproftest_pinvokes_la_LDFLAGS = -no-undefined -rpath `pwd` $(CCLDFLAGS) -Wl,--kill-at -else -libproftest_pinvokes_la_LDFLAGS = -no-undefined -rpath `pwd` $(CCLDFLAGS) -endif - - -PLOG_TESTS_SRC = \ - test-alloc.cs \ - test-busy.cs \ - test-monitor.cs \ - test-excleave.cs \ - test-heapshot.cs \ - test-pinvokes.cs \ - test-traces.cs - -PLOG_TESTS = $(PLOG_TESTS_SRC:.cs=.exe) - -CLASS = $(mcs_topdir)/class/lib/$(DEFAULT_PROFILE) -TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper -MCS = $(TOOLS_RUNTIME) $(CSC) -lib:$(CLASS) -unsafe -nologo -noconfig -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug:portable - -%.exe: %.cs - $(MCS) -out:$@ $< - -test-pinvokes.exe: libproftest_pinvokes.la - -test-local: $(PLOG_TESTS) - -test-bundle-local: - mkdir -p $(TEST_BUNDLE_PATH)/tests/profiler/ - cp -L .libs/libmono-profiler-log$(libsuffix) $(TEST_BUNDLE_PATH)/ - cp -L $(PLOG_TESTS) $(TEST_BUNDLE_PATH)/tests/profiler/ - cp -L .libs/libproftest_pinvokes$(libsuffix) $(TEST_BUNDLE_PATH)/tests/profiler/ - cp -L ptestrunner.pl $(TEST_BUNDLE_PATH)/tests/profiler/ - cp -L mprof-report $(TEST_BUNDLE_PATH)/ - chmod +x $(TEST_BUNDLE_PATH)/mprof-report - -run-test: test - MONO_PATH=$(CLASS) perl $(srcdir)/ptestrunner.pl $(top_builddir) nunit TestResult-profiler.xml - -check-local: $(check_targets) - -EXTRA_DIST = \ - log.h \ - aot.h \ - helper.h \ - $(PLOG_TESTS_SRC) \ - ptestrunner.pl \ - $(suppression_DATA) - -endif # !ENABLE_MSVC_ONLY - -if ENABLE_MSVC_ONLY - -all-local: - - $(MAKE) -C $(top_srcdir)/msvc mprof-report - cp -f $(mono_msvc_build_bin_dir)/mprof-report$(EXEEXT) ./mprof-report$(EXEEXT) - -clean-local: - - $(MAKE) -C $(top_srcdir)/msvc clean-mprof-report - rm ./mprof-report$(EXEEXT) - -endif # ENABLE_MSVC_ONLY diff --git a/src/mono/mono/sgen/.gitignore b/src/mono/mono/sgen/.gitignore index 70fc4fd1ec483f..1101903e8c34c5 100644 --- a/src/mono/mono/sgen/.gitignore +++ b/src/mono/mono/sgen/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.libs /.deps /*.lo diff --git a/src/mono/mono/sgen/Makefile.am b/src/mono/mono/sgen/Makefile.am deleted file mode 100644 index 875f29be992886..00000000000000 --- a/src/mono/mono/sgen/Makefile.am +++ /dev/null @@ -1,83 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -if !ENABLE_MSVC_ONLY - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS) - -if SUPPORT_SGEN -shared_libraries = libmonosgen.la -endif - -noinst_LTLIBRARIES = $(shared_libraries) - -monosgen_sources = \ - gc-internal-agnostic.h \ - sgen-alloc.c \ - sgen-archdep.h \ - sgen-cardtable.c \ - sgen-cardtable.h \ - sgen-client.h \ - sgen-conf.h \ - sgen-copy-object.h \ - sgen-debug.c \ - sgen-descriptor.c \ - sgen-descriptor.h \ - sgen-fin-weak-hash.c \ - sgen-gc.c \ - sgen-gc.h \ - sgen-gchandles.c \ - sgen-gray.c \ - sgen-gray.h \ - sgen-hash-table.c \ - sgen-hash-table.h \ - sgen-internal.c \ - sgen-layout-stats.c \ - sgen-layout-stats.h \ - sgen-los.c \ - sgen-major-copy-object.h \ - sgen-marksweep-drain-gray-stack.h \ - sgen-marksweep.c \ - sgen-memory-governor.c \ - sgen-memory-governor.h \ - sgen-minor-copy-object.h \ - sgen-minor-scan-object.h \ - sgen-nursery-allocator.c \ - sgen-pinning-stats.c \ - sgen-pinning.c \ - sgen-pinning.h \ - sgen-pointer-queue.c \ - sgen-pointer-queue.h \ - sgen-array-list.h \ - sgen-array-list.c \ - sgen-protocol-def.h \ - sgen-protocol.c \ - sgen-protocol.h \ - sgen-qsort.c \ - sgen-qsort.h \ - sgen-scan-object.h \ - sgen-simple-nursery.c \ - sgen-split-nursery.c \ - sgen-tagged-pointer.h \ - sgen-thread-pool.c \ - sgen-thread-pool.h \ - sgen-workers.c \ - sgen-workers.h - -libmonosgen_la_SOURCES = $(monosgen_sources) -libmonosgen_la_CFLAGS = $(SGEN_DEFINES) - -endif # !ENABLE_MSVC_ONLY - -CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) @CXX_ADD_CFLAGS@ - -if ENABLE_MSVC_ONLY - -all-local: - - make -C $(top_srcdir)/msvc libgcmonosgen - -clean-local: - - make -C $(top_srcdir)/msvc clean-libgcmonosgen - -endif # ENABLE_MSVC_ONLY diff --git a/src/mono/mono/tests/.gitignore b/src/mono/mono/tests/.gitignore index d4b5120d85cb42..994220957077e4 100644 --- a/src/mono/mono/tests/.gitignore +++ b/src/mono/mono/tests/.gitignore @@ -1,5 +1,3 @@ -/Makefile.in -/Makefile /*.stdout /*.stderr /*.aotlog diff --git a/src/mono/mono/tests/Makefile.am b/src/mono/mono/tests/Makefile.am deleted file mode 100755 index 29bd9ec8d3bd65..00000000000000 --- a/src/mono/mono/tests/Makefile.am +++ /dev/null @@ -1,3270 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -SUBDIRS = gc-descriptors . testing_gac assembly-load-reference llvmonly-mixed fullaot-mixed - -check-local: - ok=:; \ - $(MAKE) test-tailcall || ok=false; \ - if test x$(IGNORE_TEST_JIT) == x; then $(MAKE) test-jit || ok=false; fi; \ - $(MAKE) test-generic-sharing || ok=false; \ - $(MAKE) test-type-load || ok=false; \ - $(MAKE) test-multi-netmodule || ok=false; \ - $(MAKE) test-cattr-type-load || ok=false; \ - $(MAKE) test-reflection-load-with-context || ok=false; \ - $(MAKE) test-platform || ok=false; \ - $(MAKE) test-console-output || ok=false; \ - $(MAKE) test-env-options || ok=false; \ - $(MAKE) test-unhandled-exception-2 || ok=false; \ - $(MAKE) test-appdomain-unload || ok=false; \ - $(MAKE) test-process-stress || ok=false; \ - $(MAKE) test-pedump || ok=false; \ - $(MAKE) test-internalsvisibleto || ok=false; \ - $(MAKE) rm-empty-logs || ok=false; \ - $(MAKE) runtest-gac-loading || ok=false; \ - $(MAKE) runtest-assembly-load-reference || ok=false; \ - $$ok - -BUILT_SOURCES = - -ARRAY_COOP_CS=\ - array-coop-bigvt.cs \ - array-coop-int.cs \ - array-coop-smallvt.cs - -BUILT_SOURCES += $(ARRAY_COOP_CS) - -array-coop-bigvt.cs: array-coop-bigvt.sh array-coop-1.cs array-coop-2.cs - $(srcdir)/array-coop-bigvt.sh $(srcdir) > $@ - -array-coop-smallvt.cs: array-coop-smallvt.sh array-coop-1.cs array-coop-2.cs - $(srcdir)/array-coop-smallvt.sh $(srcdir) > $@ - -array-coop-int.cs: array-coop-int.sh array-coop-1.cs array-coop-2.cs - $(srcdir)/array-coop-int.sh $(srcdir) > $@ - -# These are not actually tests, but they are source files part of another test. -TAILCALL_DISABLED_TESTS_COMPILE = \ - tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyTransparentLibraryWithPrefix.exe \ - tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyVerifiableLibraryWithPrefix.exe - -# FIXME valuetype parameter. -TAILCALL_DISABLED_TESTS_COMPILE += \ - tailcall/coreclr/JIT/opt/ETW/TailCallCases.exe - -# FIXME Some of these sound like negative tests -- "badtailcall". Verify and automate. -# FIXME investigate and explain every test failure. -TAILCALL_DISABLED_TESTS_RUN = \ - tailcall/coreclr/JIT/Directed/IL/PInvokeTail/tailwinapi.exe \ - tailcall/coreclr/JIT/Directed/IL/Tailcall/Jittailcall2.exe \ - tailcall/coreclr/JIT/Directed/IL/mutualrecur-tailcall/MutualRecur-TailCall.exe \ - tailcall/coreclr/JIT/Directed/coverage/importer/Desktop/badtailcall.exe \ - tailcall/coreclr/JIT/Directed/coverage/importer/badtailcall.exe \ - tailcall/coreclr/JIT/Directed/pinvoke/tail.exe \ - tailcall/coreclr/JIT/IL_Conformance/Old/Base/tailcall.exe \ - tailcall/coreclr/JIT/Methodical/Invoke/fptr/recurse_tail_call.exe \ - tailcall/coreclr/JIT/Methodical/Invoke/fptr/recurse_tail_calli.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_array.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_array_nz.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/gcval_nested.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/pointer_i.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/pointer.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/reference_i.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/test_implicit.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/test_mutual_rec.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/test_switch.exe \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/delegateTail.exe \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/hijacking.exe \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/smallFrame.exe \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/tailcall_AV.exe \ - tailcall/coreclr/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102844/tailcallcalli.exe \ - tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyWithPrefix.exe \ - $(TAILCALL_DISABLED_TESTS_COMPILE) - -# FIXME investigate and explain every test failure. -TAILCALL_DISABLED_TESTS_RUN += \ - tailcall/coreclr/JIT/Methodical/Boxing/misc/tailjump.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_gc.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_inst.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_value.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_virt.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/gcval.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/gcval_sideeffect.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/test_3b.exe \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/delegateParamCallTarget.exe - -if X86 -TAILCALL_DISABLED_TESTS_RUN += tailcall/coreclr/JIT/Methodical/nonvirtualcall/tailcall.exe -endif - -if FULL_AOT_TESTS - -# FullAOT Assertion at method-to-ir.c:9203, condition `*ip == CEE_RET' not met -# This should raise a bad image format exception. -TAILCALL_DISABLED_TESTS_COMPILE += \ - tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyWithPrefix.exe - -# return type mismatch (float32 vs. float64) -# tailcall/coreclr/JIT/Methodical/tailcall/compat_r8_r4_inl.exe -# tailcall/coreclr/JIT/Methodical/tailcall/compat_r4_r8_inl.exe -# -# return type mismatch (int32 vs. enum) -# tailcall/coreclr/JIT/Methodical/tailcall/compat_enum.exe -# -# FIXME depends on msvcrt.dll, and calli -# tailcall/coreclr/JIT/Directed/IL/PInvokeTail/PInvokeTail.exe -# -# FIXME reference parameter; requires range check to allow -# tailcall/coreclr/JIT/Directed/zeroinit/tail.exe - -# Tests that fail assert about tailcall. -TAILCALL_DISABLED_TESTS_RUN += \ - tailcall/coreclr/JIT/Directed/IL/PInvokeTail/tailwinapi.exe \ - tailcall/coreclr/JIT/Directed/pinvoke/tail.exe \ - tailcall/coreclr/JIT/Methodical/Invoke/fptr/recurse_tail_call.exe \ - tailcall/coreclr/JIT/Methodical/Invoke/fptr/recurse_tail_calli.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/Desktop/thread-race.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_array_nz.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/pointer.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/reference_i.exe \ - tailcall/coreclr/JIT/Methodical/tailcall/test_mutual_rec.exe \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/delegateTail.exe \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/tailcall_AV.exe \ - tailcall/coreclr/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102844/tailcallcalli.exe - -# This test is also slow, though its sleep can be dialed down. -#TAILCALL_DISABLED_TESTS_RUN += tailcall/coreclr/JIT/Methodical/tailcall_v4/hijacking.exe - -endif - -compile-tailcall: $(TESTS_TAILCALL_COMPILE) $(TESTSAOT_TAILCALL) - -if FULL_AOT_TESTS - -# FullAOT does not allow --compile-all. - -else - -TEST_TAILCALL_COMPILE_ALL=--runtime-args "--compile-all" - -endif - -test-tailcall: compile-tailcall test-runner.exe - MONO_DEBUG=test-tailcall-require $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j a $(TEST_TAILCALL_COMPILE_ALL) --testsuite-name "runtime-tailcall" --timeout 300 --disabled "$(DISABLED_TESTS)" $(TESTS_TAILCALL_RUN) - -check-full: - ok=; \ - $(MAKE) test-sgen || ok=false; \ - $(MAKE) check-local || ok=false; \ - $$ok - -check-parallel: - ok=; \ - $(MAKE) compile-tests; \ - $(MAKE) check-full || ok=false; \ - $$ok - -check-coreclr: - $(MAKE) -C $(mono_build_root)/acceptance-tests check-coreclr - -check-stress: - ok=; \ - $(MAKE) test-stress-sgen || ok=false; \ - $(MAKE) stresstest || ok=false; \ - $$ok - -# for backwards compatibility on Wrench -test-wrench: check-parallel - -aotcheck: testaot gshared-aot - -if HOST_WIN32 -JITTEST_PROG = $(top_builddir)/runtime/mono-wrapper -else -JITTEST_PROG = $(if $(VALGRIND), valgrind $(VALGRIND_ARGS),) $(if $(SGEN),$(top_builddir)/mono/mini/mono-sgen,$(top_builddir)/mono/mini/mono) -endif - -JITTEST_PROG_RUN = MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode=execute $(JITTEST_PROG) - -RUNTIME_ARGS=--config tests-config --optimize=all --debug -TEST_RUNTIME_ARGS ?= $(RUNTIME_ARGS) -TEST_AOT_BUILD_FLAGS ?= $(AOT_BUILD_FLAGS) -TEST_AOT_RUN_FLAGS ?= $(AOT_RUN_FLAGS) - -CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE) - -with_mono_path = MONO_PATH=$(CLASS) - -RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper -TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper --aot-path=$(mcs_topdir)/class/lib/build - -MKBUNDLE = \ - PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \ - $(RUNTIME) $(CLASS)/mkbundle.exe - -if FULL_AOT_TESTS -PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY,FULL_AOT_DESKTOP -endif - -if HYBRID_AOT_TESTS -PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY -endif - -if FULL_AOT_INTERP_TESTS -PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY -endif - -MCS_NO_UNSAFE = $(TOOLS_RUNTIME) $(CSC) -debug:portable \ - -noconfig -nologo \ - -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \ - -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \ - -nowarn:0197 -langversion:latest $(PROFILE_MCS_FLAGS) -MCS_NO_LIB = $(MCS_NO_UNSAFE) -unsafe - -MCS = $(MCS_NO_LIB) - -ILASM = $(TOOLS_RUNTIME) $(mcs_topdir)/class/lib/build/ilasm.exe - -TEST_RUNNER = ./test-runner.exe - -if HOST_WIN32 -if ENABLE_MSVC -DEFAULT_WIN32_RUNTIME=$(shell cygpath -w -a $(top_builddir)/@mono_runtime@ | sed 's/\\/\\\\/g') -else -DEFAULT_WIN32_RUNTIME=$(top_builddir)/runtime/mono-wrapper) -endif -TEST_RUNNER += --config tests-config --runtime "$(if $(MONO_EXECUTABLE),$(shell cygpath -w -a $(MONO_EXECUTABLE) | sed 's/\\/\\\\/g'),$(DEFAULT_WIN32_RUNTIME))" -else -TEST_RUNNER += --config tests-config --runtime "$(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),$(top_builddir)/runtime/mono-wrapper)" -endif - -TEST_RUNNER += --mono-path "$(CLASS)" - -if FULL_AOT_TESTS -TEST_RUNNER += --runtime-args "$(TEST_AOT_RUN_FLAGS)" -endif - -if HYBRID_AOT_TESTS -TEST_RUNNER += --runtime-args "$(TEST_AOT_RUN_FLAGS)" -endif - -TEST_RUNNER += --runtime-args "$(TEST_RUNTIME_FLAGS)" - -TEST_RUNNER += $(if $(V), --verbose,) - -TESTS_BENCH_SRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs - -TESTS_STRESS_SRC= \ - abort-stress-1.cs \ - abort-stress-2.cs \ - abort-stress-3.cs \ - domain-stress.cs \ - gchandle-stress.cs \ - monitor-stress.cs \ - thread-stress.cs \ - gc-stress.cs \ - gc-copy-stress.cs \ - gc-graystack-stress.cs \ - exit-stress.cs \ - process-stress.cs \ - spinlock-stress.cs \ - assembly-load-stress.cs - -# Disabled until ?mcs is fixed -# bug-331958.cs -TESTS_CS_SRC= \ - generic-unloading-sub.2.cs \ - create-instance.cs \ - bug-2907.cs \ - $(ARRAY_COOP_CS) \ - array-12193.cs \ - array-init.cs \ - arraylist.cs \ - assembly-load-remap.cs \ - assembly-load-bytes.cs \ - assembly-loadfile.cs \ - assembly-loadfrom.cs \ - assembly-load-bytes-bindingredirect.cs \ - assembly-loadfile-bindingredirect.cs \ - assembly-loadfrom-bindingredirect.cs \ - assembly-loadfrom-simplename.cs \ - assembly-refonly-load-bytes-bindingredirect.cs \ - assemblyresolve_event.cs \ - assemblyresolve_event3.cs \ - assemblyresolve_event4.cs \ - assemblyresolve_event5.cs \ - assemblyresolve_event6.cs \ - assemblyresolve_event7.cs \ - checked.cs \ - char-isnumber.cs \ - field-layout.cs \ - pack-layout.cs \ - pack-bug.cs \ - hash-table.cs \ - test-ops.cs \ - obj.cs \ - test-dup-mp.cs \ - string.cs \ - stringbuilder.cs \ - switch.cs \ - outparm.cs \ - delegate.cs \ - bitconverter.cs \ - exception.cs \ - exception2.cs \ - exception3.cs \ - exception4.cs \ - exception5.cs \ - exception6.cs \ - exception7.cs \ - exception8.cs \ - exception10.cs \ - exception11.cs \ - exception12.cs \ - exception13.cs \ - exception14.cs \ - exception15.cs \ - exception16.cs \ - exception17.cs \ - exception18.cs \ - exception-invokes.cs \ - merp-json-valid.cs \ - merp-crash-test.cs \ - exception19.cs \ - exception20.cs \ - exception21.cs \ - typeload-unaligned.cs \ - struct.cs \ - valuetype-gettype.cs \ - typeof-ptr.cs \ - static-constructor.cs \ - pinvoke.cs \ - pinvoke-utf8.cs \ - pinvoke3.cs \ - pinvoke11.cs \ - pinvoke13.cs \ - pinvoke17.cs \ - pinvoke-detach-1.cs \ - invoke.cs \ - invoke2.cs \ - runtime-invoke.cs \ - invoke-string-ctors.cs \ - reinit.cs \ - box.cs \ - array.cs \ - enum.cs \ - enum2.cs \ - enum-intrins.cs \ - property.cs \ - enumcast.cs \ - assignable-tests.cs \ - array-cast.cs \ - array-subtype-attr.cs \ - cattr-compile.cs \ - cattr-field.cs \ - cattr-object.cs \ - custom-attr.cs \ - double-cast.cs \ - newobj-valuetype.cs \ - arraylist-clone.cs \ - setenv.cs \ - vtype.cs \ - isvaluetype.cs \ - iface6.cs \ - iface7.cs \ - ipaddress.cs \ - array-vt.cs \ - interface1.cs \ - reflection-enum.cs \ - reflection-prop.cs \ - reflection4.cs \ - reflection5.cs \ - reflection-const-field.cs \ - many-locals.cs \ - string-compare.cs \ - test-prime.cs \ - test-tls.cs \ - params.cs \ - reflection.cs \ - interface.cs \ - interface-2.cs \ - dim-generic.cs \ - dim-issue-18917.cs \ - iface.cs \ - iface2.cs \ - iface3.cs \ - iface4.cs \ - iface-large.cs \ - iface-contravariant1.cs \ - virtual-method.cs \ - intptrcast.cs \ - indexer.cs \ - stream.cs \ - console.cs \ - shift.cs \ - jit-int.cs \ - jit-uint.cs \ - jit-long.cs \ - long.cs \ - jit-ulong.cs \ - jit-float.cs \ - pop.cs \ - time.cs \ - pointer.cs \ - hashcode.cs \ - delegate1.cs \ - delegate2.cs \ - delegate3.cs \ - delegate5.cs \ - delegate6.cs \ - delegate7.cs \ - delegate8.cs \ - delegate10.cs \ - delegate11.cs \ - delegate12.cs \ - delegate13.cs \ - delegate14.cs \ - delegate15.cs \ - delegate16.cs \ - delegate17.cs \ - delegate18.cs \ - largeexp.cs \ - largeexp2.cs \ - marshalbyref1.cs \ - static-ctor.cs \ - inctest.cs \ - bound.cs \ - array-invoke.cs \ - test-arr.cs \ - decimal.cs \ - decimal-array.cs \ - marshal.cs \ - marshal1.cs \ - marshal2.cs \ - marshal3.cs \ - marshal5.cs \ - marshal6.cs \ - marshal7.cs \ - marshal8.cs \ - marshal9.cs \ - marshalbool.cs \ - test-byval-in-struct.cs \ - thread.cs \ - thread5.cs \ - thread-static.cs \ - thread-static-init.cs \ - context-static.cs \ - float-pop.cs \ - interfacecast.cs \ - array3.cs \ - classinit.cs \ - classinit2.cs \ - classinit3.cs \ - synchronized.cs \ - async_read.cs \ - threadpool.cs \ - threadpool1.cs \ - threadpool-exceptions1.cs \ - threadpool-exceptions3.cs \ - threadpool-exceptions4.cs \ - threadpool-exceptions6.cs \ - base-definition.cs \ - bug-27420.cs \ - bug-46781.cs \ - bug-42136.cs \ - bug-59286.cs \ - bug-70561.cs \ - bug-78311.cs \ - bug-78653.cs \ - bug-78656.cs \ - bug-77127.cs \ - bug-323114.cs \ - bug-Xamarin-5278.cs \ - interlocked.cs \ - delegate-async-exit.cs \ - delegate-delegate-exit.cs \ - delegate-exit.cs \ - delegate-disposed-hashcode.cs \ - finalizer-abort.cs \ - finalizer-exception.cs \ - finalizer-exit.cs \ - finalizer-thread.cs \ - main-exit.cs \ - main-returns-abort-resetabort.cs \ - main-returns-background-abort-resetabort.cs \ - main-returns-background-resetabort.cs \ - main-returns-background.cs \ - main-returns-background-change.cs \ - main-returns.cs \ - subthread-exit.cs \ - desweak.cs \ - exists.cs \ - handleref.cs \ - install_eh_callback.cs \ - dbnull-missing.cs \ - test-type-ctor.cs \ - soft-float-tests.cs \ - thread-exit.cs \ - finalize-parent.cs \ - interlocked-2.2.cs \ - pinvoke-2.2.cs \ - bug-78431.2.cs \ - bug-79684.2.cs \ - catch-generics.2.cs \ - event-get.2.cs \ - safehandle.2.cs \ - module-cctor-loader.2.cs \ - generics-invoke-byref.2.cs \ - generic-signature-compare.2.cs \ - generics-sharing.2.cs \ - shared-generic-methods.2.cs \ - shared-generic-synchronized.2.cs \ - generic-inlining.2.cs \ - generic-initobj.2.cs \ - generic-delegate.2.cs \ - generic-sizeof.2.cs \ - generic-virtual.2.cs \ - generic-interface-methods.2.cs \ - generic-array-type.2.cs \ - generic-method-patching.2.cs \ - generic-static-methods.2.cs \ - generic-null-call.2.cs \ - generic-special.2.cs \ - generic-special2.2.cs \ - generic-exceptions.2.cs \ - generic-virtual2.2.cs \ - generic-valuetype-interface.2.cs \ - generic-getgenericarguments.2.cs \ - generic-synchronized.2.cs \ - generic-delegate-ctor.2.cs \ - generic-array-iface-set.2.cs \ - generic-typedef.2.cs \ - bug-431413.2.cs \ - bug-459285.2.cs \ - generic-virtual-invoke.2.cs \ - bug-461198.2.cs \ - generic-sealed-virtual.2.cs \ - generic-system-arrays.2.cs \ - generic-stack-traces.2.cs \ - generic-stack-traces2.2.cs \ - bug-472600.2.cs \ - recursive-generics.2.cs \ - recursive-generics.3.cs \ - bug-473482.2.cs \ - bug-473999.2.cs \ - bug-479763.2.cs \ - bug-616463.cs \ - bug-80392.2.cs \ - bug-82194.2.cs \ - anonarray.2.cs \ - ienumerator-interfaces.2.cs \ - array-enumerator-ifaces.2.cs \ - generic_type_definition_encoding.2.cs \ - bug-333798.2.cs \ - bug-348522.2.cs \ - bug-340662_bug.cs \ - bug-325283.2.cs \ - thunks.cs \ - winx64structs.cs \ - nullable_boxing.2.cs \ - valuetype-equals.cs \ - custom-modifiers.2.cs \ - custom-modifiers-inheritance.cs \ - bug-382986.cs \ - test-inline-call-stack.cs \ - bug-324535.cs \ - modules.cs \ - bug-81673.cs \ - bug-81691.cs \ - bug-415577.cs \ - filter-stack.cs \ - vararg.cs \ - vararg2.cs \ - bug-461867.cs \ - bug-461941.cs \ - bug-461261.cs \ - bug-400716.cs \ - bug-459094.cs \ - bug-467456.cs \ - bug-508538.cs \ - bug-472692.2.cs \ - gchandles.cs \ - interlocked-3.cs \ - interlocked-4.2.cs \ - w32message.cs \ - gc-altstack.cs \ - large-gc-bitmap.cs \ - bug-561239.cs \ - bug-562150.cs \ - bug-599469.cs \ - monitor-resurrection.cs \ - monitor-wait-abort.cs \ - monitor-abort.cs \ - bug-666008.cs \ - bug-685908.cs \ - sgen-long-vtype.cs \ - delegate-invoke.cs \ - delegate-prop.cs \ - bug-696593.cs \ - bug-705140.cs \ - bug-1147.cs \ - mono-path.cs \ - bug-bxc-795.cs \ - bug-3903.cs \ - async-with-cb-throws.cs \ - bug-6148.cs \ - bug-10127.cs \ - bug-18026.cs \ - allow-synchronous-major.cs \ - block_guard_restore_alignment_on_exit.cs \ - thread_static_gc_layout.cs \ - sleep.cs \ - bug-27147.cs \ - bug-30085.cs \ - bug-17537.cs \ - pinvoke_ppcc.cs \ - pinvoke_ppcs.cs \ - pinvoke_ppci.cs \ - pinvoke_ppcf.cs \ - pinvoke_ppcd.cs \ - bug-29585.cs \ - priority.cs \ - abort-cctor.cs \ - abort-try-holes.cs \ - abort-tests.cs \ - thread-native-exit.cs \ - reference-loader.cs \ - thread-suspend-suspended.cs \ - thread-suspend-selfsuspended.cs \ - remoting4.cs \ - remoting1.cs \ - remoting2.cs \ - remoting3.cs \ - remoting5.cs \ - appdomain.cs \ - appdomain-client.cs \ - appdomain-unload.cs \ - appdomain-async-invoke.cs \ - appdomain-thread-abort.cs \ - appdomain1.cs \ - appdomain2.cs \ - appdomain-exit.cs \ - appdomain-serialize-exception.cs \ - assemblyresolve_event2.2.cs \ - appdomain-unload-callback.cs \ - appdomain-unload-doesnot-raise-pending-events.cs \ - appdomain-unload-asmload.cs \ - appdomain-unload-exception.cs \ - unload-appdomain-on-shutdown.cs \ - appdomain-marshalbyref-assemblyload.cs \ - bug-47295.cs \ - loader.cs \ - pinvoke2.cs \ - generic-type-builder.2.cs \ - dynamic-generic-size.cs \ - cominterop.cs \ - dynamic-method-access.2.cs \ - dynamic-method-finalize.2.cs \ - dynamic-method-stack-traces.cs \ - generic_type_definition.2.cs \ - bug-333798-tb.2.cs \ - bug-335131.2.cs \ - bug-322722_patch_bx.2.cs \ - bug-322722_dyn_method_throw.2.cs \ - bug-389886-2.cs \ - bug-349190.2.cs \ - bug-389886-sre-generic-interface-instances.cs \ - bug-462592.cs \ - bug-575941.cs \ - bug-389886-3.cs \ - constant-division.cs \ - dynamic-method-resurrection.cs \ - bug-80307.cs \ - assembly_append_ordering.cs \ - bug-544446.cs \ - bug-36848.cs \ - generic-marshalbyref.2.cs \ - stackframes-async.2.cs \ - transparentproxy.cs \ - bug-48015.cs \ - delegate9.cs \ - marshal-valuetypes.cs \ - xdomain-threads.cs \ - monitor.cs \ - generic-xdomain.2.cs \ - threadpool-exceptions7.cs \ - threadpool-exceptions8.cs \ - cross-domain.cs \ - generic-unloading.2.cs \ - namedmutex-destroy-race.cs \ - thread6.cs \ - thread7.cs \ - appdomain-threadpool-unload.cs \ - process-unref-race.cs \ - bug-46661.cs \ - w32message.cs \ - runtime-invoke.gen.cs \ - imt_big_iface_test.cs \ - bug-58782-plain-throw.cs \ - bug-58782-capture-and-throw.cs \ - recursive-struct-arrays.cs \ - struct-explicit-layout.cs \ - struct-static.cs \ - bug-59281.cs \ - init_array_with_lazy_type.cs \ - weak-fields.cs \ - threads-leak.cs \ - threads-init.cs \ - bug-60848.cs \ - bug-59400.cs \ - tailcall-generic-cast-cs.cs \ - tailcall-interface.cs \ - bug-60843.cs \ - nested_type_visibility.cs \ - dynamic-method-churn.cs \ - dynamic-method-delegate.cs \ - verbose.cs \ - generic-unmanaged-constraint.cs \ - bug-10834.cs \ - bug-10837.cs \ - bug-gh-9507.cs \ - async-generic-enum.cs \ - null-blob-main.cs \ - last-error.cs \ - rgctx-thread-static.cs \ - ccw-class-iface.cs \ - bug-gh-17285.cs - -# some tests fail to compile on mcs -if CSC_IS_ROSLYN -TESTS_CS_SRC += roslyn-bug-19038.cs sizeof-empty-structs.cs -endif - -if AMD64 -TESTS_CS_SRC += async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs -if !HOST_WIN32 -# requires working altstack -TESTS_CS_SRC += bug-60862.cs -endif -endif - -if X86 -TESTS_CS_SRC += async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs -if !HOST_WIN32 -# requires working altstack -TESTS_CS_SRC += bug-60862.cs -endif -endif - -#maybe this test works on linux, not sure -if HOST_DARWIN -TESTS_CS_SRC += bug-8417.cs -endif - -if CROSS_COMPILING # FIXME build vs. host vs. target -TAILCALL_INTERFACE_CONSERVESTACK_IL= -TAILCALL_FSHARP_DEEPTAIL_IL= -else -if HOST_WASM # FIXME build problem -TAILCALL_INTERFACE_CONSERVESTACK_IL= -TAILCALL_FSHARP_DEEPTAIL_IL= -else -if HOST_WIN32 # FIXME build problem -TAILCALL_INTERFACE_CONSERVESTACK_IL= -TAILCALL_FSHARP_DEEPTAIL_IL= -else -# These tests are produced by splitting up tailcall-interface-conservestack.il. -TAILCALL_INTERFACE_CONSERVESTACK_IL=\ - tailcall/interface-conservestack/1.il \ - tailcall/interface-conservestack/10.il \ - tailcall/interface-conservestack/11.il \ - tailcall/interface-conservestack/12.il \ - tailcall/interface-conservestack/13.il \ - tailcall/interface-conservestack/14.il \ - tailcall/interface-conservestack/15.il \ - tailcall/interface-conservestack/16.il \ - tailcall/interface-conservestack/17.il \ - tailcall/interface-conservestack/18.il \ - tailcall/interface-conservestack/19.il \ - tailcall/interface-conservestack/2.il \ - tailcall/interface-conservestack/20.il \ - tailcall/interface-conservestack/21.il \ - tailcall/interface-conservestack/22.il \ - tailcall/interface-conservestack/23.il \ - tailcall/interface-conservestack/24.il \ - tailcall/interface-conservestack/25.il \ - tailcall/interface-conservestack/26.il \ - tailcall/interface-conservestack/27.il \ - tailcall/interface-conservestack/28.il \ - tailcall/interface-conservestack/29.il \ - tailcall/interface-conservestack/3.il \ - tailcall/interface-conservestack/30.il \ - tailcall/interface-conservestack/31.il \ - tailcall/interface-conservestack/32.il \ - tailcall/interface-conservestack/33.il \ - tailcall/interface-conservestack/34.il \ - tailcall/interface-conservestack/35.il \ - tailcall/interface-conservestack/36.il \ - tailcall/interface-conservestack/37.il \ - tailcall/interface-conservestack/38.il \ - tailcall/interface-conservestack/39.il \ - tailcall/interface-conservestack/4.il \ - tailcall/interface-conservestack/40.il \ - tailcall/interface-conservestack/41.il \ - tailcall/interface-conservestack/42.il \ - tailcall/interface-conservestack/43.il \ - tailcall/interface-conservestack/44.il \ - tailcall/interface-conservestack/45.il \ - tailcall/interface-conservestack/46.il \ - tailcall/interface-conservestack/47.il \ - tailcall/interface-conservestack/48.il \ - tailcall/interface-conservestack/49.il \ - tailcall/interface-conservestack/5.il \ - tailcall/interface-conservestack/50.il \ - tailcall/interface-conservestack/51.il \ - tailcall/interface-conservestack/52.il \ - tailcall/interface-conservestack/53.il \ - tailcall/interface-conservestack/6.il \ - tailcall/interface-conservestack/7.il \ - tailcall/interface-conservestack/8.il \ - tailcall/interface-conservestack/9.il - -# These tests are produced by splitting up tailcall/fsharp-deeptail.il. -TAILCALL_FSHARP_DEEPTAIL_IL=\ - tailcall/fsharp-deeptail/Seq.filter-length1.il \ - tailcall/fsharp-deeptail/Seq.filter-length2.il \ - tailcall/fsharp-deeptail/Seq.filter-length3.il \ - tailcall/fsharp-deeptail/StaticTailCallLoop_DateTime_.il \ - tailcall/fsharp-deeptail/StaticTailCallLoop_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DatstringeTime_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DatstringeTime_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_DateTime_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_DateTime_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_DateTime_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_DateTime_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_byte_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_byte_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_byte_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_byte_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_int_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_int_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_int_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_int_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_string_.Method1_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_string_.Method1_byte_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_string_.Method1_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_string_.Method1_string_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClass_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClass_int_.il \ - tailcall/fsharp-deeptail/TailCallLoopGenericClass_string_.il \ - tailcall/fsharp-deeptail/TailCallLoop_DateTime_.il \ - tailcall/fsharp-deeptail/TailCallLoop_int_.il \ - tailcall/fsharp-deeptail/mutualTail1IsEven.il \ - tailcall/fsharp-deeptail/mutualTail1IsOdd.il \ - tailcall/fsharp-deeptail/simpleTail1.il \ - tailcall/fsharp-deeptail/simpleTail2.il - -$(TAILCALL_FSHARP_DEEPTAIL_IL): tailcall/fsharp-deeptail.stamp - -$(TAILCALL_INTERFACE_CONSERVESTACK_IL): tailcall/interface-conservestack.stamp - -tailcall/fsharp-deeptail.stamp: tailcall/split-fsharp$(EXEEXT) tailcall/fsharp-deeptail.il - ./tailcall/split-fsharp$(EXEEXT) < $(srcdir)/tailcall/fsharp-deeptail.il - touch -f $@ - -tailcall/interface-conservestack.stamp: split-tailcall-interface-conservestack$(EXEEXT) tailcall-interface-conservestack.il - ./split-tailcall-interface-conservestack$(EXEEXT) < $(srcdir)/tailcall-interface-conservestack.il - touch -f $@ - -noinst_PROGRAMS = tailcall/split-fsharp split-tailcall-interface-conservestack - -tailcall_split_fsharp_SOURCES=tailcall/split-fsharp.cpp - -split_tailcall_interface_conservestack_SOURCES=split-tailcall-interface-conservestack.cpp - -endif # HOST_WIN32 -endif # HOST_WASM -endif # CROSS_COMPILING - -BUILT_SOURCES += $(TAILCALL_FSHARP_DEEPTAIL_IL) $(TAILCALL_INTERFACE_CONSERVESTACK_IL) - -TESTS_IL_SRC= \ - tailcall/2.il \ - tailcall/3.il \ - tailcall/4.il \ - tailcall/fsharp-deeptail.il \ - tailcall/fsharp-shallowtail.il \ - tailcall/fsharp-shallownotail.il \ - $(TAILCALL_FSHARP_DEEPTAIL_IL) \ - gptail1.il \ - itail1.il \ - itaili1.il \ - ivtail1.il \ - sirtail1.il \ - sitail1.il \ - srtail1.il \ - stail1.il \ - tail1.il \ - taili1.il \ - vtail1.il \ - tailcall-virt.il \ - tailcall-rgctxa.il \ - tailcall-rgctxb.il \ - tailcall-rgctxb-static.il \ - tailcall-mrgctx.il \ - $(TAILCALL_INTERFACE_CONSERVESTACK_IL) \ - tailcall-interface-justrun.il \ - field-access.il \ - method-access.il \ - ldftn-access.il \ - cpblkTest.il \ - vbinterface.il \ - calliTest.il \ - calliGenericTest.il \ - ckfiniteTest.il \ - fault-handler.il \ - locallocTest.il \ - initblkTest.il \ - qt-instance.il \ - vararg3.il \ - bug-29859.il \ - bug-78549.il \ - static-fields-nonconst.il \ - reload-at-bb-end.il \ - test-enum-indstoreil.il \ - filter-bug.il \ - even-odd.il \ - bug-82022.il \ - vt-sync-method.il \ - enum_types.il \ - invalid-token.il \ - call_missing_method.il \ - call_missing_class.il \ - calli_sig_check.il \ - ldfld_missing_field.il \ - ldfld_missing_class.il \ - find-method.2.il \ - bug-79215.2.il \ - bug-79956.2.il \ - bug-327438.2.il \ - bug-387274.2.il \ - bug-426309.2.il \ - ldtoken_with_byref_typespec.2.il \ - resolve_method_bug.2.il \ - resolve_field_bug.2.il \ - resolve_type_bug.2.il \ - generics-sharing-other-exc.2.il \ - generic-ldobj.2.il \ - generic-mkrefany.2.il \ - generic-refanyval.2.il \ - generic-ldtoken.2.il \ - generic-ldtoken-method.2.il \ - generic-ldtoken-field.2.il \ - generic-tailcall.2.il \ - generic-tailcall2.2.il \ - generic-array-exc.2.il \ - generic-valuetype-newobj2.2.il \ - generic-valuetype-newobj.2.il \ - generic-constrained.2.il \ - generic-type-load-exception.2.il \ - bug-81466.il \ - bug457574.il \ - bug445361.il \ - bug-463303.il \ - bug469742.2.il \ - bug-528055.il \ - array_load_exception.il \ - bug-481403.il \ - interface-with-static-method.il \ - bug-633291.il \ - delegate-with-null-target.il \ - bug-318677.il \ - gsharing-valuetype-layout.il \ - invalid_generic_instantiation.il \ - bug-45841-fpstack-exceptions.il \ - instance_tailrec.il \ - dim-constrainedcall.il \ - dim-constrained3.il \ - dim-constrained3_gm.il \ - dim-diamondshape.il \ - dim-genericmethods.il \ - dim-methodimpl.il \ - dim-sharedgenerics.il \ - dim-simple.il \ - dim-valuetypes.il \ - dim-nested-types.il \ - dim-generic-interface.il \ - dim-implements-multiple-interfaces.il \ - dim-sealed.il \ - dim-protected-accessibility1.il \ - dim-protected-accessibility2.il \ - dim-reabstraction.il \ - dim-reabstraction-generics.il \ - dim-abstractcall.il \ - twopassvariance.il \ - tailcall-generic-cast-conservestack-il.il \ - tailcall-generic-cast-nocrash-il.il \ - tailcall-member-function-in-valuetype.il \ - tailcall-return-valuetype.il \ - tailcall-valuetype-parameter.il \ - ldfldvt.il \ - newobj-abstract.il \ - invalid-isbyreflike.il \ - custom-modifiers-append.1.il \ - gh-13056_mono_local_cprop_av.il \ - gh-13057_mono_local_emulate_ops_av.il \ - module-cctor-entrypoint.il \ - bug-gh-9706.il \ - localloc-noinit.il \ - calli_native.il - -# This test crashes the runtime, even with recent fixes. -# incorrect-ldvirtftn-read-behind-for-dup.il - -TESTS_GSHARED_SRC = \ - generics-sharing.2.cs \ - shared-generic-methods.2.cs \ - shared-generic-synchronized.2.cs \ - generic-initobj.2.cs \ - generics-sharing-other-exc.2.cs \ - generic-box.2.cs \ - generic-unbox.2.cs \ - generic-delegate.2.cs \ - generic-sizeof.2.cs \ - generic-ldobj.2.cs \ - generic-mkrefany.2.cs \ - generic-refanyval.2.cs \ - generic-ldtoken.2.cs \ - generic-ldtoken-method.2.cs \ - generic-ldtoken-field.2.cs \ - generic-virtual.2.cs \ - generic-tailcall.2.cs \ - generic-interface-methods.2.cs \ - generic-array-type.2.cs \ - generic-method-patching.2.cs \ - generic-static-methods.2.cs \ - generic-null-call.2.cs \ - generic-tailcall2.2.cs \ - generic-array-exc.2.cs \ - generic-special.2.cs \ - generic-special2.2.cs \ - generic-exceptions.2.cs \ - generic-delegate2.2.cs \ - generic-virtual2.2.cs \ - generic-valuetype-interface.2.cs \ - generic-valuetype-newobj.2.cs \ - generic-valuetype-newobj2.2.cs \ - generic-getgenericarguments.2.cs \ - generic-synchronized.2.cs \ - generic-delegate-ctor.2.cs \ - generic-constrained.2.cs \ - bug-431413.2.cs \ - generic-virtual-invoke.2.cs \ - generic-typedef.2.cs \ - generic-marshalbyref.2.cs \ - bug-459285.2.cs \ - bug-461198.2.cs \ - generic-sealed-virtual.2.cs \ - generic-system-arrays.2.cs \ - generic-stack-traces.2.cs \ - generic-stack-traces2.2.cs \ - bug-472600.2.cs \ - bug-473482.2.cs \ - bug-473999.2.cs \ - bug-479763.2.cs \ - generic-type-load-exception.2.cs \ - bug-616463.cs \ - bug-1147.cs \ - generic-type-builder.2.cs - -PLATFORM_DISABLED_TESTS=\ - $(TAILCALL_DISABLED_TESTS_RUN) \ - tailcall-member-function-in-valuetype.exe \ - tailcall-rgctxb.exe - -if HOST_WIN32 -PLATFORM_DISABLED_TESTS += bug-58782-plain-throw.exe bug-58782-capture-and-throw.exe - -# see https://github.com/mono/mono/issues/9739 -PLATFORM_DISABLED_TESTS += verbose.exe - -if ENABLE_CXX -# see https://github.com/mono/mono/issues/18827 -PLATFORM_DISABLED_TESTS += bug-10127.exe -endif - -endif - -if DISABLE_CRASH_REPORTING -PLATFORM_DISABLED_TESTS += merp-json-valid.exe merp-crash-test.exe -endif - -if HOST_DARWIN - -# see https://github.com/mono/mono/issues/10845 -PLATFORM_DISABLED_TESTS += monitor-wait-abort.exe -else -PLATFORM_DISABLED_TESTS += merp-json-valid.exe merp-crash-test.exe -endif - -if AMD64 -# #651684 -PLATFORM_DISABLED_TESTS += finally_guard.exe - -if HOST_WIN32 -PLATFORM_DISABLED_TESTS += w32message.exe -endif - -endif - -if X86 - -if HOST_WIN32 -PLATFORM_DISABLED_TESTS += async-exc-compilation.exe finally_guard.exe finally_block_ending_in_dead_bb.exe \ - bug-18026.exe monitor.exe threadpool-exceptions5.exe process-unref-race.exe w32message.exe \ - unhandled-exception-1.exe unhandled-exception-2.exe unhandled-exception-3.exe unhandled-exception-4.exe \ - unhandled-exception-5.exe unhandled-exception-6.exe unhandled-exception-7.exe unhandled-exception-8.exe -endif - -# test_virt.exe fails because callee takes more parameters than caller, 1 vs. 0, and -# x86 passes no parameters in registers, so it is a stack imbalance. -PLATFORM_DISABLED_TESTS += tailcall/coreclr/JIT/Methodical/tailcall/test_virt.exe - -endif - -if POWERPC -# bug #71274 -PLATFORM_DISABLED_TESTS += finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe -endif - -if POWERPC64 -# FIXME: These tests hang/fail for unknown reasons -PLATFORM_DISABLED_TESTS += monitor.exe threadpool-exceptions5.exe appdomain-unload.exe \ - pinvoke2.exe pinvoke3.exe pinvoke11.exe threadpool-exceptions7.exe winx64structs.exe bug-10127.exe pinvoke_ppcc.exe \ - pinvoke_ppcs.exe pinvoke_ppci.exe pinvoke_ppcf.exe pinvoke_ppcd.exe abort-cctor.exe load-exceptions.exe \ - sgen-domain-unload-2.exe sgen-weakref-stress.exe sgen-cementing-stress.exe sgen-new-threads-dont-join-stw.exe \ - sgen-new-threads-dont-join-stw-2.exe sgen-new-threads-collect.exe sgen-bridge.exe -PLATFORM_DISABLED_TESTS += appdomain-threadpool-unload.exe -PLATFORM_DISABLED_TESTS += bug-60848.exe -endif - -if ARM -PLATFORM_DISABLED_TESTS += filter-stack.exe weak-fields.exe - -# Most ARM problems are due to extra_arg and cannot be easily fixed, except for easy -# bitcode-specific fix which has been declined. A few are uncertain and should be investigated, -# but still probably extra_arg. -PLATFORM_DISABLED_TESTS += ivtail1.exe -PLATFORM_DISABLED_TESTS += tailcall-generic-cast-conservestack-il.exe -PLATFORM_DISABLED_TESTS += tailcall-mrgctx.exe -PLATFORM_DISABLED_TESTS += tailcall-rgctxa.exe -PLATFORM_DISABLED_TESTS += tailcall-virt.exe -PLATFORM_DISABLED_TESTS += tailcall/coreclr/JIT/Directed/tailcall/tailcall.exe -PLATFORM_DISABLED_TESTS += tailcall/2.exe -PLATFORM_DISABLED_TESTS += tailcall/3.exe -PLATFORM_DISABLED_TESTS += tailcall/4.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_string_.Method1_string_.exe - -# FIXME These presumably take an extra parameter though this should be confirmed. -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_DateTime_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_byte_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_int_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_string_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DatstringeTime_.Method1_string_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_DateTime_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_byte_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_int_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_string_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_DateTime_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_byte_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_int_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_string_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_DateTime_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_byte_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_int_.exe - -# Interface calls cannot be tailcalls on ARM due to extra_arg. Bitcode could easily work however. -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_DateTime_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_byte_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_int_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_string_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DatstringeTime_.Method1_string_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_DateTime_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_byte_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_int_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_string_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_DateTime_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_byte_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_int_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_string_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_DateTime_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_byte_.exe -PLATFORM_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_int_.exe - -# Interface calls cannot be tailcalls on ARM due to extra_arg. Bitcode could easily work however. -PLATFORM_DISABLED_TESTS += tailcall-interface-conservestack.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/1.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/10.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/11.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/12.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/13.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/14.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/15.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/16.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/17.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/18.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/19.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/2.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/20.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/21.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/22.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/23.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/24.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/25.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/26.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/27.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/28.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/29.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/3.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/30.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/31.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/32.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/33.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/34.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/35.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/36.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/37.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/38.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/39.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/4.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/40.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/41.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/42.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/43.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/44.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/45.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/46.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/47.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/48.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/49.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/5.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/50.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/51.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/52.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/6.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/7.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/8.exe -PLATFORM_DISABLED_TESTS += tailcall/interface-conservestack/9.exe -endif - -if ARM64 -PLATFORM_DISABLED_TESTS += weak-fields.exe -endif - -if MIPS -# monitor.exe is racy -PLATFORM_DISABLED_TESTS += filter-stack.exe monitor.exe -endif - -if S390X -PLATFORM_DISABLED_TESTS += dynamic-method-resurrection.exe -#PLATFORM_DISABLED_TESTS=dynamic-method-resurrection.exe exception17.exe - -PLATFORM_DISABLED_TESTS += \ - sgen-toggleref.exe \ - sgen-bridge.exe \ - sgen-bridge-major-fragmentation.exe \ - sgen-bridge-xref.exe -endif - -PROFILE_DISABLED_TESTS= \ - $(TAILCALL_DISABLED_TESTS_RUN) \ - tailcall-member-function-in-valuetype.exe \ - tailcall-rgctxb.exe - -if FULL_AOT_TESTS -# Tests which rely on TypeLoadExceptions or MemberAccessExceptions -# In full-aot mode, these cause the relevant methods to be not AOTed. -PROFILE_DISABLED_TESTS += \ - typeload-unaligned.exe \ - field-access.exe \ - invalid_generic_instantiation.exe \ - bug-481403.exe \ - array_ldelema.exe \ - array_load_exception.exe \ - bug445361.exe \ - generic-type-load-exception.2.exe \ - invalid-token.exe \ - call_missing_method.exe \ - call_missing_class.exe \ - custom-attr-errors.exe \ - ldfld_missing_field.exe \ - ldfld_missing_class.exe \ - vt-sync-method.exe \ - resolve_method_bug.2.exe \ - resolve_field_bug.2.exe \ - resolve_type_bug.2.exe \ - struct-static.exe \ - bug-81691.exe \ - bug-327438.2.exe \ - newobj-abstract.exe \ - invalid-isbyreflike.exe - -# Tests which rely on remoting -PROFILE_DISABLED_TESTS += \ - context-static.exe \ - bug-415577.exe \ - generic-marshalbyref.2.exe \ - unhandled-exception-7.exe - -# Tests which use unsupported pinvoke+full aot -# functionality -PROFILE_DISABLED_TESTS += \ - marshal.exe \ - marshal2.exe \ - marshal6.exe \ - marshal7.exe \ - marshal8.exe \ - pinvoke-2.2.exe \ - pinvoke3.exe \ - thunks.exe \ - bug-58782-plain-throw.exe \ - bug-58782-capture-and-throw.exe - -# Tests which load assemblies which are not -# in the testing_aot_full profile -PROFILE_DISABLED_TESTS += \ - assembly-load-remap.exe - -# Test which needs remoting support -PROFILE_DISABLED_TESTS += \ - remoting4.exe \ - remoting1.exe \ - remoting2.exe \ - remoting3.exe \ - remoting5.exe - -# Tests which needs AppDomain support -PROFILE_DISABLED_TESTS += \ - appdomain.exe \ - appdomain-client.exe \ - appdomain-unload.exe \ - appdomain-async-invoke.exe \ - appdomain-thread-abort.exe \ - appdomain1.exe \ - appdomain2.exe \ - appdomain-exit.exe \ - appdomain-unload-asmload.exe \ - appdomain-unload-callback.exe \ - appdomain-unload-doesnot-raise-pending-events.exe \ - unload-appdomain-on-shutdown.exe \ - appdomain-marshalbyref-assemblyload.exe \ - assemblyresolve_event2.2.exe \ - assemblyresolve_event6.exe \ - bug-544446.exe \ - bug-36848.exe \ - generic-marshalbyref.2.exe \ - stackframes-async.2.exe \ - transparentproxy.exe \ - bug-48015.exe \ - delegate9.exe \ - marshal-valuetypes.exe \ - xdomain-threads.exe \ - monitor.exe \ - generic-xdomain.2.exe \ - threadpool-exceptions7.exe \ - threadpool-exceptions8.exe \ - cross-domain.exe \ - generic-unloading.2.exe \ - appdomain-threadpool-unload.exe - -# Tests which needs System.Reflection.Emit support -PROFILE_DISABLED_TESTS += \ - bug-47295.exe \ - loader.exe \ - pinvoke2.exe \ - generic-type-builder.2.exe \ - dynamic-generic-size.exe \ - cominterop.exe \ - dynamic-method-access.2.exe \ - dynamic-method-finalize.2.exe \ - dynamic-method-stack-traces.exe \ - generic_type_definition.2.exe \ - bug-333798-tb.2.exe \ - bug-335131.2.exe \ - bug-322722_patch_bx.2.exe \ - bug-322722_dyn_method_throw.2.exe \ - bug-389886-2.exe \ - bug-349190.2.exe \ - bug-389886-sre-generic-interface-instances.exe \ - custom-modifiers-inheritance.exe \ - bug-462592.exe \ - bug-575941.exe \ - bug-389886-3.exe \ - constant-division.exe \ - dynamic-method-resurrection.exe \ - assembly_append_ordering.exe \ - assemblyresolve_event5.exe \ - dynamic-method-delegate.exe \ - dynamic-method-churn.exe \ - bug-666008.exe \ - ccw-class-iface.exe \ - bug-685908.exe - -# Test which needs System.Web support -PROFILE_DISABLED_TESTS += \ - bug-80307.exe - -# Tests which needs named Mutex support -PROFILE_DISABLED_TESTS += \ - namedmutex-destroy-race.exe - -# ThreadAbortException doesn't have necessary field for this test -PROFILE_DISABLED_TESTS += \ - thread6.exe - -# can't AOT the TestingReferenceAssembly.dll which is a dependency -# of reference-loader.exe because it contains the [ReferenceAssemblyAttribute] -# and the runtime errors out with "File does not contain a valid CIL image." -PROFILE_DISABLED_TESTS += \ - reference-loader.exe - -# Tests which have no way of finding AOT images because they use Assembly.Load(byte[]) -PROFILE_DISABLED_TESTS += \ - assembly-load-bytes.exe \ - assembly-load-bytes-bindingredirect.exe - -# Tests which require AOT of a multi-netmodule assemblies -PROFILE_DISABLED_TESTS += test-multi-netmodule-4-exe.exe - -# Tests which depend on a case-insensitive filesystem when using AOT -if HOST_DARWIN -else -PROFILE_DISABLED_TESTS += \ - assembly-loadfrom-simplename.exe -endif - -# constraints-load.il: -# Failed to load method 0x6000007 from '..../mono/tests/constraints-load.exe' due to -# Could not resolve type with token 01000002 assembly:mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.BrokenIComparable`1 member:. -PROFILE_DISABLED_TESTS += \ - constraints-load.exe \ - calli_sig_check.exe \ - bug-515884.exe - -PROFILE_DISABLED_TESTS += \ - generic-type-builder.2.exe - -PROFILE_DISABLED_TESTS += \ - sgen-domain-unload.exe \ - sgen-domain-unload-2.exe - -PROFILE_DISABLED_TESTS += \ - appdomain-loader.exe \ - assemblyresolve_event3.exe \ - appdomain-serialize-exception.exe - -PROFILE_DISABLED_TESTS += \ - delegate15.exe - -# https://bugzilla.xamarin.com/show_bug.cgi?id=60973 -PROFILE_DISABLED_TESTS += \ - weak-fields.exe - -# Some, probably all, of these tests use gsharedvt. -# gsharedvt is very much at odds with tailcall, and they fail as a result. -# RegularAOT and HybridAOT should be ok. -# -# The tests might be tweakable but then they will less resemble real world code. -# -# FullAOT should probably be changed to intersect tailcall signatures called -# and all generic signatures provided, and compile more functions. -# As well, gsharedvt can probably be a tailcall sometimes, like if parameters -# fit in registers and there is no out conversion. Maybe it already does that. -# -# gsharedvt should be viable when only wrapping "in" but not "out", -# as long as "in" does not expand parameter stack size, which it should never do. -if MONO_ARCH_GSHAREDVT_SUPPORTED -PROFILE_DISABLED_TESTS += tailcall-interface-conservestack.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/20.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/26.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/31.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/33.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/34.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/35.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/36.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/37.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/41.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/43.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/44.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/45.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/46.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/47.exe -PROFILE_DISABLED_TESTS += tailcall/interface-conservestack/51.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_int_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_byte_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_DateTime_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_int_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_DateTime_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_int_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_byte_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_string_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_byte_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_string_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_int_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_byte_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_DateTime_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_byte_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_int_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_string_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_byte_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_string_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_byte_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_DateTime_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_int_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_DateTime_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_DateTime_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_byte_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_DateTime_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_int_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_DateTime_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_int_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_string_.exe -PROFILE_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_string_.exe - -endif # MONO_ARCH_GSHAREDVT_SUPPORTED - -if ARM64 -# Times out on ARM64. -# https://github.com/mono/mono/issues/10783 -# https://jenkins.mono-project.com/job/test-mono-pull-request-arm64-fullaot+llvm/486/parsed_console/log.html -# https://jenkins.mono-project.com/job/test-mono-pull-request-arm64-fullaot+llvm/471/parsed_console/log.html -PLATFORM_DISABLED_TESTS += tailcall/2.exe -endif # ARM64 FullAOT - -endif # FULL_AOT_TESTS - -if HYBRID_AOT_TESTS -PROFILE_DISABLED_TESTS += \ - bug-80307.exe \ - namedmutex-destroy-race.exe -endif - -if FULL_AOT_INTERP_TESTS - -# AppDomain tests -PROFILE_DISABLED_TESTS += \ - appdomain1.exe \ - appdomain2.exe \ - appdomain-async-invoke.exe \ - appdomain.exe \ - appdomain-exit.exe \ - appdomain-loader.exe \ - appdomain-marshalbyref-assemblyload.exe \ - appdomain-serialize-exception.exe \ - appdomain-thread-abort.exe \ - appdomain-threadpool-unload.exe \ - appdomain-unload-asmload.exe \ - appdomain-unload-callback.exe \ - appdomain-unload-doesnot-raise-pending-events.exe \ - appdomain-unload.exe \ - assemblyresolve_event6.exe \ - bug-335131.2.exe \ - bug-415577.exe \ - cross-domain.exe \ - dataslot.exe \ - delegate9.exe \ - domain-stress.exe \ - generic-marshalbyref.2.exe \ - generic-unloading.2.exe \ - generic-xdomain.2.exe \ - hostname.exe \ - marshal-valuetypes.exe \ - monitor.exe \ - pinvoke3.exe \ - remoting4.exe \ - stackframes-async.2.exe \ - suspend-stress-test.exe \ - thread6.exe \ - threadpool-exceptions7.exe \ - threadpool-exceptions8.exe \ - unhandled-exception-7.exe \ - unhandled-exception-test-case.2.exe \ - unload-appdomain-on-shutdown.exe \ - xdomain-threads.exe - -# Tests which load assemblies which are not in the profile -PROFILE_DISABLED_TESTS += \ - assembly-load-remap.exe - -# Tests which needs named Mutex support -PROFILE_DISABLED_TESTS += \ - namedmutex-destroy-race.exe - -# Test which needs System.Web support -PROFILE_DISABLED_TESTS += \ - bug-80307.exe - -PROFILE_DISABLED_TESTS += \ - struct-static.exe \ - transparentproxy.exe - -# Tests depending on assembly load order. Under Full AOT using WinAOT -# profile, console is still available, meaning that more assemblies (I18N) -# will be loaded when AOT runtime initial loads mscorlib. -if HOST_WIN32 -PROFILE_DISABLED_TESTS += \ - assembly_append_ordering.exe -endif -endif - -REMOTING_DISABLED_TESTS = \ - async-exc-compilation.exe \ - bug-544446.exe \ - context-static.exe \ - remoting1.exe \ - remoting2.exe \ - remoting3.exe \ - remoting5.exe \ - nullable_boxing.2.exe - -if FULL_AOT_TESTS -PROFILE_DISABLED_TESTS += $(REMOTING_DISABLED_TESTS) - -# Test is too sensitive. -PROFILE_DISABLED_TESTS += localloc-noinit.exe -endif - -if HYBRID_AOT_TESTS -PROFILE_DISABLED_TESTS += $(REMOTING_DISABLED_TESTS) - -# Test is too sensitive. -PROFILE_DISABLED_TESTS += localloc-noinit.exe -endif - -if FULL_AOT_INTERP_TESTS -PROFILE_DISABLED_TESTS += $(REMOTING_DISABLED_TESTS) - -# Test is too sensitive. -PROFILE_DISABLED_TESTS += localloc-noinit.exe - -endif - -AOT_DISABLED_TESTS= \ - localloc-noinit.exe \ - constraints-load.exe \ - calli_sig_check.exe - -CI_DISABLED_TESTS = \ - main-returns-background-resetabort.exe \ - main-returns-background-abort-resetabort.exe \ - assemblyresolve_event3.exe \ - finally_guard.exe \ - generic-xdomain.2.exe \ - localloc-noinit.exe - -# failing tests which we temporarily disable for PRs -# so they don't interfere with other people's work -CI_PR_DISABLED_TESTS = - -# FIXME Hybrid Suspend - see https://github.com/mono/mono/issues/9959 -# CI_PR_DISABLED_TESTS += sgen-new-threads-collect.exe - -# https://github.com/mono/mono/issues/8997 -CI_PR_DISABLED_TESTS += finalizer-thread.exe - -# https://github.com/mono/mono/issues/11392 -CI_PR_DISABLED_TESTS += appdomain-threadpool-unload.exe - -# https://github.com/mono/mono/issues/11415 -CI_PR_DISABLED_TESTS += finalizer-abort.exe - -# https://github.com/mono/mono/issues/11420 -CI_PR_DISABLED_TESTS += process-stress-2.exe - -# https://github.com/mono/mono/issues/11417 -CI_PR_DISABLED_TESTS += process-stress-3.exe - -if HOST_WIN32 -# https://github.com/mono/mono/issues/12839 -CI_PR_DISABLED_TESTS += block_guard_restore_alignment_on_exit.exe -endif - -# appdomain-threadpool-unload.exe creates 100 appdomains, takes too long with llvm -LLVM_DISABLED_TESTS = \ - finally_block_ending_in_dead_bb.exe \ - appdomain-threadpool-unload.exe - -# https://github.com/mono/mono/issues/6490 -LLVM_DISABLED_TESTS += \ - weak-fields.exe - -if HOST_WIN32 -# https://github.com/mono/mono/issues/19603 -LLVM_DISABLED_TESTS += sgen-bridge.exe -endif - -LLVM = $(filter --llvm, $(MONO_ENV_OPTIONS) $(AOT_BUILD_FLAGS)) - -# The two finalizer tests only work under sgen -# gc-altstack.exe fails under boehm because it has no support for altstack -# bug-459094.exe creates an extremely deep directory tree -# delegate-invoke.exe depends on 929c6bc9b6d76a273f251e6f5dfacac36e9c38bd which was -# reverted. -# bug-Xamarin-5278.exe got broken by 5d26590e79da139a284459299aee95c25f4cd835 -# appdomain-thread-abort.exe: https://bugzilla.xamarin.com/show_bug.cgi?id=47054 -# abort-try-holes.exe is flaky due to unwinding failure to the finally block when aborting -# appdomain-marshalbyref-assemblyload.exe: https://bugzilla.xamarin.com/show_bug.cgi?id=49308 -# threads-init.exe: runs out of system threads -# dim-constrainedcall.exe: fails on dontnet as well (https://github.com/dotnet/runtime/issues/9378) -# -# tailcall-rgctxb.exe -# tailcall-member-function-in-valuetype.exe -# Any time we have a byref/out parameter, be it -# an integer, or valuetype-this, we pessimistically -# will never tailcall. -# -# These two cases have valuetype-this. -# tailcall-rgctxb.exe strives for additional coverage -# related to generic context, but both tests suffer from -# the same problem. -# -# I suggest we insert range checks. -# If all parameters are outside the frame, -# do a tailcall. If any are not, regular call. -# -# It'll be a little bigger and have a slowdown, -# and a speedup (stack locality speeds things up), -# and enable code that does not work otherwise. -# -# Again, tailcall is not just an optimization. -# It lets code process large data within small stack. -# If it was just an optimization, desktop CLR would not -# go so far out of their way to implement it. -# -# Some of the tailcall tests pass native pointers to locals. -# Mono does not yet allow that. -# tailcall "i" is either calli, or integer instead of pointer, and the latter sidesteps the matter. -KNOWN_FAILING_TESTS = \ - delegate-async-exception.exe \ - bug-348522.2.exe \ - bug-459094.exe \ - delegate-invoke.exe \ - bug-Xamarin-5278.exe \ - appdomain-marshalbyref-assemblyload.exe \ - abort-try-holes.exe \ - threads-init.exe \ - gptail1.exe \ - itaili1.exe \ - sirtail1.exe \ - srtail1.exe \ - stail1.exe \ - tail1.exe \ - taili1.exe \ - vtail1.exe \ - tailcall-member-function-in-valuetype.exe \ - tailcall-rgctxb.exe - -DISABLED_TESTS = \ - $(KNOWN_FAILING_TESTS) \ - $(PLATFORM_DISABLED_TESTS) \ - $(PROFILE_DISABLED_TESTS) \ - $(if $(AOT),$(AOT_DISABLED_TESTS)) \ - $(if $(CI),$(CI_DISABLED_TESTS)) \ - $(if $(CI_PR),$(CI_PR_DISABLED_TESTS)) \ - $(if $(LLVM),$(LLVM_DISABLED_TESTS)) - -# Interpreter does not currently implement tailcall. -# Disable all tailcall tests. -INTERP_DISABLED_TESTS = $(DISABLED_TESTS) \ - gptail1.exe \ - itail1.exe \ - itaili1.exe \ - ivtail1.exe \ - sitail1.exe \ - sirtail1.exe \ - srtail1.exe \ - stail1.exe \ - tail1.exe \ - taili1.exe \ - vtail1.exe \ - tailcall-generic-cast-conservestack-il.exe \ - tailcall-interface-conservestack.exe \ - tailcall-mrgctx.exe \ - tailcall-rgctxa.exe \ - tailcall-rgctxb.exe \ - tailcall-rgctxb-static.exe \ - tailcall-virt.exe \ - tailcall-return-valuetype.exe \ - tailcall/fsharp-deeptail.exe \ - tailcall/2.exe \ - tailcall/3.exe \ - tailcall/4.exe \ - tailcall/8273.exe \ - $(TAILCALL_DISABLED_TESTS_RUN) \ - bug-60843.exe -# FIXME -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/Seq.filter-length1.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/Seq.filter-length2.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/Seq.filter-length3.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/StaticTailCallLoop_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/StaticTailCallLoop_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DateTime_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_DatstringeTime_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_byte_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_int_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractClass_string_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DateTime_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_DatstringeTime_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_byte_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_int_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethodAbstractInterface_string_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_DateTime_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_DateTime_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_DateTime_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_DateTime_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_byte_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_byte_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_byte_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_byte_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_int_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_int_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_int_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_int_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_string_.Method1_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_string_.Method1_byte_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_string_.Method1_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClassAndMethod_string_.Method1_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClass_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClass_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoopGenericClass_string_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoop_DateTime_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/TailCallLoop_int_.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/mutualTail1IsEven.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/mutualTail1IsOdd.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/simpleTail1.exe -INTERP_DISABLED_TESTS += tailcall/fsharp-deeptail/simpleTail2.exe - -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/1.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/10.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/11.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/12.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/13.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/14.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/15.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/16.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/17.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/18.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/19.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/2.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/20.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/21.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/22.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/23.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/24.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/25.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/26.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/27.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/28.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/29.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/3.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/30.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/31.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/32.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/33.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/34.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/35.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/36.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/37.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/38.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/39.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/4.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/40.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/41.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/42.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/43.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/44.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/45.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/46.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/47.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/48.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/49.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/5.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/50.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/51.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/52.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/53.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/6.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/7.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/8.exe -INTERP_DISABLED_TESTS += tailcall/interface-conservestack/9.exe - -# expected InvalidProgramException not thrown -INTERP_DISABLED_TESTS += calli_sig_check.exe - -# Test is too sensitive. -INTERP_DISABLED_TESTS += localloc-noinit.exe -INTERP_DISABLED_TESTS += dim-diamondshape.exe -INTERP_DISABLED_TESTS += pinvoke3.exe -INTERP_DISABLED_TESTS += cominterop.exe -INTERP_DISABLED_TESTS += ccw-class-iface.exe -# bug-60862.exe: missing support to map IP->method; only works on platforms with altstack support. -INTERP_DISABLED_TESTS += bug-60862.exe -# bug-48015.exe: remoting test that fails on fullaotinterp scenarios -INTERP_DISABLED_TESTS += bug-48015.exe - -if ARM64 -INTERP_DISABLED_TESTS += \ - bug-80307.exe - -# Test is too sensitive. -DISABLED_TESTS += localloc-noinit.exe - -endif - -if HOST_WIN32 -# Test is too sensitive? -DISABLED_TESTS += localloc-noinit.exe -endif - -TESTS_CS=$(filter-out $(DISABLED_TESTS),$(TESTS_CS_SRC:.cs=.exe)) -TESTS_IL=$(filter-out $(DISABLED_TESTS),$(TESTS_IL_SRC:.il=.exe)) -TESTS_BENCH=$(filter-out $(DISABLED_TESTS),$(TESTS_BENCH_SRC:.cs=.exe)) -TESTS_STRESS=$(filter-out $(DISABLED_TESTS),$(TESTS_STRESS_SRC:.cs=.exe)) -TESTS_GSHARED=$(filter-out $(DISABLED_TESTS),$(TESTS_GSHARED_SRC:.cs=.exe)) -TESTS_TAILCALL_COMPILE=$(filter-out $(TAILCALL_DISABLED_TESTS_COMPILE),$(TEST_TAILCALL_CS_SRC:.cs=.exe) $(TEST_TAILCALL_IL_SRC:.il=.exe)) -TESTS_TAILCALL_RUN=$(filter-out $(TAILCALL_DISABLED_TESTS_RUN),$(TESTS_TAILCALL_COMPILE)) - -if FULL_AOT_TESTS -TESTSAOT_CS=$(TESTS_CS:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_IL=$(TESTS_IL:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_BENCH=$(TESTS_BENCH:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_STRESS=$(TESTS_STRESS:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_GSHARED=$(TESTS_GSHARED:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -# AOT tests are run by running the non-AOT files. Runtime probes for the AOT file. -TESTSAOT_TAILCALL=$(TESTS_TAILCALL_COMPILE:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -TESTSAOT_CS=$(TESTS_CS:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_IL=$(TESTS_IL:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_BENCH=$(TESTS_BENCH:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_STRESS=$(TESTS_STRESS:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_GSHARED=$(TESTS_GSHARED:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_TAILCALL=$(TESTS_TAILCALL_COMPILE:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -EXTRA_DIST=common_mixed.mk test-driver test-runner.cs $(TESTS_CS_SRC) $(TESTS_IL_SRC) \ - $(TESTS_BENCH_SRC) $(TESTS_STRESS_SRC) stress-runner.pl \ - array-coop-1.cs array-coop-2.cs \ - array-coop-bigvt.cs array-coop-int.cs array-coop-smallvt.cs \ - array-coop-bigvt.sh array-coop-smallvt.sh array-coop-int.sh \ - tailcall-interface-conservestack.il tailcall/fsharp-deeptail.il \ - $(TEST_TAILCALL_CS_SRC) \ - $(TEST_TAILCALL_IL_SRC) - -# This test has extra sources. -tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyWithPrefix.exe: \ - tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyTransparentLibraryWithPrefix.il \ - tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyVerifiableLibraryWithPrefix.il - -%.exe: %.il - $(MKDIR_P) $(dir $@) - $(ILASM) -out:$@ $^ - -if !FULL_AOT_TESTS -if !HYBRID_AOT_TESTS -if !FULL_AOT_INTERP_TESTS -TEST_DRIVER_HARD_KILL_FEATURE=-r:$(CLASS)/Mono.Posix.dll -endif -endif -endif - -if FULL_AOT_TESTS -TEST_DRIVER_DEPEND=TestDriver.dll$(PLATFORM_AOT_SUFFIX) -else -if HYBRID_AOT_TESTS -TEST_DRIVER_DEPEND=TestDriver.dll$(PLATFORM_AOT_SUFFIX) -else -TEST_DRIVER_DEPEND=TestDriver.dll -endif -endif - -%.exe: %.cs $(TEST_DRIVER_DEPEND) - $(MKDIR_P) $(dir $@) - $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -r:TestDriver.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $< - -# N.B. test-runner.exe references the TOOLS_RUNTIME versions of the framework assemblies -test-runner.exe: test-runner.cs $(TEST_DRIVER_DEPEND) - $(MCS) -r:System.dll -r:System.Xml.dll -r:System.Core.dll -r:TestDriver.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $< - -%.dll: %.cs - $(MKDIR_P) $(dir $@) - $(MCS) -r:$(CLASS)/System.dll -target:library -out:$@ $< -%.dll: %.il - $(MKDIR_P) $(dir $@) - $(ILASM) /dll /output:$@ $< - -reference-loader.exe: reference-loader.cs TestingReferenceAssembly.dll TestingReferenceReferenceAssembly.dll $(TEST_DRIVER_DEPEND) - $(MCS) -r:$(CLASS)/System.dll -r:TestDriver.dll -r:TestingReferenceAssembly.dll -r:TestingReferenceReferenceAssembly.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $(srcdir)/reference-loader.cs - -merp-json-valid.exe: merp-json-valid.cs - $(MCS) -r:$(CLASS)/System.Web.Extensions.dll -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -out:$@ $< - -merp-crash-test.exe: merp-crash-test.cs - $(MCS) -r:$(CLASS)/System.Web.Extensions.dll -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -out:$@ $< - -TestingReferenceAssembly.dll: TestingReferenceAssembly.cs - $(MCS) -target:library -out:$@ $< - -TestingReferenceReferenceAssembly.dll: TestingReferenceReferenceAssembly.cs TestingReferenceAssembly.dll - $(MCS) -r:TestingReferenceAssembly.dll -target:library -out:$@ $< - -%.exe$(PLATFORM_AOT_SUFFIX): %.exe - $(RUNTIME) $(TEST_AOT_BUILD_FLAGS) $< - -%.dll$(PLATFORM_AOT_SUFFIX): %.dll - $(RUNTIME) $(TEST_AOT_BUILD_FLAGS) $< - -# mkbundle works on ppc, but the pkg-config POC doesn't when run with make test -if POWERPC -test-platform: -else -# Can't use mkbundle on win32 since there is no static build there -# Can't run test-unhandled-exception on Windows because of all the debug popups... -if HOST_WIN32 -test-platform: -else -# mkbundle uses the installed mono-2.pc so it won't work if there is no system mono -#test-platform: testbundle test-iomap-regression -test-platform: test-iomap-regression -endif -endif - -# -# Test that no symbols are missed in eglib-remap.h -# -if HOST_LINUX -test-platform: test-eglib-remap -else -if HOST_DARWIN -test-platform: test-eglib-remap -endif -endif -# The following regexp describes all symbols that start with "g_" but are not part of eglibc. -# The optional underscore prepending symbol names may or may not appear depending on the -# system and the state of the leading-underscore compiler flag. -OK_G_SYMBOLS='\<_?g_(s?list_(pre|ap)pend_(image|mempool)|concat_dir_and_file|Ctoc)\>' -test-eglib-remap: - @echo "Testing eglib remap..." - @if which nm > /dev/null; then if nm $(top_builddir)/mono/mini/mono | grep -Ev $(OK_G_SYMBOLS) | grep -E 't _?g_'; then exit 1; else exit 0; fi; fi - -test-env-options: - MONO_ENV_OPTIONS="--version" $(RUNTIME) array-init.exe | grep -q Architecture: - -TESTS_REGULAR = $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH) -TESTS_INCL_DEPS = $(shell find . -type f -name "*.exe" -o -name "*.dll" -o -name "*.netmodule" -o -name "*.config") - -# Target to precompile the test executables -test-local: $(TESTS_REGULAR) $(TESTS_STRESS) $(TESTS_GSHARED) $(TESTSAOT_CS) $(TESTSAOT_IL) $(TESTSAOT_BENCH) $(TESTSAOT_STRESS) $(TESTSAOT_GSHARED) $(TESTS_TAILCALL) $(TESTSAOT_TAILCALL) compile-gac-loading compile-assembly-load-reference test-runner.exe - -test-bundle-local: - mkdir -p $(addprefix $(TEST_BUNDLE_PATH)/tests/runtime/,$(sort $(dir $(TESTS_INCL_DEPS)))) - @echo $(TESTS_REGULAR) > $(TEST_BUNDLE_PATH)/tests/runtime/runtime-test-list.txt - sed -e 's,$$mono_libdir,$$test_root_dir,g' tests-config > $(TEST_BUNDLE_PATH)/tests/runtime/tests-config.tmpl - cp -L .libs/libtest$(libsuffix) $(TEST_BUNDLE_PATH)/tests/runtime/ - $(foreach asset,$(TESTS_INCL_DEPS),cp -L $(asset) $(TEST_BUNDLE_PATH)/tests/runtime/$(dir $(asset));) - -# Precompile the test assemblies in parallel -compile-tests: - $(MAKE) -j4 test - -# Remove empty .stdout and .stderr files for wrench -rm-empty-logs: - @echo "Removing empty logs..." - find . '(' -name "*.stdout" -o -name "*.stderr" ')' -size 0 -exec rm {} \; - -TestDriver.dll: - $(MCS) -target:library -out:$@ $(srcdir)/../mini/TestDriver.cs $(srcdir)/../mini/TestHelpers.cs - -runtest: compile-tests - @failed=0; \ - passed=0; \ - failed_tests="";\ - if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \ - rm -f testlist testlist.sorted; \ - for i in $(TESTS_REGULAR); do echo $${i} >> testlist; sort testlist > testlist.sorted; done; \ - for i in `cat testlist.sorted`; do \ - rm -f $${i}.so; \ - $(with_mono_path) $(JITTEST_PROG_RUN) --aot $(TEST_AOT_BUILD_FLAGS) --debug $${i} > $${i}.aotlog 2>&1 || exit 1; \ - if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" "$${dump_action}" $(TEST_RUNTIME_ARGS) $(TEST_AOT_RUN_FLAGS) ; \ - then \ - passed=`expr $${passed} + 1`; \ - else \ - if [ $$? = 2 ]; then break; fi; \ - failed=`expr $${failed} + 1`; \ - failed_tests="$${failed_tests} $$i"; \ - fi \ - done; \ - echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \ - rm -f testlist testlist.sorted; \ - if [ $${failed} != 0 ]; then \ - echo -e "\nFailed tests:\n"; \ - for i in $${failed_tests}; do \ - echo $${i}; \ - if [ "x$$V" = "x1" ]; then \ - cat $${i}.stdout; \ - cat $${i}.stderr; \ - fi; \ - done; \ - exit 1; \ - fi - -runtest-managed: test-runner.exe compile-tests - $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j a --testsuite-name "runtime" --timeout 300 --disabled "$(DISABLED_TESTS)" $(TESTS_REGULAR) - -runtest-managed-serial: test-runner.exe compile-tests - $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j 1 --testsuite-name "runtime" --disabled "$(DISABLED_TESTS)" $(TESTS_REGULAR) - -test-jit: - @if test x$(M) != x0; then $(MAKE) runtest-managed; else $(MAKE) runtest; fi - -testaot: - @$(MAKE) AOT=1 runtest - -testtrace: - @$(MAKE) TEST_RUNTIME_ARGS="$${TEST_RUNTIME_ARGS} --trace" runtest - -testinterp: test-runner.exe compile-tests - $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j a --runtime-args "--interpreter" --testsuite-name "runtime-interp" --timeout 300 --disabled "$(INTERP_DISABLED_TESTS)" $(TESTS_REGULAR) - -testfullaotinterp: test-runner.exe compile-tests - $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j a --runtime-args "--full-aot-interp" --testsuite-name "runtime-aot-interp" --timeout 300 --disabled "$(INTERP_DISABLED_TESTS)" $(TESTS_REGULAR) - -testllvmonlyinterp: test-runner.exe compile-tests - $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j a --runtime-args "--llvmonly-interp" --testsuite-name "runtime-aot-interp" --timeout 300 --disabled "$(INTERP_DISABLED_TESTS)" $(TESTS_REGULAR) - -testjitspeed: $(JITTEST_PROG) compile-tests - for i in $(TESTS_BENCH); do \ - echo $$i; \ - time $(JITTEST_PROG) $$i; \ - done - -test-iomap-regression: exists.exe - @echo "Testing exists.exe..." - @MONO_IOMAP=all $(RUNTIME) exists.exe - -stresstest: compile-tests - @failed=0; \ - passed=0; \ - failed_tests="";\ - for i in $(TESTS_STRESS); do \ - if $(srcdir)/stress-runner.pl $$i ../mini/mono $(TEST_RUNTIME_ARGS); \ - then \ - passed=`expr $${passed} + 1`; \ - else \ - if [ $$? = 2 ]; then break; fi; \ - failed=`expr $${failed} + 1`; \ - failed_tests="$${failed_tests} $$i"; \ - fi \ - done; \ - echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \ - if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \ - for i in $${failed_tests}; do echo $${i}; done; exit 1; fi - -testbundle: console.exe - @echo "Testing mkbundle..." - @$(MKBUNDLE) --static console.exe > mkbundle.stdout - @$(with_mono_path) MONO_CFG_DIR=$(mono_cfg_dir) ./a.out >> mkbundle.stdout - @- rm -rf a.out - -EXTRA_DIST += load-missing.il t-missing.cs load-exceptions.cs - -load-missing.dll: load-missing.il - $(Q) $(ILASM) /dll /output:$@ $< - -load-exceptions.exe t.dll: load-exceptions.cs t-missing.cs load-missing.dll $(TEST_DRIVER_DEPEND) - $(Q) $(MCS) -t:library -out:t.dll -d:FOUND t-missing.cs - $(Q) $(MCS) -r:TestDriver.dll -r:load-missing.dll -r:t.dll -out:$@ $< - $(Q) $(MCS) -t:library -out:t.dll t-missing.cs - -test-type-load: load-exceptions.exe -if !POWERPC64 - $(Q) $(RUNTIME) load-exceptions.exe > load-exceptions.exe.stdout 2> load-exceptions.exe.stderr -endif - -EXTRA_DIST += test-multi-netmodule-1-netmodule.cs test-multi-netmodule-2-dll1.cs test-multi-netmodule-3-dll2.cs test-multi-netmodule-4-exe.cs - -test-multi-netmodule-1-netmodule.netmodule: test-multi-netmodule-1-netmodule.cs - $(Q) $(MCS) -t:module -out:$@ $< -test-multi-netmodule-2-dll1.dll: test-multi-netmodule-2-dll1.cs test-multi-netmodule-1-netmodule.netmodule - $(Q) $(MCS) -addmodule:test-multi-netmodule-1-netmodule.netmodule -t:library -out:$@ $< -test-multi-netmodule-3-dll2.dll: test-multi-netmodule-3-dll2.cs test-multi-netmodule-1-netmodule.netmodule - $(Q) $(MCS) -addmodule:test-multi-netmodule-1-netmodule.netmodule -t:library -out:$@ $< -test-multi-netmodule-4-exe.exe: test-multi-netmodule-4-exe.cs test-multi-netmodule-2-dll1.dll test-multi-netmodule-3-dll2.dll - $(Q) $(MCS) -r:test-multi-netmodule-2-dll1.dll -out:$@ $< - -test-multi-netmodule: test-multi-netmodule-4-exe.exe - $(Q) $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" $< - -EXTRA_DIST += custom-attr-errors.cs custom-attr-errors-lib.cs - -custom-attr-errors.exe custom-attr-errors-lib.dll: custom-attr-errors.cs custom-attr-errors-lib.cs $(TEST_DRIVER_DEPEND) - $(Q) $(MCS) /t:library -D:WITH_MEMBERS custom-attr-errors-lib.cs - $(Q) $(MCS) -r:TestDriver.dll -r:custom-attr-errors-lib.dll custom-attr-errors.cs - $(Q) $(MCS) /t:library custom-attr-errors-lib.cs - -test-cattr-type-load: custom-attr-errors.exe - $(Q) $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" $< - -EXTRA_DIST += reflection-load-with-context-lib.cs reflection-load-with-context-second-lib.cs reflection-load-with-context.cs - -reflection-load-with-context-second-lib.dll: reflection-load-with-context-second-lib.cs - $(Q) $(MCS) /t:library -out:$@ $< -reflection-load-with-context-lib.dll: reflection-load-with-context-lib.cs reflection-load-with-context-second-lib.dll - $(Q) $(MCS) /t:library -r:reflection-load-with-context-second-lib.dll -out:$@ $< -reflection-load-with-context.exe: reflection-load-with-context-lib.dll - -test-reflection-load-with-context: reflection-load-with-context.exe - $(Q) $(RUNTIME) reflection-load-with-context.exe > reflection-load-with-context.exe.stdout 2> reflection-load-with-context.exe.stderr - - -EXTRA_DIST += debug-casts.cs -# This depends on TLS, so its not ran by default -debug-casts: debug-casts.exe - $(Q) $(RUNTIME) --debug=casts debug-casts.exe - -EXTRA_DIST += sgen-bridge.cs sgen-descriptors.cs sgen-gshared-vtype.cs sgen-bridge-major-fragmentation.cs sgen-domain-unload.cs sgen-weakref-stress.cs sgen-cementing-stress.cs sgen-case-23400.cs finalizer-wait.cs critical-finalizers.cs sgen-domain-unload-2.cs sgen-suspend.cs sgen-new-threads-dont-join-stw.cs sgen-new-threads-dont-join-stw-2.cs sgen-new-threads-collect.cs sgen-bridge-xref.cs bug-17590.cs sgen-toggleref.cs sgen-bridge-gchandle.cs - -test-sgen: - ok=; \ - $(MAKE) test-sgen-regular || ok=false; \ - $(MAKE) test-sgen-toggleref || ok=false; \ - $(MAKE) test-sgen-bridge || ok=false; \ - $(MAKE) test-sgen-bridge2 || ok=false; \ - $(MAKE) test-sgen-bridge3 || ok=false; \ - $$ok - -test-stress-sgen: - ok=; \ - $(MAKE) test-stress-sgen-regular || ok=false; \ - $(MAKE) test-stress-sgen-toggleref || ok=false; \ - $(MAKE) test-stress-sgen-bridge || ok=false; \ - $(MAKE) test-stress-sgen-bridge2 || ok=false; \ - $(MAKE) test-stress-sgen-bridge3 || ok=false; \ - $$ok - -TESTS_SGEN_REGULAR_SRC = \ - finalizer-wait.cs \ - critical-finalizers.cs \ - sgen-descriptors.cs \ - sgen-gshared-vtype.cs \ - sgen-weakref-stress.cs \ - sgen-cementing-stress.cs \ - sgen-case-23400.cs \ - sgen-new-threads-dont-join-stw.cs \ - sgen-new-threads-dont-join-stw-2.cs \ - sgen-new-threads-collect.cs \ - gc-graystack-stress.cs \ - bug-17590.cs \ - sgen-domain-unload.cs \ - sgen-domain-unload-2.cs - -TESTS_SGEN_REGULAR=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_REGULAR_SRC:.cs=.exe)) - -if FULL_AOT_TESTS -TESTSAOT_SGEN_REGULAR=$(TESTS_SGEN_REGULAR:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -TESTSAOT_SGEN_REGULAR=$(TESTS_SGEN_REGULAR:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -# The .cs tests are not interesting initially but should be later. - -#FIXME -#coreclr/tailcall/CoreMangLib/system/span/SlowTailCallArgs.cs(124,13): error CS8107: Feature 'ref structs' is not available in C# 7.0. Please use language version 7.2 or greater. -#coreclr/tailcall/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestailcall.cs(17,9): error CS0103: The name 'TestLibrary' does not exist in the current context - -TEST_TAILCALL_CS_SRC=\ - tailcall/coreclr/JIT/CodeGenBringUpTests/RecursiveTailCall.cs \ - tailcall/coreclr/JIT/Methodical/tailcall/Desktop/thread-race.cs \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/delegateParamCallTarget.cs \ - tailcall/coreclr/JIT/opt/FastTailCall/FastTailCallCandidates.cs \ - tailcall/coreclr/JIT/opt/FastTailCall/FastTailCallInlining.cs \ - tailcall/coreclr/JIT/opt/FastTailCall/GitHubIssue12479.cs \ - tailcall/coreclr/JIT/opt/FastTailCall/StackFixup.cs \ - tailcall/coreclr/JIT/opt/FastTailCall/StructPassingSimple.cs - -# At these locations we have .cs and .il. -# The .il is clearly derived from the .cs, such as by running -# csc + ildasm + edit. -# The .cs is opportunistically optimizable, see https://github.com/mono/mono/issues/7259. -# But for now we only want the .il. -#tailcall/coreclr/JIT/Methodical/Boxing/misc/tailjump.cs -#tailcall/coreclr/JIT/Methodical/Invoke/SEH/catchfinally_tail.cs -#tailcall/coreclr/JIT/Methodical/nonvirtualcall/tailcall.cs -#tailcall/coreclr/JIT/Methodical/tailcall/compat_i2_bool.il -#tailcall/coreclr/JIT/Methodical/tailcall/compat_i4_i1.il -#tailcall/coreclr/JIT/Methodical/tailcall/compat_i4_u.il -#tailcall/coreclr/JIT/Methodical/tailcall/compat_i_u2.il -#tailcall/coreclr/JIT/Methodical/tailcall/compat_r4_r8.il -#tailcall/coreclr/JIT/Methodical/tailcall/compat_r8_r4.il - -TEST_TAILCALL_IL_SRC=\ - tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyWithPrefix.il \ - tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyTransparentLibraryWithPrefix.il \ - tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyVerifiableLibraryWithPrefix.il \ - tailcall/coreclr/JIT/Directed/coverage/importer/badtailcall.il \ - tailcall/coreclr/JIT/Directed/coverage/importer/Desktop/badtailcall.il \ - tailcall/coreclr/JIT/Directed/IL/mutualrecur-tailcall/MutualRecur-TailCall.il \ - tailcall/coreclr/JIT/Directed/IL/PInvokeTail/tailwinapi.il \ - tailcall/coreclr/JIT/Directed/IL/Tailcall/JitTailcall1.il \ - tailcall/coreclr/JIT/Directed/IL/Tailcall/Jittailcall2.il \ - tailcall/coreclr/JIT/Directed/pinvoke/tail.il \ - tailcall/coreclr/JIT/Directed/tailcall/tailcall.il \ - tailcall/coreclr/JIT/IL_Conformance/Old/Base/tailcall.il \ - tailcall/coreclr/JIT/Methodical/Boxing/boxunbox/tailcall.il \ - tailcall/coreclr/JIT/Methodical/Boxing/misc/tailjump.il \ - tailcall/coreclr/JIT/Methodical/Invoke/fptr/recurse_tail_call.il \ - tailcall/coreclr/JIT/Methodical/Invoke/fptr/recurse_tail_calli.il \ - tailcall/coreclr/JIT/Methodical/Invoke/SEH/catchfault_tail.il \ - tailcall/coreclr/JIT/Methodical/Invoke/SEH/catchfinally_tail.il \ - tailcall/coreclr/JIT/Methodical/nonvirtualcall/tailcall.il \ - tailcall/coreclr/JIT/Methodical/tailcall/compat_obj.il \ - tailcall/coreclr/JIT/Methodical/tailcall/compat_v.il \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_array.il \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_array_nz.il \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_gc.il \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_inst.il \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_value.il \ - tailcall/coreclr/JIT/Methodical/tailcall/deep_virt.il \ - tailcall/coreclr/JIT/Methodical/tailcall/gcval.il \ - tailcall/coreclr/JIT/Methodical/tailcall/gcval_nested.il \ - tailcall/coreclr/JIT/Methodical/tailcall/gcval_sideeffect.il \ - tailcall/coreclr/JIT/Methodical/tailcall/pointer.il \ - tailcall/coreclr/JIT/Methodical/tailcall/pointer_i.il \ - tailcall/coreclr/JIT/Methodical/tailcall/recurse_ep.il \ - tailcall/coreclr/JIT/Methodical/tailcall/recurse_ep_void.il \ - tailcall/coreclr/JIT/Methodical/tailcall/reference_i.il \ - tailcall/coreclr/JIT/Methodical/tailcall/test_2a.il \ - tailcall/coreclr/JIT/Methodical/tailcall/test_2b.il \ - tailcall/coreclr/JIT/Methodical/tailcall/test_2c.il \ - tailcall/coreclr/JIT/Methodical/tailcall/test_3b.il \ - tailcall/coreclr/JIT/Methodical/tailcall/test_implicit.il \ - tailcall/coreclr/JIT/Methodical/tailcall/test_mutual_rec.il \ - tailcall/coreclr/JIT/Methodical/tailcall/test_switch.il \ - tailcall/coreclr/JIT/Methodical/tailcall/test_virt.il \ - tailcall/coreclr/JIT/Methodical/tailcall/test_void.il \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/delegateTail.il \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/hijacking.il \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/smallFrame.il \ - tailcall/coreclr/JIT/Methodical/tailcall_v4/tailcall_AV.il \ - tailcall/coreclr/JIT/opt/ETW/TailCallCases.il \ - tailcall/coreclr/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102844/tailcallcalli.il - -test-sgen-regular: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) - ok=; \ - $(MAKE) test-sgen-regular-ms-simple || ok=false; \ - $(MAKE) test-sgen-regular-ms-conc-simple || ok=false; \ - $$ok - -test-stress-sgen-regular: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) - ok=; \ - $(MAKE) test-sgen-regular-ms-simple MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-regular-ms-conc-simple MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-regular-ms-conc-par-simple MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-regular-ms-conc-split MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-regular-ms-conc-split-95-clear-at-gc MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-regular-ms-conc-par-simple-par-dyn MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-regular-ms-conc-par-simple-par-512k MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-regular-ms-conc-par-simple-par-32m MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-regular-ms-conc-par-simple-par-dyn-clear-at-gc MONO_TESTS_STRESS=1 || ok=false; \ - $$ok - -test-sgen-regular-ms-simple: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR) -test-sgen-regular-ms-conc-simple: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR) -test-sgen-regular-ms-conc-par-simple: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc-par,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR) -test-sgen-regular-ms-conc-split: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR) -test-sgen-regular-ms-conc-split-95-clear-at-gc: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=major=marksweep-conc,minor=split,alloc-ratio=95" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR) -test-sgen-regular-ms-conc-par-simple-par-dyn: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR) -test-sgen-regular-ms-conc-par-simple-par-512k: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=512k" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR) -test-sgen-regular-ms-conc-par-simple-par-32m: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=32m" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR) -test-sgen-regular-ms-conc-par-simple-par-dyn-clear-at-gc: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR) - -TESTS_SGEN_TOGGLEREF_SRC= \ - sgen-toggleref.cs - -TESTS_SGEN_TOGGLEREF=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_TOGGLEREF_SRC:.cs=.exe)) - -if FULL_AOT_TESTS -TESTSAOT_SGEN_TOGGLEREF=$(TESTS_SGEN_TOGGLEREF:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -TESTSAOT_SGEN_TOGGLEREF=$(TESTS_SGEN_TOGGLEREF:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -test-sgen-toggleref: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) - ok=; \ - $(MAKE) test-sgen-toggleref-ms-simple || ok=false; \ - $(MAKE) test-sgen-toggleref-ms-conc-simple || ok=false; \ - $$ok - -test-stress-sgen-toggleref: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) - ok=; \ - $(MAKE) test-sgen-toggleref-ms-simple MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-toggleref-ms-conc-simple MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-toggleref-ms-conc-par-simple MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-toggleref-ms-conc-split MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-toggleref-ms-conc-split-95-clear-at-gc MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-toggleref-ms-conc-par-simple-par-dyn MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-toggleref-ms-conc-par-simple-par-512k MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-toggleref-ms-conc-par-simple-par-32m MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-toggleref-ms-conc-par-simple-par-dyn-clear-at-gc MONO_TESTS_STRESS=1 || ok=false; \ - $$ok - -test-sgen-toggleref-ms-simple: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF) -test-sgen-toggleref-ms-conc-simple: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF) -test-sgen-toggleref-ms-conc-par-simple: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF) -test-sgen-toggleref-ms-conc-split: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF) -test-sgen-toggleref-ms-conc-split-95-clear-at-gc: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=toggleref-test,major=marksweep-conc,minor=split,alloc-ratio=95" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF) -test-sgen-toggleref-ms-conc-par-simple-par-dyn: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple-par,dynamic-nursery" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF) -test-sgen-toggleref-ms-conc-par-simple-par-512k: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple-par,nursery-size=512k" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF) -test-sgen-toggleref-ms-conc-par-simple-par-32m: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple-par,nursery-size=32m" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF) -test-sgen-toggleref-ms-conc-par-simple-par-dyn-clear-at-gc: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple-par,dynamic-nursery" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF) - -TESTS_SGEN_BRIDGE_SRC= \ - sgen-bridge.cs \ - sgen-bridge-major-fragmentation.cs - -TESTS_SGEN_BRIDGE=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_BRIDGE_SRC:.cs=.exe)) - -if FULL_AOT_TESTS -TESTSAOT_SGEN_BRIDGE=$(TESTS_SGEN_BRIDGE:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -TESTSAOT_SGEN_BRIDGE=$(TESTS_SGEN_BRIDGE:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -test-sgen-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) - ok=; \ - $(MAKE) test-sgen-bridge-ms-simple-tarjan-bridge || ok=false; \ - $(MAKE) test-sgen-bridge-ms-conc-simple-tarjan-bridge || ok=false; \ - $$ok - -test-stress-sgen-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) - ok=; \ - $(MAKE) test-sgen-bridge-ms-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge-ms-conc-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge-ms-conc-split-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge-ms-conc-simple-new-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge-ms-conc-simple-old-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge-ms-conc-par-simple-par-dyn-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge-ms-conc-par-simple-par-512k-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge-ms-conc-par-simple-par-32m-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $$ok - -test-sgen-bridge-ms-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE) -test-sgen-bridge-ms-conc-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE) -test-sgen-bridge-ms-conc-split-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc,minor=split,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE) -test-sgen-bridge-ms-conc-simple-new-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE) -test-sgen-bridge-ms-conc-simple-old-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=old" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE) -test-sgen-bridge-ms-conc-par-simple-par-dyn-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE) -test-sgen-bridge-ms-conc-par-simple-par-512k-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=512k,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE) -test-sgen-bridge-ms-conc-par-simple-par-32m-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=32m,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE) - -TESTS_SGEN_BRIDGE2_SRC= \ - sgen-bridge-xref.cs - -TESTS_SGEN_BRIDGE2=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_BRIDGE2_SRC:.cs=.exe)) - -if FULL_AOT_TESTS -TESTSAOT_SGEN_BRIDGE2=$(TESTS_SGEN_BRIDGE2:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -TESTSAOT_SGEN_BRIDGE2=$(TESTS_SGEN_BRIDGE2:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -test-sgen-bridge2: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) - ok=; \ - $(MAKE) test-sgen-bridge2-ms-simple-tarjan-bridge || ok=false; \ - $(MAKE) test-sgen-bridge2-ms-conc-simple-tarjan-bridge || ok=false; \ - $$ok - -test-stress-sgen-bridge2: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) - ok=; \ - $(MAKE) test-sgen-bridge2-ms-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge2-ms-conc-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge2-ms-conc-split-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge2-ms-conc-simple-new-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge2-ms-conc-simple-old-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge2-ms-conc-par-simple-par-dyn-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge2-ms-conc-par-simple-par-512k-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge2-ms-conc-par-simple-par-32m-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $$ok - -test-sgen-bridge2-ms-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2) -test-sgen-bridge2-ms-conc-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2) -test-sgen-bridge2-ms-conc-split-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc,minor=split,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2) -test-sgen-bridge2-ms-conc-simple-new-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2) -test-sgen-bridge2-ms-conc-simple-old-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=old" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2) -test-sgen-bridge2-ms-conc-par-simple-par-dyn-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2) -test-sgen-bridge2-ms-conc-par-simple-par-512k-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=512k,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2) -test-sgen-bridge2-ms-conc-par-simple-par-32m-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=32m,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2) - -TESTS_SGEN_BRIDGE3_SRC= \ - sgen-bridge-gchandle.cs - -TESTS_SGEN_BRIDGE3=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_BRIDGE3_SRC:.cs=.exe)) - -if FULL_AOT_TESTS -TESTSAOT_SGEN_BRIDGE3=$(TESTS_SGEN_BRIDGE3:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -TESTSAOT_SGEN_BRIDGE3=$(TESTS_SGEN_BRIDGE3:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -test-sgen-bridge3: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) - ok=; \ - $(MAKE) test-sgen-bridge3-ms-simple-tarjan-bridge || ok=false; \ - $(MAKE) test-sgen-bridge3-ms-conc-simple-tarjan-bridge || ok=false; \ - $$ok - -test-stress-sgen-bridge3: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) - ok=; \ - $(MAKE) test-sgen-bridge3-ms-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge3-ms-conc-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge3-ms-conc-split-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge3-ms-conc-simple-new-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge3-ms-conc-simple-old-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge3-ms-conc-par-simple-par-dyn-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge3-ms-conc-par-simple-par-512k-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $(MAKE) test-sgen-bridge3-ms-conc-par-simple-par-32m-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \ - $$ok - -test-sgen-bridge3-ms-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3) -test-sgen-bridge3-ms-conc-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3) -test-sgen-bridge3-ms-conc-split-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc,minor=split,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3) -test-sgen-bridge3-ms-conc-simple-new-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3) -test-sgen-bridge3-ms-conc-simple-old-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=old" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3) -test-sgen-bridge3-ms-conc-par-simple-par-dyn-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3) -test-sgen-bridge3-ms-conc-par-simple-par-512k-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=512k,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3) -test-sgen-bridge3-ms-conc-par-simple-par-32m-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=32m,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3) - -TESTS_SGEN_OOM_SRC = \ - sgen-oom-cementing-stress.cs \ - sgen-oom-new-threads-dont-join-stw-2.cs \ - sgen-oom-bridge-major-fragmentation.cs \ - gc-oom-handling.cs \ - gc-oom-handling2.cs - -TESTS_SGEN_OOM=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_OOM_SRC:.cs=.exe)) - -if FULL_AOT_TESTS -TESTSAOT_SGEN_OOM=$(TESTS_SGEN_OOM:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -TESTSAOT_SGEN_OOM=$(TESTS_SGEN_OOM:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -tests-sgen-oom: $(TESTS_SGEN_OOM) $(TESTSAOT_SGEN_OOM) test-runner.exe sgen-cementing-stress.exe sgen-new-threads-dont-join-stw-2.exe sgen-bridge-major-fragmentation.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=max-valloc-size=50M,bridge=Bridge" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_OOM) - -if HOST_WIN32 -AOT_CONFIGURATIONS= \ - "|regular" -else -AOT_CONFIGURATIONS= \ - "|regular" \ - "--gc=boehm|boehm" -endif - -#LLVM crashes, got to fix it first. -# "--llvm|llvm" \ -# "--llvm --gc=boehm|llvm+boehm" - -AOT_TEMP_DIR=$(top_builddir)/mono/tests/aot-tmp - -test-aot: - @failed=0; \ - passed=0; \ - failed_tests="";\ - profile=$(DEFAULT_PROFILE); \ - rm -rf $(AOT_TEMP_DIR); \ - mkdir $(AOT_TEMP_DIR); \ - rm -f test-aot-$${name}.stdout test-aot-$${name}.stderr; \ - for assembly in $(mcs_topdir)/class/lib/$$profile/*.dll ; do \ - asm_name=`basename $$assembly`; \ - echo "... $$asm_name"; \ - for conf in $(AOT_CONFIGURATIONS); do \ - name=`echo $$conf | cut -d\| -f 2`; \ - params=`echo $$conf | cut -d\| -f 1`; \ - test_name="$${asm_name}|$${name}"; \ - echo " $$test_name"; \ - if MONO_PATH=$(mcs_topdir)/class/lib/$$profile $(JITTEST_PROG_RUN) $$params --aot=temp-path=$(AOT_TEMP_DIR),outfile=$(AOT_TEMP_DIR)/$$asm_name $$assembly >> test-aot-$${name}.stdout 2>> test-aot-$${name}.stderr; \ - then \ - passed=`expr $${passed} + 1`; \ - else \ - failed=`expr $${failed} + 1`; \ - failed_tests="$${failed_tests} $$test_name"; \ - fi \ - done; \ - done; \ - rm -rf $(AOT_TEMP_DIR); \ - echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \ - if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \ - for i in $${failed_tests}; do echo $${i}; done; exit 1; fi - - -# Generated tests for runtime invoke -EXTRA_DIST += gen-runtime-invoke.cs - -runtime-invoke.gen.cs: gen-runtime-invoke.exe - $(Q) $(RUNTIME) gen-runtime-invoke.exe > runtime-invoke.gen.cs - -EXTRA_DIST += make-imt-test.cs - -imt_big_iface_test.cs: make-imt-test.exe - $(Q) $(RUNTIME) make-imt-test.exe > imt_big_iface_test.cs - -EXTRA_DIST += test-inline-call-stack-library.cs test-inline-call-stack.cs - -test-inline-call-stack-library.dll: $(srcdir)/test-inline-call-stack-library.cs - $(MCS) -t:library -out:$@ $< - -test-inline-call-stack.exe$(PLATFORM_AOT_SUFFIX): test-inline-call-stack-library.dll$(PLATFORM_AOT_SUFFIX) -test-inline-call-stack.exe: test-inline-call-stack.cs test-inline-call-stack-library.dll $(TEST_DRIVER_DEPEND) - $(MCS) -r:TestDriver.dll -r:test-inline-call-stack-library.dll -out:$@ $< - -EXTRA_DIST += unhandled-exception-base-configuration.config -EXTRA_DIST += unhandled-exception-legacy-configuration.config -EXTRA_DIST += appdomain-unload.exe.config -EXTRA_DIST += unhandled-exception-test-case.2.cs -EXTRA_DIST += unhandled-exception-test-runner.2.cs -unhandled-exception-test-case.1.cs: unhandled-exception-test-case.2.cs - cp unhandled-exception-test-case.2.cs unhandled-exception-test-case.1.cs -unhandled-exception-test-case-legacy.1.cs: unhandled-exception-test-case.1.cs - cp unhandled-exception-test-case.1.cs unhandled-exception-test-case-legacy.1.cs -unhandled-exception-test-case-legacy.2.cs: unhandled-exception-test-case.2.cs - cp unhandled-exception-test-case.2.cs unhandled-exception-test-case-legacy.2.cs -unhandled-exception-config_files: unhandled-exception-base-configuration.config unhandled-exception-legacy-configuration.config - cp unhandled-exception-base-configuration.config unhandled-exception-test-case.1.exe.config - cp unhandled-exception-base-configuration.config unhandled-exception-test-case.2.exe.config - cp unhandled-exception-legacy-configuration.config unhandled-exception-test-case-legacy.1.exe.config - cp unhandled-exception-legacy-configuration.config unhandled-exception-test-case-legacy.2.exe.config - -unhandled-exception-test-runner.2.exe: unhandled-exception-config_files unhandled-exception-test-case.1.exe unhandled-exception-test-case-legacy.1.exe unhandled-exception-test-case.2.exe unhandled-exception-test-case-legacy.2.exe - -test-unhandled-exception: unhandled-exception-test-runner.2.exe - $(Q) $(RUNTIME) unhandled-exception-test-runner.2.exe RUNTIME:../mini/mono,GTC:F - -safehandle.2.exe winx64structs.exe thunks.exe pinvoke3.exe pinvoke2.exe pinvoke-2.2.exe pinvoke17.exe pinvoke13.exe \ - pinvoke11.exe pinvoke_ppcs.exe pinvoke_ppci.exe pinvoke_ppcf.exe pinvoke_ppcd.exe pinvoke_ppcc.exe pinvoke.exe \ - marshalbool.exe marshal9.exe marshal5.exe marshal.exe handleref.exe cominterop.exe bug-Xamarin-5278.exe \ - bug-58782-plain-throw.exe bug-58782-capture-and-throw.exe install_eh_callback.exe ccw-class-iface.exe: libtest.la - -EXTRA_DIST += event-il.il - -event-get.2.exe$(PLATFORM_AOT_SUFFIX): event-il.exe$(PLATFORM_AOT_SUFFIX) -event-get.2.exe: event-il.exe - -EXTRA_DIST += module-cctor.il - -module-cctor-loader.2.exe$(PLATFORM_AOT_SUFFIX): module-cctor.exe$(PLATFORM_AOT_SUFFIX) -module-cctor-loader.2.exe: module-cctor.exe - -EXTRA_DIST += TestingReferenceAssembly.cs TestingReferenceReferenceAssembly.cs - -reference-loader.exe$(PLATFORM_AOT_SUFFIX): TestingReferenceAssembly.dll$(PLATFORM_AOT_SUFFIX) TestingReferenceReferenceAssembly.dll$(PLATFORM_AOT_SUFFIX) -reference-loader.exe: TestingReferenceAssembly.dll TestingReferenceReferenceAssembly.dll - -assemblyresolve_asm.dll$(PLATFORM_AOT_SUFFIX): assemblyresolve_asm.dll assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX) - MONO_PATH="assemblyresolve_deps:$(CLASS)" $(top_builddir)/runtime/mono-wrapper $(TEST_AOT_BUILD_FLAGS) assemblyresolve_asm.dll -assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX): assemblyresolve_deps/Test.dll assemblyresolve_deps/TestBase.dll$(PLATFORM_AOT_SUFFIX) - -EXTRA_DIST += assemblyresolve_TestBase.cs assemblyresolve_Test.cs assemblyresolve_asm.cs -assemblyresolve_deps: - mkdir -p assemblyresolve_deps -assemblyresolve_deps/TestBase.dll: assemblyresolve_deps $(srcdir)/assemblyresolve_TestBase.cs - $(MCS) -target:library -out:assemblyresolve_deps/TestBase.dll $(srcdir)/assemblyresolve_TestBase.cs -assemblyresolve_deps/Test.dll: assemblyresolve_deps assemblyresolve_deps/TestBase.dll $(srcdir)/assemblyresolve_Test.cs - $(MCS) -target:library -r:assemblyresolve_deps/TestBase.dll -out:assemblyresolve_deps/Test.dll $(srcdir)/assemblyresolve_Test.cs -assemblyresolve_asm.dll: assemblyresolve_deps/Test.dll $(srcdir)/assemblyresolve_asm.cs - $(MCS) -target:library -r:assemblyresolve_deps/TestBase.dll -r:assemblyresolve_deps/Test.dll -out:assemblyresolve_asm.dll $(srcdir)/assemblyresolve_asm.cs - -assemblyresolve_event3.exe$(PLATFORM_AOT_SUFFIX): assemblyresolve_asm.dll$(PLATFORM_AOT_SUFFIX) assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX) assemblyresolve_deps/TestBase.dll$(PLATFORM_AOT_SUFFIX) -assemblyresolve_event3.exe: assemblyresolve_asm.dll assemblyresolve_deps/Test.dll assemblyresolve_deps/TestBase.dll - -assemblyresolve_event4.exe$(PLATFORM_AOT_SUFFIX): assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX) assemblyresolve_deps/TestBase.dll$(PLATFORM_AOT_SUFFIX) -assemblyresolve_event4.exe: assemblyresolve_deps/Test.dll assemblyresolve_deps/TestBase.dll - -EXTRA_DIST += assemblyresolve_event5_label.cs assemblyresolve_event5_helper.cs -assemblyresolve_deps/assemblyresolve_event5_label.dll: assemblyresolve_event5_label.cs assemblyresolve_deps - $(MCS) -target:library -out:assemblyresolve_deps/assemblyresolve_event5_label.dll $(srcdir)/assemblyresolve_event5_label.cs -assemblyresolve_event5_helper.dll: assemblyresolve_event5_helper.cs assemblyresolve_deps/assemblyresolve_event5_label.dll - $(MCS) -target:library -out:assemblyresolve_event5_helper.dll -r:assemblyresolve_deps/assemblyresolve_event5_label.dll $(srcdir)/assemblyresolve_event5_helper.cs -assemblyresolve_event5.exe: assemblyresolve_event5_helper.dll - -assemblyresolve_event6.exe$(PLATFORM_AOT_SUFFIX): assemblyresolve_asm.dll$(PLATFORM_AOT_SUFFIX) assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX) assemblyresolve_deps/TestBase.dll$(PLATFORM_AOT_SUFFIX) -assemblyresolve_event6.exe: assemblyresolve_asm.dll assemblyresolve_deps/Test.dll assemblyresolve_deps/TestBase.dll - -# We use 'test-support-files' to handle an ordering issue between the 'mono/' and 'runtime/' directories -bug-80307.exe: $(srcdir)/bug-80307.cs - $(MCS) -r:$(CLASS)/System.Web.dll -out:$@ $(srcdir)/bug-80307.cs - cd $(top_builddir)/runtime && $(MAKE) test-support-files - -EXTRA_DIST += bug-81673-interface.cs - -bug-81673.exe$(PLATFORM_AOT_SUFFIX): bug-81673-interface.dll$(PLATFORM_AOT_SUFFIX) -bug-81673.exe bug-81673-interface.dll: $(srcdir)/bug-81673.cs $(srcdir)/bug-81673-interface.cs - $(MCS) -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs - $(MCS) -r:bug-81673-interface.dll -out:bug-81673.exe $(srcdir)/bug-81673.cs - $(MCS) -define:WITH_STOP -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs - -EXTRA_DIST += bug-36848-a.cs - -bug-36848.exe$(PLATFORM_AOT_SUFFIX): bug-36848-a.dll$(PLATFORM_AOT_SUFFIX) -bug-36848.exe bug-36848-a.dll: $(srcdir)/bug-36848.cs $(srcdir)/bug-36848-a.cs - $(MCS) -target:library -out:bug-36848-a.dll $(srcdir)/bug-36848-a.cs - $(MCS) -r:bug-36848-a.dll -out:bug-36848.exe $(srcdir)/bug-36848.cs - $(MCS) -define:WITH_STOP -target:library -out:bug-36848-a.dll $(srcdir)/bug-36848-a.cs - -EXTRA_DIST += bug-81691-a.cs bug-81691-b.cs - -bug-81691.exe$(PLATFORM_AOT_SUFFIX): bug-81691-b.dll$(PLATFORM_AOT_SUFFIX) -bug-81691.exe bug-81691-a.dll bug-81691-b.dll: $(srcdir)/bug-81691.cs $(srcdir)/bug-81691-a.cs $(srcdir)/bug-81691-b.cs - $(MCS) -target:library -out:bug-81691-a.dll $(srcdir)/bug-81691-a.cs - $(MCS) -r:bug-81691-a.dll -target:library -out:bug-81691-b.dll $(srcdir)/bug-81691-b.cs - $(MCS) -r:bug-81691-b.dll -out:bug-81691.exe $(srcdir)/bug-81691.cs - rm -f bug-81691-a.dll - -EXTRA_DIST += bug-81466-lib.il - -bug-81466.exe$(PLATFORM_AOT_SUFFIX): bug-81466-lib.dll$(PLATFORM_AOT_SUFFIX) -bug-81466.exe bug-81466-lib.dll: $(srcdir)/bug-81466.il $(srcdir)/bug-81466-lib.il - $(ILASM) /dll /output:bug-81466-lib.dll $(srcdir)/bug-81466-lib.il - $(ILASM) /exe /output:bug-81466.exe $(srcdir)/bug-81466.il - -EXTRA_DIST += bug-324535-il.il - -bug-324535.exe$(PLATFORM_AOT_SUFFIX): bug-324535-il.dll$(PLATFORM_AOT_SUFFIX) -bug-324535.exe bug-324535-il.dll: $(srcdir)/bug-324535.cs $(srcdir)/bug-324535-il.il - $(ILASM) /dll /output:bug-324535-il.dll $(srcdir)/bug-324535-il.il - $(MCS) -r:bug-324535-il.dll -out:bug-324535.exe $(srcdir)/bug-324535.cs - -EXTRA_DIST += custom-modifiers.2.cs custom-modifiers-lib.il - -custom-modifiers.2.exe$(PLATFORM_AOT_SUFFIX): custom-modifiers-lib.dll$(PLATFORM_AOT_SUFFIX) -custom-modifiers.2.exe custom-modifiers-lib.dll: $(srcdir)/custom-modifiers.2.cs $(srcdir)/custom-modifiers-lib.il - $(ILASM) /dll /output:custom-modifiers-lib.dll $(srcdir)/custom-modifiers-lib.il - $(MCS) -r:custom-modifiers-lib.dll -out:custom-modifiers.2.exe $(srcdir)/custom-modifiers.2.cs - -EXTRA_DIST += bug-382986-lib.cs - -bug-382986.exe$(PLATFORM_AOT_SUFFIX): bug-382986-lib.dll$(PLATFORM_AOT_SUFFIX) -bug-382986.exe bug-382986-lib.dll: $(srcdir)/bug-382986.cs $(srcdir)/bug-382986-lib.cs - $(MCS) -target:library -out:bug-382986-lib.dll $(srcdir)/bug-382986-lib.cs - $(MCS) -r:bug-382986-lib.dll -out:bug-382986.exe $(srcdir)/bug-382986.cs - -EXTRA_DIST += bug-17537-helper.cs - -bug-17537.exe$(PLATFORM_AOT_SUFFIX): bug-17537-helper.exe$(PLATFORM_AOT_SUFFIX) -bug-17537-helper.exe: $(srcdir)/bug-17537-helper.cs - $(MCS) -out:$@ $< - chmod -x $@ -bug-17537.exe: bug-17537-helper.exe - -EXTRA_DIST += coreclr-security.cs - -test-coreclr-security : coreclr-security.exe - @$(RUNTIME_MOONLIGHT) --security=core-clr-test coreclr-security.exe - -EXTRA_DIST += generic-unboxing.2.il generic-boxing.2.il - -generic-unboxing.2.dll: $(srcdir)/generic-unboxing.2.il - $(ILASM) /dll /output:$@ $< -generic-boxing.2.dll: $(srcdir)/generic-boxing.2.il generic-unboxing.2.dll - $(ILASM) /dll /output:$@ $< - -EXTRA_DIST += generic-unbox.2.cs - -generic-unbox.2.exe$(PLATFORM_AOT_SUFFIX): generic-unboxing.2.dll$(PLATFORM_AOT_SUFFIX) -generic-unbox.2.exe: $(srcdir)/generic-unbox.2.cs generic-unboxing.2.dll - $(MCS) -r:generic-unboxing.2.dll -out:$@ $< - -EXTRA_DIST += generic-box.2.cs - -generic-box.2.exe$(PLATFORM_AOT_SUFFIX): generic-unboxing.2.dll$(PLATFORM_AOT_SUFFIX) generic-boxing.2.dll$(PLATFORM_AOT_SUFFIX) -generic-box.2.exe : $(srcdir)/generic-box.2.cs generic-unboxing.2.dll generic-boxing.2.dll - $(MCS) -r:generic-unboxing.2.dll,generic-boxing.2.dll -out:$@ $< - -EXTRA_DIST += generic-delegate2.2.cs generic-delegate2-lib.2.il - -generic-delegate2-lib.2.dll: $(srcdir)/generic-delegate2-lib.2.il - $(ILASM) /dll /output:$@ $< - -generic-delegate2.2.exe$(PLATFORM_AOT_SUFFIX): generic-delegate2-lib.2.dll$(PLATFORM_AOT_SUFFIX) -generic-delegate2.2.exe: $(srcdir)/generic-delegate2.2.cs generic-delegate2-lib.2.dll - $(MCS) -r:generic-delegate2-lib.2.dll -out:$@ $< - -bug-3903.exe: bug-3903.cs - $(MCS_NO_LIB) $(srcdir)/bug-3903.cs -nostdlib -r:$(srcdir)/../../external/binary-reference-assemblies/v2.0/mscorlib.dll -r:$(srcdir)/../../external/binary-reference-assemblies/v2.0/System.Core.dll -out:$@ - -EXTRA_DIST += appdomain-marshalbyref-assemblyload-MidAssembly.cs appdomain-marshalbyref-assemblyload-LeafAssembly.cs - -LeafAssembly.dll: appdomain-marshalbyref-assemblyload-LeafAssembly.cs - mkdir -p appdomain-marshalbyref-assemblyload1 - $(MCS) -target:library -out:$@ $< - -appdomain-marshalbyref-assemblyload2/LeafAssembly.dll: appdomain-marshalbyref-assemblyload-LeafAssembly.cs - mkdir -p appdomain-marshalbyref-assemblyload2 - $(MCS) -target:library -out:$@ $< -define:UNDEFINE_OTHER_METHOD - -MidAssembly.dll: appdomain-marshalbyref-assemblyload-MidAssembly.cs LeafAssembly.dll - mkdir -p appdomain-marshalbyref-assemblyload1 - $(MCS) -target:library -out:$@ $< -r:LeafAssembly.dll - -appdomain-marshalbyref-assemblyload.exe: appdomain-marshalbyref-assemblyload.cs MidAssembly.dll LeafAssembly.dll appdomain-marshalbyref-assemblyload2/LeafAssembly.dll - $(MCS) -out:$@ $< -r:MidAssembly.dll -r:LeafAssembly.dll - -assembly-load-dir1/Lib.dll: assembly-load-dir1/Lib.cs - $(MKDIR_P) $(dir $@) - $(MCS) -target:library -out:$@ $< -assembly-load-dir2/Lib.dll: assembly-load-dir2/Lib.cs - $(MKDIR_P) $(dir $@) - $(MCS) -target:library -out:$@ $< - -assembly-load-dir1/LibStrongName.dll: assembly-load-dir1/LibStrongName.cs testing_gac/testkey.snk - $(MKDIR_P) $(dir $@) - $(MCS) -target:library -out:$@ $< -keyfile:$(dir $<)../testing_gac/testkey.snk - -assembly-load-dir2/LibStrongName.dll: assembly-load-dir2/LibStrongName.cs testing_gac/testkey.snk - $(MKDIR_P) $(dir $@) - $(MCS) -target:library -out:$@ $< -keyfile:$(dir $<)../testing_gac/testkey.snk - -EXTRA_DIST += assembly-load-dir1/Lib.cs assembly-load-dir2/Lib.cs \ - assembly-load-dir1/LibStrongName.cs assembly-load-dir2/LibStrongName.cs - -assembly-load-bytes.exe: assembly-load-dir1/Lib.dll assembly-load-dir2/Lib.dll - -assembly-loadfrom.exe$(PLATFORM_AOT_SUFFIX): assembly-load-dir1/Lib.dll$(PLATFORM_AOT_SUFFIX) assembly-load-dir2/Lib.dll$(PLATFORM_AOT_SUFFIX) -assembly-loadfrom.exe: assembly-load-dir1/Lib.dll assembly-load-dir2/Lib.dll - -assembly-loadfile.exe$(PLATFORM_AOT_SUFFIX): assembly-load-dir1/Lib.dll$(PLATFORM_AOT_SUFFIX) assembly-load-dir2/Lib.dll$(PLATFORM_AOT_SUFFIX) -assembly-loadfile.exe: assembly-load-dir1/Lib.dll assembly-load-dir2/Lib.dll - -assembly-loadfrom-bindingredirect.exe$(PLATFORM_AOT_SUFFIX): assembly-load-dir1/LibStrongName.dll$(PLATFORM_AOT_SUFFIX) assembly-load-dir2/LibStrongName.dll$(PLATFORM_AOT_SUFFIX) assembly-loadfrom-bindingredirect.exe.config -assembly-loadfrom-bindingredirect.exe: assembly-load-dir1/LibStrongName.dll assembly-load-dir2/LibStrongName.dll assembly-loadfrom-bindingredirect.exe.config - -assembly-loadfile-bindingredirect.exe$(PLATFORM_AOT_SUFFIX): assembly-load-dir1/LibStrongName.dll$(PLATFORM_AOT_SUFFIX) assembly-load-dir2/LibStrongName.dll$(PLATFORM_AOT_SUFFIX) assembly-loadfile-bindingredirect.exe.config -assembly-loadfile-bindingredirect.exe: assembly-load-dir1/LibStrongName.dll assembly-load-dir2/LibStrongName.dll assembly-loadfile-bindingredirect.exe.config - -assembly-load-bytes-bindingredirect.exe: assembly-load-dir1/LibStrongName.dll assembly-load-dir2/LibStrongName.dll assembly-load-bytes-bindingredirect.exe.config - -assembly-refonly-load-bytes-bindingredirect.exe: assembly-load-dir1/LibStrongName.dll assembly-load-dir2/LibStrongName.dll assembly-refonly-load-bytes-bindingredirect.exe.config - - -EXTRA_DIST += assembly-loadfrom-bindingredirect.exe.config assembly-loadfile-bindingredirect.exe.config assembly-load-bytes-bindingredirect.exe.config -EXTRA_DIST += assembly-refonly-load-bytes-bindingredirect.exe.config - -assembly-load-dir1/LibSimpleName.dll: assembly-load-dir1/LibSimpleName.cs - $(MKDIR_P) $(dir $@) - $(MCS) -target:library -out:$@ $< - -# NOTE: unlike assembly-load-dir1/LibSimpleName.dll, the output name here is in all lower case! -assembly-load-dir2/libsimplename.dll: assembly-load-dir2/LibSimpleName.cs - $(MKDIR_P) $(dir $@) - $(MCS) -target:library -out:$@ $< - -assembly-dep-simplename.dll: assembly-dep-simplename.cs assembly-load-dir1/LibSimpleName.dll - $(MCS) -target:library -out:$@ $< -r:assembly-load-dir1/LibSimpleName.dll - -# NOTE: while we compile assembly-dep-simplename.dll using assembly-load-dir1, we AOT it using assembly-load-dir2 -# (So that the AOT image has the right GUID of the referenced assembly baked in) -assembly-dep-simplename.dll$(PLATFORM_AOT_SUFFIX): assembly-dep-simplename.dll assembly-load-dir2/libsimplename.dll$(PLATFORM_AOT_SUFFIX) - MONO_PATH=$(CLASS):assembly-load-dir2 $(top_builddir)/runtime/mono-wrapper $(TEST_AOT_BUILD_FLAGS) --aot-path=assembly-load-dir2 assembly-dep-simplename.dll - -EXTRA_DIST += assembly-load-dir1/LibSimpleName.cs assembly-load-dir2/LibSimpleName.cs \ - assembly-dep-simplename.cs - -assembly-loadfrom-simplename.exe: assembly-dep-simplename.dll assembly-load-dir2/libsimplename.dll - -assembly-loadfrom-simplename.exe$(PLATFORM_AOT_SUFFIX): assembly-load-dir2/libsimplename.dll$(PLATFORM_AOT_SUFFIX) assembly-dep-simplename.dll$(PLATFORM_AOT_SUFFIX) - -gshared: - $(MAKE) test-generic-sharing - -gshared-aot: - @$(MAKE) AOT=1 gshared - -test-generic-sharing-normal: $(TESTS_GSHARED) $(TESTSAOT_GSHARED) - @for fn in $+ ; do \ - echo "Testing $$fn ..."; \ - $(RUNTIME) -O=gshared $$fn > $$fn.stdout || exit 1; \ - $(RUNTIME) -O=gshared,shared $$fn > $$fn.stdout || exit 1; \ - $(RUNTIME) -O=gshared,-inline $$fn > $$fn.stdout || exit 1; \ - $(RUNTIME) -O=gshared,-inline,shared $$fn > $fn.stdout || exit 1; \ - if [ x$(AOT) = x1 ]; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $$fn > /dev/null || exit 1; $(RUNTIME) $$fn > $$fn.stdout || exit 1; fi; \ - done - -test-generic-sharing-managed: test-runner.exe $(TESTS_GSHARED) $(TESTSAOT_GSHARED) - $(Q) $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name "gshared" --disabled "$(DISABLED_TESTS)" --opt-sets "gshared gshared,shared gshared,-inline gshared,-inline,shared" $(TESTS_GSHARED) - -test-generic-sharing: - @if test x$(M) != x0; then $(MAKE) test-generic-sharing-managed; else $(MAKE) test-generic-sharing-normal; fi - -EXTRA_DIST += async-exceptions.cs -async-exceptions.exe : async-exceptions.cs - $(MCS) -out:async-exceptions.exe $(srcdir)/async-exceptions.cs -test-async-exceptions : async-exceptions.exe - for i in `echo 0 1 2 3 4 5 6 7 8 9 10`; do $(RUNTIME) --inject-async-exc Tests:foo $$i async-exceptions.exe || exit 1; done - for i in `echo 0 1 2 3 4 5 6 7 8 9 10`; do $(RUNTIME) --inject-async-exc Tests:bar $$i async-exceptions.exe || exit 1; done - -EXTRA_DIST += modules.cs modules-m1.cs -modules-m1.netmodule: modules-m1.cs - $(MCS) -out:$@ /target:module $(srcdir)/modules-m1.cs -modules.exe: modules.cs modules-m1.netmodule $(TEST_DRIVER_DEPEND) - $(MCS) -out:$@ /addmodule:modules-m1.netmodule -r:TestDriver.dll $(srcdir)/modules.cs - -# Useful if mono is compiled with --enable-shared=no -patch-libtool: - cp "../../libtool" . - sed -e 's,build_libtool_libs=no,build_libtool_libs=yes,g' libtool > 2; mv 2 libtool - sed -e 's,LIBTOOL =,LIBTOOL2 =,g' Makefile > 2 && echo "LIBTOOL = bash ./libtool" > 1 && cat 1 2 > Makefile - touch libtest.c - - -EXTRA_DIST += threadpool-in-processexit.cs threadpool-in-processexit.exe.stdout.expected -test-process-exit: - @$(MCS) $(srcdir)/threadpool-in-processexit.cs -out:threadpool-in-processexit.exe - @echo "Testing threadpool-in-processexit.exe..." - @$(RUNTIME) threadpool-in-processexit.exe > threadpool-in-processexit.exe.stdout - @diff -w threadpool-in-processexit.exe.stdout $(srcdir)/threadpool-in-processexit.exe.stdout.expected - -# tests that expect a 1 exit code -TESTS_UNHANDLED_EXCEPTION_1_SRC = \ - unhandled-exception-1.cs \ - unhandled-exception-9.cs - -# tests that expect a 255 exit code -TESTS_UNHANDLED_EXCEPTION_255_SRC = \ - unhandled-exception-2.cs \ - unhandled-exception-3.cs \ - unhandled-exception-4.cs \ - unhandled-exception-5.cs \ - unhandled-exception-6.cs \ - unhandled-exception-7.cs \ - unhandled-exception-8.cs \ - threadpool-exceptions2.cs \ - threadpool-exceptions5.cs - -EXTRA_DIST += $(TESTS_UNHANDLED_EXCEPTION_1_SRC) $(TESTS_UNHANDLED_EXCEPTION_255_SRC) - -TESTS_UNHANDLED_EXCEPTION_1=$(filter-out $(DISABLED_TESTS),$(TESTS_UNHANDLED_EXCEPTION_1_SRC:.cs=.exe)) -TESTS_UNHANDLED_EXCEPTION_255=$(filter-out $(DISABLED_TESTS),$(TESTS_UNHANDLED_EXCEPTION_255_SRC:.cs=.exe)) - -if FULL_AOT_TESTS -TESTSAOT_UNHANDLED_EXCEPTION_1=$(TESTS_UNHANDLED_EXCEPTION_1:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_UNHANDLED_EXCEPTION_255=$(TESTS_UNHANDLED_EXCEPTION_255:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -TESTSAOT_UNHANDLED_EXCEPTION_1=$(TESTS_UNHANDLED_EXCEPTION_1:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -TESTSAOT_UNHANDLED_EXCEPTION_255=$(TESTS_UNHANDLED_EXCEPTION_255:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -test-unhandled-exception-2: $(TESTS_UNHANDLED_EXCEPTION_1) $(TESTS_UNHANDLED_EXCEPTION_255) $(TESTSAOT_UNHANDLED_EXCEPTION_1) $(TESTSAOT_UNHANDLED_EXCEPTION_255) - ok=; \ - $(MAKE) test-unhandled-exception-2-1-with-managed-handler || ok=false; \ - $(MAKE) test-unhandled-exception-2-1-without-managed-handler || ok=false; \ - $(MAKE) test-unhandled-exception-2-255-with-managed-handler || ok=false; \ - $(MAKE) test-unhandled-exception-2-255-without-managed-handler || ok=false; \ - $$ok - -test-unhandled-exception-2-1-with-managed-handler: $(TESTS_UNHANDLED_EXCEPTION_1) $(TESTSAOT_UNHANDLED_EXCEPTION_1) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 1 $(TESTS_UNHANDLED_EXCEPTION_1) -test-unhandled-exception-2-1-without-managed-handler: $(TESTS_UNHANDLED_EXCEPTION_1) $(TESTSAOT_UNHANDLED_EXCEPTION_1) test-runner.exe - TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 1 $(TESTS_UNHANDLED_EXCEPTION_1) -test-unhandled-exception-2-255-with-managed-handler: $(TESTS_UNHANDLED_EXCEPTION_255) $(TESTSAOT_UNHANDLED_EXCEPTION_255) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 255 $(TESTS_UNHANDLED_EXCEPTION_255) -test-unhandled-exception-2-255-without-managed-handler: $(TESTS_UNHANDLED_EXCEPTION_255) $(TESTSAOT_UNHANDLED_EXCEPTION_255) test-runner.exe - TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 255 $(TESTS_UNHANDLED_EXCEPTION_255) - -EXTRA_DIST += appdomain-loader.cs appdomain-tester.cs - -if FULL_AOT_TESTS -test-appdomain-unload: -else -appdomain-loader.exe: appdomain-tester.exe - -test-appdomain-unload: appdomain-loader.exe appdomain-tester.exe - $(RUNTIME) -O=gshared appdomain-loader.exe > appdomain-loader.exe.1.stdout || exit 1; - $(RUNTIME) appdomain-loader.exe > appdomain-loader.exe.2.stdout || exit 1; - MONO_DEBUG_ASSEMBLY_UNLOAD=1 $(RUNTIME) -O=gshared appdomain-loader.exe > appdomain-loader.exe.3.stdout || exit 1; - MONO_DEBUG_ASSEMBLY_UNLOAD=1 $(RUNTIME) appdomain-loader.exe > appdomain-loader.exe.4.stdout || exit 1; -endif - -EXTRA_DIST += console-output.cs console-output.exe.stderr.expected console-output.exe.stdout.expected -test-console-output: console-output.exe - @$(RUNTIME) console-output.exe 1>console-output.exe.stdout - @$(RUNTIME) console-output.exe 2>console-output.exe.stderr - @diff -w console-output.exe.stdout $(srcdir)/console-output.exe.stdout.expected \ - && diff -w console-output.exe.stderr $(srcdir)/console-output.exe.stderr.expected - -test-pedump: test-runner.exe - $(with_mono_path) $(mono_build_root)/tools/pedump/pedump --verify error test-runner.exe - -.PHONY: test-gac-loading test-eglib-remap - -runtest-gac-loading: test-runner.exe - $(MAKE) -C testing_gac run-test - -compile-gac-loading: - $(MAKE) -C testing_gac test - -runtest-assembly-load-reference: test-runner.exe - $(MAKE) -C assembly-load-reference run-test - -compile-assembly-load-reference: - $(MAKE) -C assembly-load-reference test - - -TESTS_STRESS_PROCESS_SRC= \ - process-stress-1.cs \ - process-stress-2.cs \ - process-stress-3.cs \ - process-leak.cs - -EXTRA_DIST += $(TESTS_STRESS_PROCESS_SRC) - -TESTS_STRESS_PROCESS=$(filter-out $(DISABLED_TESTS),$(TESTS_STRESS_PROCESS_SRC:.cs=.exe)) - -if FULL_AOT_TESTS -TESTSAOT_STRESS_PROCESS=$(TESTS_STRESS_PROCESS:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -TESTSAOT_STRESS_PROCESS=$(TESTS_STRESS_PROCESS:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -endif - -test-process-stress: $(TESTS_STRESS_PROCESS) $(TESTSAOT_STRESS_PROCESS) test-runner.exe - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_STRESS_PROCESS) - -coreclr-gcstress: - $(MAKE) -C $(mono_build_root)/acceptance-tests coreclr-gcstress - -# Tests for the Mono lldb plugin -EXTRA_DIST += test_lldb.py test-lldb.cs -test-lldb: test-lldb.exe - $(PYTHON) test_lldb.py $(JITTEST_PROG) - -if !ENABLE_MSVC_ONLY - -noinst_LTLIBRARIES = libtest.la - -AM_CPPFLAGS = $(GLIB_CFLAGS) - -if HOST_WIN32 -# gcc-3.4.4 emits incorrect code when making indirect calls to stdcall functions using a tail call -# This shows up when compiling mono_test_marshal_delegate () -libtest_la_CFLAGS=-fno-optimize-sibling-calls -# the exported names created by gcc for stdcall functions are missing the leading _, so MS.NET -# can't find them. So we use --kill-at to remove the @ suffix as well. -libtest_la_LDFLAGS = -no-undefined -rpath `pwd` -Wl,--kill-at -else -libtest_la_LDFLAGS = -no-undefined -rpath `pwd` -endif -libtest_la_SOURCES = libtest.c -libtest_la_LIBADD = $(top_builddir)/mono/eglib/libeglib.la - -endif # !ENABLE_MSVC_ONLY - -INTERNALSVISIBLETO_TEST_SRC = \ - internalsvisibleto-runtimetest.cs \ - internalsvisibleto-compilertest.cs - -INTERNALSVISIBLETO_TEST_LIB_SRC = \ - internalsvisibleto-library.cs - -INTERNALSVISIBLETO_TEST_LIBS = \ - internalsvisibleto-correctcase.dll \ - internalsvisibleto-wrongcase.dll \ - internalsvisibleto-correctcase-2.dll \ - internalsvisibleto-wrongcase-2.dll \ - internalsvisibleto-correctcase-sign2048.dll \ - internalsvisibleto-wrongcase-sign2048.dll \ - internalsvisibleto-correctcase-2-sign2048.dll \ - internalsvisibleto-wrongcase-2-sign2048.dll - - -INTERNALSVISIBLETO_TEST = \ - $(INTERNALSVISIBLETO_TEST_SRC:.cs=.exe) \ - $(INTERNALSVISIBLETO_TEST_SRC:.cs=-sign2048.exe) - -if FULL_AOT_TESTS -INTERNALSVISIBLETO_TESTAOT = \ - $(INTERNALSVISIBLETO_TEST:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -INTERNALSVISIBLETO_TESTAOT_LIBS = \ - $(INTERNALSVISIBLETO_TEST_LIBS:.dll=.dll$(PLATFORM_AOT_SUFFIX)) -endif - -if HYBRID_AOT_TESTS -INTERNALSVISIBLETO_TESTAOT = \ - $(INTERNALSVISIBLETO_TEST:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -INTERNALSVISIBLETO_TESTAOT_LIBS = \ - $(INTERNALSVISIBLETO_TEST_LIBS:.dll=.dll$(PLATFORM_AOT_SUFFIX)) -endif - -EXTRA_DIST += $(INTERNALSVISIBLETO_TEST_SRC) $(INTERNALSVISIBLETO_TEST_LIB_SRC) - -test-internalsvisibleto: test-runner.exe $(INTERNALSVISIBLETO_TEST) $(INTERNALSVISIBLETO_TESTAOT) $(INTERNALSVISIBLETO_TESTAOT_LIBS) - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ $(INTERNALSVISIBLETO_TEST) - -internalsvisibleto-correctcase.dll internalsvisibleto-wrongcase.dll internalsvisibleto-runtimetest.exe: internalsvisibleto-runtimetest.cs internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase.dll -target:library -d:CORRECT_CASE -d:PERMISSIVE internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase.dll -target:library -d:WRONG_CASE -d:PERMISSIVE internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-runtimetest.exe -warn:0 -r:internalsvisibleto-correctcase.dll -r:internalsvisibleto-wrongcase.dll internalsvisibleto-runtimetest.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase.dll -target:library -d:CORRECT_CASE internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase.dll -target:library -d:WRONG_CASE internalsvisibleto-library.cs - -internalsvisibleto-correctcase-2.dll internalsvisibleto-wrongcase-2.dll internalsvisibleto-compilertest.exe: internalsvisibleto-compilertest.cs internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase-2.dll -target:library -d:CORRECT_CASE internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase-2.dll -target:library -d:WRONG_CASE internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-compilertest.exe -warn:0 -r:internalsvisibleto-correctcase-2.dll -r:internalsvisibleto-wrongcase-2.dll internalsvisibleto-compilertest.cs - -internalsvisibleto-correctcase-sign2048.dll internalsvisibleto-wrongcase-sign2048.dll internalsvisibleto-runtimetest-sign2048.exe: internalsvisibleto-runtimetest.cs internalsvisibleto-library.cs internalsvisibleto-2048.snk - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase-sign2048.dll -target:library -d:CORRECT_CASE -d:PERMISSIVE -d:SIGN2048 internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase-sign2048.dll -target:library -d:WRONG_CASE -d:PERMISSIVE -d:SIGN2048 internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-runtimetest-sign2048.exe -warn:0 -r:internalsvisibleto-correctcase-sign2048.dll -r:internalsvisibleto-wrongcase-sign2048.dll -d:SIGN2048 internalsvisibleto-runtimetest.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase-sign2048.dll -target:library -d:CORRECT_CASE -d:SIGN2048 internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase-sign2048.dll -target:library -d:WRONG_CASE -d:SIGN2048 internalsvisibleto-library.cs - -internalsvisibleto-correctcase-2-sign2048.dll internalsvisibleto-wrongcase-2-sign2048.dll internalsvisibleto-compilertest-sign2048.exe: internalsvisibleto-compilertest.cs internalsvisibleto-library.cs internalsvisibleto-2048.snk - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase-2-sign2048.dll -target:library -d:CORRECT_CASE -d:SIGN2048 internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase-2-sign2048.dll -target:library -d:WRONG_CASE -d:SIGN2048 internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-compilertest-sign2048.exe -warn:0 -r:internalsvisibleto-correctcase-2-sign2048.dll -r:internalsvisibleto-wrongcase-2-sign2048.dll -d:SIGN2048 internalsvisibleto-compilertest.cs - -EXTRA_DIST += internalsvisibleto-runtimetest.cs internalsvisibleto-compilertest.cs internalsvisibleto-library.cs internalsvisibleto-2048.snk - -EXTRA_DIST += weakattribute.cs - -EXTRA_DIST += null-blob-null-blob-assm.il null-blob-ref.il null-blob-tgt.cs - -null-blob-tgt.dll: null-blob-tgt.cs - $(MCS) -target:library -out:$@ $< - -null-blob-main.exe: null-blob-main.cs null-blob-tgt.dll null-blob-ref.dll null-blob-null-blob-assm.dll - $(MCS) -target:exe -out:$@ $< - -null-blob-main.exe$(PLATFORM_AOT_SUFFIX): null-blob-tgt.dll$(PLATFORM_AOT_SUFFIX) null-blob-ref.dll$(PLATFORM_AOT_SUFFIX) null-blob-null-blob-assm.dll$(PLATFORM_AOT_SUFFIX) - -# Contains copies of types which don't exist in the desktop profile so tests can use them -Mono.Runtime.Testing.dll: weakattribute.cs - $(MCS) -target:library -out:$@ $< - -weak-fields.exe: weak-fields.cs Mono.Runtime.Testing.dll - $(MCS) -r:Mono.Runtime.Testing.dll -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -r:TestDriver.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $< - -CLEANFILES = $(TESTS_REGULAR) $(TESTS_STRESS) $(TESTSAOT_CS) $(TESTSAOT_IL) $(TESTSAOT_BENCH) $(TESTSAOT_STRESS) *.dll *.stdout *.aotlog *.exe stest.dat LeafAssembly.dll MidAssembly.dll appdomain-marshalbyref-assemblyload2/*.dll -CLEANFILES += $(TESTS_TAILCALL_COMPILE) $(TESTSAOT_TAILCALL) -CLEANFILES += $(BUILT_SOURCES) diff --git a/src/mono/mono/tests/assembly-load-reference/.gitignore b/src/mono/mono/tests/assembly-load-reference/.gitignore deleted file mode 100644 index 0a864cc3857e89..00000000000000 --- a/src/mono/mono/tests/assembly-load-reference/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in - diff --git a/src/mono/mono/tests/assembly-load-reference/Makefile.am b/src/mono/mono/tests/assembly-load-reference/Makefile.am deleted file mode 100644 index a1b1f827a2585c..00000000000000 --- a/src/mono/mono/tests/assembly-load-reference/Makefile.am +++ /dev/null @@ -1,180 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -### buildtree stuff - -RUNTIME_ARGS=--config tests-config --optimize=all --debug -TEST_RUNTIME_ARGS ?= $(RUNTIME_ARGS) -TEST_AOT_BUILD_FLAGS ?= $(AOT_BUILD_FLAGS) -TEST_AOT_RUN_FLAGS ?= $(AOT_RUN_FLAGS) - -CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE) - -with_mono_path = MONO_PATH=$(CLASS) - -RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper -TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper --aot-path=$(mcs_topdir)/class/lib/build - -if FULL_AOT_TESTS -PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY,FULL_AOT_DESKTOP -endif - -if HYBRID_AOT_TESTS -PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY -endif - -### test runner stuff - -if HOST_WIN32 -PLATFORM_PATH_SEPARATOR=; -else -PLATFORM_PATH_SEPARATOR=: -endif - -TEST_RUNNER = ../test-runner.exe - -if HOST_WIN32 -if ENABLE_MSVC - DEFAULT_WIN32_RUNTIME=$(shell cygpath -w -a $(top_builddir)/@mono_runtime@ | sed 's/\\/\\\\/g') -else - DEFAULT_WIN32_RUNTIME=$(top_builddir)/runtime/mono-wrapper) -endif -TEST_RUNNER += --config tests-config --runtime "$(if $(MONO_EXECUTABLE),$(shell cygpath -w -a $(MONO_EXECUTABLE) | sed 's/\\/\\\\/g'),$(DEFAULT_WIN32_RUNTIME))" -else -TEST_RUNNER += --config tests-config --runtime "$(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),$(top_builddir)/runtime/mono-wrapper)" -endif - -TEST_RUNNER += $(if $(V), --verbose,) - -if FULL_AOT_TESTS -TEST_RUNNER += --runtime-args "$(TEST_AOT_RUN_FLAGS)" -endif - -if HYBRID_AOT_TESTS -TEST_RUNNER += --runtime-args "$(TEST_AOT_RUN_FLAGS)" -endif - -TEST_RUNNER += --runtime-args "$(TEST_RUNTIME_FLAGS)" - -TEST_RUNNER += --mono-path "$(CLASS)" - - -### tools - -GACUTIL= $(mcs_topdir)/class/lib/build/gacutil.exe -SN= $(mcs_topdir)/class/lib/build/sn.exe - -MCS= $(TOOLS_RUNTIME) $(CSC) -noconfig -nologo -debug:portable -target:library $(PROFILE_MCS_FLAGS) - -### testcase stuff - -EXTRA_DIST= README $(SIGNING_KEY) $(GACTESTLIB_SRCS) - -### Test cases - -.PHONY: run-test test-local - -TESTS_CS = \ - samedir/LoadFromMain.cs \ - samedir/LoadFileMain.cs \ - separatedir/LoadFromMain.cs \ - separatedir/LoadFileMain.cs \ - mainanddep/LoadFromMain.cs \ - mainanddep/LoadFileMain.cs - -LIBRARIES_CS = src/Dep.cs \ - src/Mid.cs - -EXTRA_DIST += $(TESTS_CS) $(LIBRARIES_CS) - -TESTS_EXE = $(TESTS_CS:.cs=.exe) - -TESTS_EXE_AOT = $(TESTS_EXE:.exe=.exe$(PLATFORM_AOT_SUFFIX)) - -REFERENCED_ASMS = \ - samedir/Mid.dll \ - samedir/Dep.dll \ - separatedir/middle/Mid.dll \ - separatedir/middle/Dep.dll \ - mainanddep/middle/Mid.dll \ - mainanddep/Dep.dll - -REFERENCED_ASMS_AOT = $(REFERENCED_ASMS:.dll=.dll$(PLATFORM_AOT_SUFFIX)) - -if FULL_AOT_TESTS -TESTS_EXE_DEPEND=$(TESTS_EXE_AOT) -REFERENCED_ASMS_DEPEND=$(REFERENCED_ASMS_AOT) -else -if HYBRID_AOT_TESTS -TESTS_EXE_DEPEND=$(TESTS_EXE_AOT) -REFERENCED_ASMS_DEPEND=$(REFERENCED_ASMS_AOT) -else -TESTS_EXE_DEPEND=$(TESTS_EXE) -REFERENCED_ASMS_DEPEND=$(REFERENCED_ASMS) -endif -endif - -DISABLED_TESTS= - -# these don't work with full AOT -if FULL_AOT_TESTS -DISABLED_TESTS+= \ - mainanddep/LoadFromMain.exe \ - mainanddep/LoadFileMain.exe \ - separatedir/LoadFileMain.exe -endif - -run-test: - true - $(MAKE) run-assembly-load-reference-tests - - -test-local: compile-samedir compile-separatedir compile-mainanddep - -compile-samedir: samedir/LoadFromMain.exe samedir/LoadFileMain.exe samedir/Dep.dll samedir/Mid.dll - -samedir/%.dll: src/%.dll - mkdir -p $(@D) - cp $< $@ - -compile-separatedir: separatedir/LoadFromMain.exe separatedir/LoadFileMain.exe separatedir/middle/Dep.dll separatedir/middle/Mid.dll - -separatedir/middle/%.dll: src/%.dll - mkdir -p $(@D) - cp $< $@ - -compile-mainanddep: mainanddep/LoadFromMain.exe mainanddep/LoadFileMain.exe mainanddep/Dep.dll mainanddep/middle/Mid.dll - -mainanddep/Dep.dll: src/Dep.dll - mkdir -p $(@D) - cp $< $@ - -mainanddep/middle/Mid.dll: src/Mid.dll - mkdir -p $(@D) - cp $< $@ - -src/Dep.dll: src/Dep.cs - mkdir -p $(@D) - $(MCS) -out:$@ $< -target:library - -src/Mid.dll: src/Mid.cs src/Dep.dll - $(MCS) -out:$@ $< -r:src/Dep.dll -target:library - -%/LoadFromMain.exe: %/LoadFromMain.cs - mkdir -p $(@D) - $(MCS) -out:$@ $< -target:exe - -%/LoadFileMain.exe: %/LoadFileMain.cs - mkdir -p $(@D) - $(MCS) -out:$@ $< -target:exe - -%/LoadFromMain.exe$(PLATFORM_AOT_SUFFIX): %/LoadFromMain.exe - $(RUNTIME) $(TEST_AOT_BUILD_FLAGS) $< - -%/LoadFileMain.exe$(PLATFORM_AOT_SUFFIX): %/LoadFileMain.exe - $(RUNTIME) $(TEST_AOT_BUILD_FLAGS) $< - -%.dll$(PLATFORM_AOT_SUFFIX): %.dll - $(RUNTIME) $(TEST_AOT_BUILD_FLAGS) $< - -run-assembly-load-reference-tests: $(TESTS_EXE_DEPEND) $(REFERENCED_ASMS_DEPEND) - $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" $(TESTS_EXE) diff --git a/src/mono/mono/tests/common_mixed.mk b/src/mono/mono/tests/common_mixed.mk deleted file mode 100644 index 01d73b5c59d064..00000000000000 --- a/src/mono/mono/tests/common_mixed.mk +++ /dev/null @@ -1,24 +0,0 @@ -CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE) - -with_mono_path = MONO_PATH=$(CLASS) - -MONO_EXE = $(top_builddir)/runtime/mono-wrapper -RUNTIME = $(with_mono_path) $(MONO_EXE) -TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(MONO_EXE) --aot-path=$(mcs_topdir)/class/lib/build - -MCS_NO_UNSAFE = $(TOOLS_RUNTIME) $(CSC) -debug:portable \ - -noconfig -nologo \ - -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \ - -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \ - -nowarn:0197 -langversion:latest $(PROFILE_MCS_FLAGS) -MCS_NO_LIB = $(MCS_NO_UNSAFE) -unsafe - -MCS = $(MCS_NO_LIB) - -ILASM = $(TOOLS_RUNTIME) $(mcs_topdir)/class/lib/build/ilasm.exe - - -CLEANFILES=*.dll *.exe *.pdb - -clean-local: - $(RM) -rf $(AOTDIR) $(AOT_TMPDIR) diff --git a/src/mono/mono/tests/exiting/Makefile b/src/mono/mono/tests/exiting/Makefile deleted file mode 100644 index f1c890671c4327..00000000000000 --- a/src/mono/mono/tests/exiting/Makefile +++ /dev/null @@ -1,114 +0,0 @@ -check-local: test - -mcs_topdir = ../../../../mcs -mono_build_root = ../../.. -top_builddir = $(mono_build_root) -srcdir = . -TEST_PROG = ../../interpreter/mint -JITTEST_PROG = ../../mini/mono - -TEST_PROG_RUN = MONO_PATH=$(mcs_topdir)/class/lib/default $(TEST_PROG) -JITTEST_PROG_RUN = MONO_PATH=$(mcs_topdir)/class/lib/default $(JITTEST_PROG) - -RUNTIME_ARGS=--config tests-config --optimize=all - -RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/default $(top_builddir)/runtime/mono-wrapper - -CSC = $(RUNTIME) $(mcs_topdir)/class/lib/default/mcs.exe --unsafe -nowarn:0162 -ILASM = $(RUNTIME) $(mcs_topdir)/ilasm/ilasm.exe - -# notes on programs that fail: -# delegate-async-exception.cs returns 1 on mono, 0 on MS 1.1 -# delegate-delegate-exception.cs returns 1 on mono, hangs on MS 1.1 -# finalizer-exception.cs returns 42 on mono and MS 1.1: on MS prints stack trace -# -# changing to run in the main thread: -# delegate-async-exception.cs hangs -# delegate-delegate-exception.cs hangs -# finalizer-exception.cs same as above -# main-returns-abort-resetabort.exe crashes randomly -# main-returns.exe doesn't wait the threads - -# delegate-async-exception.cs \ -# delegate-delegate-exception.cs \ - -TEST_CS_SRC= \ - appdomain.cs \ - delegate-async-exit.cs \ - delegate-delegate-exit.cs \ - delegate.cs \ - finalizer-abort.cs \ - finalizer-exception.cs \ - finalizer-exit.cs \ - main-exit.cs \ - main-returns-abort-resetabort.cs \ - main-returns-background-abort-resetabort.cs \ - main-returns-background-resetabort.cs \ - main-returns-background.cs \ - main-returns.cs \ - subthread-exit.cs - -DISABLED_TESTS= \ - $(PLATFORM_DISABLED_TESTS) - -TESTSI_CS=$(TEST_CS_SRC:.cs=.exe) - -%.exe: %.cs - $(CSC) -out:$@ $< - -test: testjit - -test_cs: $(TEST_PROG) $(TESTSI_CS) - @failed=0; \ - passed=0; \ - export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \ - for i in $(TESTSI_CS); do \ - if $(srcdir)/../test-driver '$(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \ - then \ - passed=`expr $${passed} + 1`; \ - else \ - if [ $$? = 2 ]; then break; fi; \ - failed=`expr $${failed} + 1`; \ - fi \ - done; \ - echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) failed."; echo - -testjit: $(TESTSI_CS) - @failed=0; \ - passed=0; \ - failed_tests="";\ - for i in $(TESTSI_CS); do \ - rm -f $${i}.so; \ - if $(srcdir)/../test-driver '$(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \ - then \ - passed=`expr $${passed} + 1`; \ - else \ - if [ $$? = 2 ]; then break; fi; \ - failed=`expr $${failed} + 1`; \ - failed_tests="$${failed_tests} $$i"; \ - fi \ - done; \ - echo "$${passed} test(s) passed. $${failed} test(s) failed."; \ - if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \ - for i in $${failed_tests}; do echo $${i}; done; exit 1; fi - -testinterp: $(TESTSI_CS) - @failed=0; \ - passed=0; \ - failed_tests="";\ - export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \ - for i in $(TESTSI_CS); do \ - if $(srcdir)/../test-driver '$(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \ - then \ - passed=`expr $${passed} + 1`; \ - else \ - if [ $$? = 2 ]; then break; fi; \ - failed=`expr $${failed} + 1`; \ - failed_tests="$${failed_tests} $$i"; \ - fi \ - done; \ - echo "$${passed} test(s) passed. $${failed} test(s) failed."; \ - if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \ - for i in $${failed_tests}; do echo $${i}; done; exit 1; fi - -CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) *.dll *.stdout *.exe stest.dat diff --git a/src/mono/mono/tests/find_aot_method_in_amodule_stress/Makefile b/src/mono/mono/tests/find_aot_method_in_amodule_stress/Makefile deleted file mode 100644 index 023c7c14db5c81..00000000000000 --- a/src/mono/mono/tests/find_aot_method_in_amodule_stress/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -MONO_BIN_DIR=$(shell dirname `which mono`) -MONO_DIR=$(shell echo $(MONO_BIN_DIR)/../) - -all: Template.py mscorlib.dll - python3 Template.py $(MONO_DIR) | grep -v find_aot_method_in_amodule - -run: - MONO_PATH=. mono --full-aot Hello.exe - -mscorlib.dll: - cp $(MONO_DIR)/lib/mono/4.5/mscorlib.dll ./mscorlib.dll - -clean: - - rm -f *.dll - - rm -f *.dylib - - rm -f *.exe - - rm -rf *.dSYM - - rm -f *TypeBucket.cs Hello.cs Foo.cs diff --git a/src/mono/mono/tests/fullaot-mixed/.gitignore b/src/mono/mono/tests/fullaot-mixed/.gitignore deleted file mode 100644 index b336cc7cec946a..00000000000000 --- a/src/mono/mono/tests/fullaot-mixed/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/src/mono/mono/tests/fullaot-mixed/Makefile.am b/src/mono/mono/tests/fullaot-mixed/Makefile.am deleted file mode 100644 index 1beb1f58b279b3..00000000000000 --- a/src/mono/mono/tests/fullaot-mixed/Makefile.am +++ /dev/null @@ -1,59 +0,0 @@ -include ../common_mixed.mk - -lambda.exe: $(srcdir)/lambda.cs - $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Core.dll -target:exe -out:$@ $< - -AOTDIR=linker-output -AOT_TMPDIR=aot-tmp - -if HOST_WIN32 -PLATFORM_PATH_SEPARATOR=; -else -PLATFORM_PATH_SEPARATOR=: -endif - -$(AOTDIR)/lambda.exe$(PLATFORM_AOT_SUFFIX): $(AOTDIR)/lambda.exe $(LINKED_ASSEMBLIES) - mkdir -p $(AOT_TMPDIR)/lambda.exe - MONO_PATH=$(AOTDIR) $(MONO_EXE) --aot=full,interp,temp-path=$(AOT_TMPDIR)/lambda.exe $(AOTDIR)/lambda.exe - -$(AOTDIR)/%.dll$(PLATFORM_AOT_SUFFIX): $(AOTDIR)/%.dll $(LINKED_ASSEMBLIES) - mkdir -p $(AOT_TMPDIR)/$*.dll - MONO_PATH=$(AOTDIR) $(MONO_EXE) --aot=full,interp,temp-path=$(AOT_TMPDIR)/$*.dll $(AOTDIR)/$*.dll - -SOURCES = \ - lambda.cs - -ASSEMBLIES = \ - mscorlib.dll \ - System.Core.dll \ - System.dll \ - System.Security.dll \ - Mono.Simd.dll \ - Mono.Security.dll \ - System.Numerics.dll \ - System.Numerics.Vectors.dll \ - Mono.Posix.dll \ - System.Xml.dll \ - System.Configuration.dll - -LINKED_ASSEMBLIES = $(addprefix $(AOTDIR)/,$(ASSEMBLIES)) - -AOT_IMAGES = $(patsubst %,$(AOTDIR)/%$(PLATFORM_AOT_SUFFIX),$(ASSEMBLIES)) -TEST_IMAGES = $(patsubst %,$(AOTDIR)/%$(PLATFORM_AOT_SUFFIX),$(SOURCES:.cs=.exe)) - -$(AOTDIR)/%.dll: - mkdir -p $(AOTDIR) - cp $(CLASS)/$*.dll $(AOTDIR)/ - -$(AOTDIR)/%.exe: %.exe - mkdir -p $(AOTDIR) - cp $< $@ - -if !X86 -if !DISABLE_INTERPRETER -if !ENABLE_COOP_SUSPEND -check: $(AOT_IMAGES) $(TEST_IMAGES) - MONO_PATH="$(AOTDIR)$(PLATFORM_PATH_SEPARATOR)$(CLASS)" $(MONO_EXE) --aot-path=$(AOTDIR) --full-aot-interp $(AOTDIR)/lambda.exe -endif -endif -endif diff --git a/src/mono/mono/tests/gc-descriptors/.gitignore b/src/mono/mono/tests/gc-descriptors/.gitignore index 2516e797244336..3154c2e29811aa 100644 --- a/src/mono/mono/tests/gc-descriptors/.gitignore +++ b/src/mono/mono/tests/gc-descriptors/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /descriptor-tests.cs /descriptor-tests.exe /descriptor-tests.exe.mdb diff --git a/src/mono/mono/tests/gc-descriptors/Makefile.am b/src/mono/mono/tests/gc-descriptors/Makefile.am deleted file mode 100755 index ea5dc6641633e4..00000000000000 --- a/src/mono/mono/tests/gc-descriptors/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE) - -TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper -MCS = $(TOOLS_RUNTIME) $(CSC) -lib:$(CLASS) -noconfig -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug:portable - -if INSTALL_TESTING_AOT_FULL - -check-local: - -else - -check-local: test - -test-local : descriptor-tests.exe - -descriptor-tests.exe : descriptor-tests.cs - $(MCS) -Warn:0 descriptor-tests.cs - -descriptor-tests.cs : descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py - if [ "$(srcdir)" != "$(builddir)" ]; then cp $^ .; fi - $(srcdir)/gen-descriptor-tests.py >descriptor-tests.cs - -endif - -EXTRA_DIST = descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py - -.DELETE_ON_ERROR: - diff --git a/src/mono/mono/tests/llvmonly-mixed/.gitignore b/src/mono/mono/tests/llvmonly-mixed/.gitignore deleted file mode 100644 index 0a864cc3857e89..00000000000000 --- a/src/mono/mono/tests/llvmonly-mixed/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in - diff --git a/src/mono/mono/tests/llvmonly-mixed/Makefile.am b/src/mono/mono/tests/llvmonly-mixed/Makefile.am deleted file mode 100644 index 1af1bf87d86829..00000000000000 --- a/src/mono/mono/tests/llvmonly-mixed/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -include ../common_mixed.mk - -tests.exe: $(srcdir)/tests.cs TestDriver.dll interponly.dll - $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -r:TestDriver.dll -r:interponly.dll -target:exe -out:$@ $< - -interponly.dll: $(srcdir)/interponly.cs TestDriver.dll jitonly.dll - $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -r:TestDriver.dll -r:jitonly.dll -target:library -out:$@ $< - -jitonly.dll: $(srcdir)/jitonly.cs TestDriver.dll - $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -r:TestDriver.dll -target:library -out:$@ $< - -TestDriver.dll: - $(MCS) -target:library -out:$@ $(srcdir)/../../mini/TestDriver.cs $(srcdir)/../../mini/TestHelpers.cs - -AOTDIR=linker-output -AOT_TMPDIR=aot-tmp - -$(AOTDIR)/tests.exe$(PLATFORM_AOT_SUFFIX): $(AOTDIR)/tests.exe - mkdir -p $(AOT_TMPDIR)/tests.exe - MONO_PATH=$(AOTDIR) $(MONO_EXE) --aot=llvmonly,interp,temp-path=$(AOT_TMPDIR)/tests.exe $(AOTDIR)/tests.exe - -$(AOTDIR)/%.dll$(PLATFORM_AOT_SUFFIX): $(AOTDIR)/%.dll - mkdir -p $(AOT_TMPDIR)/$*.dll - MONO_PATH=$(AOTDIR) $(MONO_EXE) --aot=llvmonly,interp,temp-path=$(AOT_TMPDIR)/$*.dll $(AOTDIR)/$*.dll - -SOURCES = \ - tests.cs \ - interponly.cs - -# interponly.dll is not AOT-ed -ASSEMBLIES = mscorlib.dll tests.exe jitonly.dll TestDriver.dll - -AOT_IMAGES = $(patsubst %,$(AOTDIR)/%$(PLATFORM_AOT_SUFFIX),$(ASSEMBLIES)) - -$(AOTDIR)/mscorlib.dll: - mkdir -p $(AOTDIR) - cp $(CLASS)/mscorlib.dll $(AOTDIR)/ - -$(AOTDIR)/%.dll: %.dll - mkdir -p $(AOTDIR) - cp $< $@ - -$(AOTDIR)/%.exe: %.exe - mkdir -p $(AOTDIR) - cp $< $@ - -$(AOTDIR)/tests.exe: $(AOTDIR)/TestDriver.dll $(AOTDIR)/jitonly.dll $(AOTDIR)/interponly.dll - -if ENABLE_LLVM -check: $(AOT_IMAGES) - MONO_PATH=$(AOTDIR) $(MONO_EXE) --aot-path=$(AOTDIR) --llvmonly-interp $(AOTDIR)/tests.exe -endif - diff --git a/src/mono/mono/tests/metadata-verifier/Makefile b/src/mono/mono/tests/metadata-verifier/Makefile deleted file mode 100644 index 263cde0c1f5027..00000000000000 --- a/src/mono/mono/tests/metadata-verifier/Makefile +++ /dev/null @@ -1,172 +0,0 @@ -GLIB_CFLAGS=`pkg-config --cflags glib-2.0` -GLIB_LINK_FLAGS=`pkg-config --libs glib-2.0` - -%.exe: %.il - ilasm2 -out:$@ $< - -assembly-with-resource.exe: assembly-with-resource.cs - gmcs assembly-with-resource.cs -linkresource:Makefile -resource:simple-assembly.il - -assembly-with-complex-type.exe: assembly-with-complex-type.cs - gmcs assembly-with-complex-type.cs - -assembly-with-methods.exe: assembly-with-methods.cs - gmcs assembly-with-methods.cs - -assembly-with-params.exe: assembly-with-params.cs - gmcs assembly-with-params.cs - -assembly-with-constants.exe: assembly-with-constants.cs - gmcs assembly-with-constants.cs - -assembly-with-cattr.exe: assembly-with-cattr.cs - gmcs assembly-with-cattr.cs - -assembly-with-cattr-enc.exe: assembly-with-cattr-enc.cs - gmcs assembly-with-cattr-enc.cs - -assembly-with-cas.exe: assembly-with-cas.cs - gmcs assembly-with-cas.cs - -assembly-with-events.exe: assembly-with-events.cs - gmcs assembly-with-events.cs - -assembly-with-properties.exe: assembly-with-properties.cs - gmcs assembly-with-properties.cs - -assembly-with-fields.exe: assembly-with-fields.cs - gmcs assembly-with-fields.cs - -module.netmodule: module.il - ilasm2 /dll /output:module.netmodule module.il - -assembly-with-module.exe: assembly-with-module.cs module.netmodule - gmcs assembly-with-module.cs -addmodule:module.netmodule - -assembly-with-generics.exe: assembly-with-generics.cs - gmcs assembly-with-generics.cs - -assembly-with-signatures.exe: assembly-with-signatures.cs - gmcs assembly-with-signatures.cs - -TEST_BINARIES = assembly-with-resource.exe \ - assembly-with-complex-type.exe \ - assembly-with-methods.exe \ - assembly-with-params.exe \ - assembly-with-constants.exe \ - assembly-with-cattr.exe \ - assembly-with-cattr-enc.exe \ - assembly-with-cas.exe \ - assembly-with-events.exe \ - assembly-with-properties.exe \ - assembly-with-module.exe \ - assembly-with-resource.exe \ - assembly-with-generics.exe \ - assembly-with-custommod.exe \ - assembly-with-signatures.exe \ - assembly-with-locals.exe \ - assembly-with-types.exe \ - assembly-with-typespec.exe \ - assembly-with-global-method.exe \ - assembly-with-calli.exe \ - assembly-with-fields.exe \ - simple-assembly.exe - - -gen-md-tests: gen-md-tests.c - gcc $(GLIB_CFLAGS) $(GLIB_LINK_FLAGS) -I../../../ gen-md-tests.c ../../mini/.libs/libmono-2.0.a -g -Wall -lpthread -lm -ldl -lrt -o gen-md-tests - -header-tests.ok: gen-md-tests header-tests.md simple-assembly.exe - ./gen-md-tests header-tests.md - touch header-tests.ok - -section-table-tests.ok: gen-md-tests section-table-tests.md simple-assembly.exe - ./gen-md-tests section-table-tests.md - touch section-table-tests.ok - -data-directory-tests.ok: gen-md-tests data-directory-tests.md simple-assembly.exe - ./gen-md-tests data-directory-tests.md - touch data-directory-tests.ok - -resources-tests.ok: gen-md-tests resources-tests.md assembly-with-resource.exe - ./gen-md-tests resources-tests.md - touch resources-tests.ok - -cli-header-tests.ok: gen-md-tests cli-header-tests.md simple-assembly.exe - ./gen-md-tests cli-header-tests.md - touch cli-header-tests.ok - -cli-metadata-tests.ok: gen-md-tests cli-metadata-tests.md simple-assembly.exe - ./gen-md-tests cli-metadata-tests.md - touch cli-metadata-tests.ok - -cli-tables-tests.ok: gen-md-tests cli-tables-tests.md $(TEST_BINARIES) - ./gen-md-tests cli-tables-tests.md - touch cli-tables-tests.ok - -cli-blob-tests.ok: gen-md-tests cli-blob-tests.md $(TEST_BINARIES) - ./gen-md-tests cli-blob-tests.md - touch cli-blob-tests.ok - -cli-cattr-tests.ok: gen-md-tests cli-cattr-tests.md $(TEST_BINARIES) - ./gen-md-tests cli-cattr-tests.md - touch cli-cattr-tests.ok - -cli-global-props-tests.ok: gen-md-tests cli-global-props-tests.md $(TEST_BINARIES) - ./gen-md-tests cli-global-props-tests.md - touch cli-global-props-tests.ok - -generate-stamp: header-tests.ok section-table-tests.ok data-directory-tests.ok resources-tests.ok cli-header-tests.ok cli-metadata-tests.ok cli-tables-tests.ok cli-blob-tests.ok cli-cattr-tests.ok cli-global-props-tests.ok - touch generate-stamp - -clean-stamps: - rm -f *.ok - rm -f generate-stamp - -run-test: generate-stamp - @for i in *.exe; do \ - RES=99; \ - PEDUMP_ARG="metadata" \ - FIRST=`echo $$i | cut -d '-' -f 1`; \ - if [ "$$FIRST" == "invalid" ]; then \ - RES=1; \ - fi; \ - if [ "$$FIRST" == "badrt" ]; then \ - PEDUMP_ARG="metadata,code" \ - RES=1; \ - fi; \ - if [ "$$FIRST" == "valid" ]; then \ - RES=0; \ - fi; \ - if [ $$RES != 99 ]; then \ - ../../metadata/pedump --verify $$PEDUMP_ARG $$i >/dev/null 2>/dev/null; \ - R=$$?; \ - if [ $$R != $$RES ]; then \ - echo "$$i failed expected $$RES but got $$R"; \ - fi; \ - fi; \ - done - - - -check_with_peverify: generate-stamp - @for i in *.exe; do \ - RES=99; \ - FIRST=`echo $$i | cut -d '-' -f 1`; \ - if [ "$$FIRST" == "invalid" ]; then \ - RES=1; \ - fi; \ - if [ "$$FIRST" == "badrt" ]; then \ - RES=1; \ - fi; \ - if [ "$$FIRST" == "valid" ]; then \ - RES=0; \ - fi; \ - if [ $$RES != 99 ]; then \ - peverify $$i >/dev/null 2>/dev/null; \ - R=$$?; \ - if [ $$R != $$RES ]; then \ - echo "$$i failed expected $$RES but got $$R"; \ - fi; \ - fi; \ - done diff --git a/src/mono/mono/tests/testing_gac/.gitignore b/src/mono/mono/tests/testing_gac/.gitignore index 9d83ddd1e9b30b..35220d38aeac81 100644 --- a/src/mono/mono/tests/testing_gac/.gitignore +++ b/src/mono/mono/tests/testing_gac/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /lib/mono/ /signed_v1 /signed_v2 diff --git a/src/mono/mono/tests/testing_gac/Makefile.am b/src/mono/mono/tests/testing_gac/Makefile.am deleted file mode 100644 index 44f82cac49b7e8..00000000000000 --- a/src/mono/mono/tests/testing_gac/Makefile.am +++ /dev/null @@ -1,192 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -### buildtree stuff - -CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE) - -if FULL_AOT_TESTS -PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY,FULL_AOT_DESKTOP -endif - -if HYBRID_AOT_TESTS -PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY -endif - -### test runner stuff - -if HOST_WIN32 -PLATFORM_PATH_SEPARATOR=; -else -PLATFORM_PATH_SEPARATOR=: -endif - -RUNTIME= $(top_builddir)/runtime/mono-wrapper -TEST_RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME) -TOOLS_RUNTIME= MONO_PATH=$(mcs_topdir)/class/lib/build $(RUNTIME) - -# These tests are testing strict assembly strong-name resolution -TEST_RUNNER = ../test-runner.exe --runtime-args "--assembly-loader=strict" - -if HOST_WIN32 -if ENABLE_MSVC -DEFAULT_WIN32_RUNTIME=$(shell cygpath -w -a $(top_builddir)/@mono_runtime@ | sed 's/\\/\\\\/g') -else -DEFAULT_WIN32_RUNTIME=$(top_builddir)/runtime/mono-wrapper) -endif -TEST_RUNNER_ARGS=--runtime "$(if $(MONO_EXECUTABLE),$(shell cygpath -w -a $(MONO_EXECUTABLE) | sed 's/\\/\\\\/g'),$(DEFAULT_WIN32_RUNTIME))" -else -TEST_RUNNER_ARGS=--runtime $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),mono) -endif - -TEST_RUNNER_ARGS += $(if $(V), --verbose,) - -if FULL_AOT_TESTS -TEST_RUNNER += --runtime-args "$(AOT_RUN_FLAGS)" -endif - -if HYBRID_AOT_TESTS -TEST_RUNNER += --runtime-args "$(AOT_RUN_FLAGS)" -endif - -### tools - -GACUTIL= $(mcs_topdir)/class/lib/build/gacutil.exe -SN= $(mcs_topdir)/class/lib/build/sn.exe - -MCS= $(TOOLS_RUNTIME) $(CSC) -noconfig -nologo -debug:portable -target:library $(PROFILE_MCS_FLAGS) - -### testcase stuff - -BASE_MONO_PATH=$(CLASS) - -V1_SRC= v1/gactestlib.cs -V2_SRC= v2/gactestlib.cs -APP_V1_SRC = v1/app.cs v1/app-refl-load.cs -APP_BOTH_SRC = app-both.cs - -APP_SIGNED_V1_EXE = app-v1.exe app-refl-load-v1.exe - -APP_BOTH_EXE = app-both.exe - -UNSIGNED_V1_DLL= unsigned_v1/gactestlib.dll -UNSIGNED_V2_DLL= unsigned_v2/gactestlib.dll - -SIGNED_V1_DLL= signed_v1/gactestlib.dll -SIGNED_V2_DLL= signed_v2/gactestlib.dll - -GACTESTLIB_SRCS= $(V1_SRC) $(V2_SRC) -GACTESTLIB_DLLS= $(SIGNED_V1_DLL) $(SIGNED_V2_DLL) $(UNSIGNED_V1_DLL) $(UNSIGNED_V2_DLL) - -#if FULL_AOT_TESTS -#GACTESTLIB_DLLS_AOT=$(GACTESTLIB_DLLS:.dll=.dll$(PLATFORM_AOT_SUFFIX)) -#APP_SIGNED_V1_AOT=$(APP_SIGNED_V1_EXE:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -#endif - -#if HYBRID_AOT_TESTS -#GACTESTLIB_DLLS_AOT=$(GACTESTLIB_DLLS:.dll=.dll$(PLATFORM_AOT_SUFFIX)) -#APP_SIGNED_V1_AOT=$(APP_SIGNED_V1_EXE:.exe=.exe$(PLATFORM_AOT_SUFFIX)) -#endif - - -SIGNING_KEY= $(srcdir)/testkey.snk - -# prefix for the testing gac. gacutil will add lib/mono/gac directories -GACDIR=. - -SIGN= -delaysign -keyfile:$(SIGNING_KEY) - - -### autotools stuff - -EXTRA_DIST= README $(SIGNING_KEY) $(GACTESTLIB_SRCS) $(APP_V1_SRC) $(APP_BOTH_SRC) - -### Test cases - -.PHONY: run-test test-local prereqs - -run-test: - true -if !FULL_AOT_TESTS -if !HYBRID_AOT_TESTS - $(MAKE) test-app-both - $(MAKE) test-signed-v1-app-mp-unsigned-v1 - $(MAKE) test-signed-v1-app-mp-signed-v1 - $(MAKE) test-signed-v1-app-mp-unsigned-v2-signed-v1 - $(MAKE) test-signed-v1-app-mp-signed-v2-signed-v1 - $(MAKE) test-signed-v1-app-gac -endif -endif - -test-local: prereqs $(APP_SIGNED_V1_EXE) $(APP_BOTH_EXE) $(APP_SIGNED_V1_AOT) - -prereqs: $(GACTESTLIB_DLLS) $(GACTESTLIB_DLLS_AOT) - $(MAKE) gacinstall - -$(UNSIGNED_V1_DLL): $(V1_SRC) - -mkdir -p $(@D) - $(MCS) -out:$@ $< - -$(UNSIGNED_V2_DLL): $(V2_SRC) - -mkdir -p $(@D) - $(MCS) -out:$@ $< - -$(SIGNED_V1_DLL): $(V1_SRC) $(SIGNING_KEY) - -mkdir -p $(@D) - $(MCS) -out:$@ $(SIGN) $< && $(TOOLS_RUNTIME) $(SN) -R $@ $(SIGNING_KEY) - -$(SIGNED_V2_DLL): $(V2_SRC) $(SIGNING_KEY) - -mkdir -p $(@D) - $(MCS) -out:$@ $(SIGN) $< && $(TOOLS_RUNTIME) $(SN) -R $@ $(SIGNING_KEY) - -app-both.exe: app-both.cs $(SIGNED_V1_DLL) $(SIGNED_V2_DLL) - $(MCS) -target:exe -out:$@ -r:V1=$(SIGNED_V1_DLL) /r:V2=$(SIGNED_V2_DLL) $< - -%-v1.exe: v1/%.cs $(SIGNED_V1_DLL) - $(MCS) -target:exe -out:$@ -r:$(SIGNED_V1_DLL) $< - -%.exe$(PLATFORM_AOT_SUFFIX): %.exe - $(TEST_RUNTIME) $(AOT_BUILD_FLAGS) $< - -%.dll$(PLATFORM_AOT_SUFFIX): %.dll - $(TEST_RUNTIME) $(AOT_BUILD_FLAGS) $< - -# MONO_PATH tests - -test-signed-v1-app-mp-unsigned-v1: $(APP_SIGNED_V1_EXE) prereqs - $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-path "unsigned_v1$(PLATFORM_PATH_SEPARATOR)$(BASE_MONO_PATH)" --expected-exit-code 1 $(APP_SIGNED_V1_EXE) - -test-signed-v1-app-mp-signed-v1: $(APP_SIGNED_V1_EXE) prereqs - $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-path "signed_v1$(PLATFORM_PATH_SEPARATOR)$(BASE_MONO_PATH)" $(APP_SIGNED_V1_EXE) - -test-signed-v1-app-mp-unsigned-v2-signed-v1: $(APP_SIGNED_V1_EXE) prereqs - $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-path "unsigned_v2$(PLATFORM_PATH_SEPARATOR)signed_v1$(PLATFORM_PATH_SEPARATOR)$(BASE_MONO_PATH)" $(APP_SIGNED_V1_EXE) - -test-signed-v1-app-mp-signed-v2-signed-v1: $(APP_SIGNED_V1_EXE) prereqs - $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-path "signed_v2$(PLATFORM_PATH_SEPARATOR)signed_v1$(PLATFORM_PATH_SEPARATOR)$(BASE_MONO_PATH)" $(APP_SIGNED_V1_EXE) - -# N.B. the path order is important - the test needs to load v1 successfully and then try to load v2 from the v1 directory. -test-app-both: $(APP_BOTH_EXE) prereqs - $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-path "signed_v1$(PLATFORM_PATH_SEPARATOR)signed_v2$(PLATFORM_PATH_SEPARATOR)$(BASE_MONO_PATH)" app-both.exe - -# MONO_GAC_PREFIX tests - -test-signed-v1-app-gac: $(APP_SIGNED_V1_EXE) gacinstall prereqs - $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-gac-prefix $(GACDIR) $(APP_SIGNED_V1_EXE) - -.PHONY: gacinstall - -gacinstall: $(SIGNED_V1_DLL) $(GACTESTLIB_DLLS_AOT) - $(TOOLS_RUNTIME) $(GACUTIL) -i $< -gacdir $(GACDIR) - -mostlyclean-local: clean-gac-subdir clean-gactestlib-dll - -rm -f TestResult-*.xml - -.PHONY: clean-gac-subdir clean-gactestlib-dll - -clean-gac-subdir: - -rm -rf $(GACDIR)/lib/mono/gac/ - -clean-gactestlib-dll: - -rm -f $(GACTESTLIB_DLLS) - -rm -f $(GACTESTLIB_DLLS_AOT) - -rm -f $(APP_SIGNED_V1_EXE) $(APP_SIGNED_V1_AOT) diff --git a/src/mono/mono/tests/verifier/Makefile b/src/mono/mono/tests/verifier/Makefile deleted file mode 100644 index b61302fec3a7ab..00000000000000 --- a/src/mono/mono/tests/verifier/Makefile +++ /dev/null @@ -1,92 +0,0 @@ - -%.exe: %.cil - ilasm -out:$@ $< - -BatchCompiler.exe: BatchCompiler.cs - mcs -r:../../../mcs/class/lib/net_4_x/ilasm.exe BatchCompiler.cs - -test_lib.dll: test_lib.cs - mcs test_lib.cs -target:library - -compile-stamp: generate-stamp BatchCompiler.exe test_lib.dll - for i in *.cs; do \ - EXE="`echo $$i | cut -d. -f1`.exe"; \ - DLL="`echo $$i | cut -d. -f1`.dll"; \ - if ! [ -f $$EXE ] && ! [ -f $$DLL ]; then \ - mcs /unsafe $$i; \ - fi \ - done - #MONO_PATH=../../../mcs/class/lib/net_2_0/ mono BatchCompiler.exe - for i in *.il; do ilasm $$i; done - touch compile-stamp - -clean: - for i in *generated*; do rm $$i; done - for i in *.exe; do rm $$i; done - rm generate-stamp compile-stamp - -generate-stamp: make_tests.sh make_bin_test.sh make_exception_branch_test.sh make_obj_store_test.sh \ - make_stack_0_pop_test.sh make_stack_0_test.sh make_stack_1_pop_test.sh \ - make_stack_merge_test.sh make_store_test.sh make_unary_test.sh - ./make_tests.sh - touch generate-stamp - -test: compile-stamp run-test - -run-test: compile-stamp - @for i in *.exe; do \ - TEST=`echo $$i | cut -d '.' -f 1`; \ - RES=99; \ - FIRST=`echo $$i | cut -d '_' -f 1`; \ - if [ "$$FIRST" == "invalid" ]; \ - then \ - RES=3; \ - fi; \ - if [ "$$FIRST" == "unverifiable" ] || [ "$$FIRST" == "typeunverifiable" ]; \ - then \ - RES=2; \ - fi; \ - if [ "$$FIRST" == "badmd" ]; \ - then \ - RES=1; \ - fi; \ - if [ "$$FIRST" == "valid" ]; \ - then \ - RES=0; \ - fi; \ - if [ "$$FIRST" == "strict" ]; \ - then \ - echo "#in strict more it must fail under strict check and pass under non-strict check" >/dev/null; \ - ../../metadata/pedump --verify partial-md,error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \ - R1=$$?; \ - ../../metadata/pedump --verify partial-md,error,warn,cls,code,non-strict $$TEST.exe >/dev/null 2>/dev/null; \ - R2=$$?; \ - if [ $$R1 != 2 ] && [ $$R1 != 3 ]; then \ - echo "$$TEST is strict but did not fail under strict check, got $${R1} but expected 2 or 3"; \ - fi; \ - echo "#non-strict result" >/dev/null; \ - if [ $$R2 != 0 ]; then \ - echo "$$TEST is strict but did not pass under non-strict check, got $${R2} but expected 0"; \ - fi; \ - elif [ "$$FIRST" == "typeunverifiable" ]; then \ - echo "#in type unverifiable more it must fail under verifiable mode but it's ok under valid mode" >/dev/null; \ - ../../metadata/pedump --verify partial-md,error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \ - R1=$$?; \ - ../../metadata/pedump --verify partial-md,error,warn,cls,code,valid-only $$TEST.exe >/dev/null 2>/dev/null; \ - R2=$$?; \ - if [ $$R1 != 3 ]; then \ - echo "$$TEST is type unverifiable but did not fail under verifiable check, got $${R1} but expected 3"; \ - fi; \ - echo "#type unverifiable result" >/dev/null; \ - if [ $$R2 != 0 ]; then \ - echo "$$TEST is type unverifiable but did not pass under non-strict check, got $${R2} but expected 0"; \ - fi; \ - elif [ $$RES != 99 ]; then \ - ../../metadata/pedump --verify partial-md,error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \ - R=$$?; \ - if [ $$R != $$RES ]; then \ - echo "$$TEST failed expected $$RES but got $$R"; \ - fi; \ - fi; \ - done - diff --git a/src/mono/mono/unit-tests/.gitignore b/src/mono/mono/unit-tests/.gitignore index 86a3140133eef1..c061d001f308f9 100644 --- a/src/mono/mono/unit-tests/.gitignore +++ b/src/mono/mono/unit-tests/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.deps /.libs /*.la diff --git a/src/mono/mono/unit-tests/Makefile.am b/src/mono/mono/unit-tests/Makefile.am deleted file mode 100644 index 530a52fb352ed4..00000000000000 --- a/src/mono/mono/unit-tests/Makefile.am +++ /dev/null @@ -1,158 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono -I$(top_srcdir)/samples $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\" - -CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE) - -TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper --aot-path=$(mcs_topdir)/class/lib/build - -MCS_NO_UNSAFE = $(TOOLS_RUNTIME) $(CSC) -debug:portable \ - -noconfig -nologo \ - -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \ - -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \ - -nowarn:0197 $(PROFILE_MCS_FLAGS) -MCS_NO_LIB = $(MCS_NO_UNSAFE) -unsafe - -MCS = $(MCS_NO_LIB) - -LLVMMONOF=$(LLVM_LIBS) $(LLVM_LDFLAGS) - -glib_libs = $(top_builddir)/mono/eglib/libeglib.la - -test_cflags = $(AM_CFLAGS) $(SGEN_DEFINES) -test_ldadd = libtestlib.la \ - $(LIBGC_LIBS) $(glib_libs) $(LLVMMONOF) - -if HOST_DARWIN -test_ldflags = -framework CoreFoundation -framework Foundation -endif - -monodir=$(top_builddir) -sgen_libs = \ - $(monodir)/mono/metadata/libmonoruntimesgen.la \ - $(monodir)/mono/sgen/libmonosgen.la \ - $(monodir)/mono/utils/libmonoutils.la \ - $(glib_libs) - -mini_libs = \ - $(monodir)/mono/mini/libmini.la - -if !DISABLE_INTERPRETER -mini_libs += $(monodir)/mono/mini/libmono-ee-interp.la -endif - -if !DISABLE_DEBUGGER_AGENT -mini_libs += $(monodir)/mono/mini/libmono-dbg.la -endif - -CFLAGS = $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) - -if !CROSS_COMPILE -if !HOST_WIN32 - -noinst_LTLIBRARIES = libtestlib.la -libtestlib_la_CFLAGS = @CXX_ADD_CFLAGS@ -libtestlib_la_SOURCES = \ - test-sgen-qsort.c \ - test-memfuncs.c \ - test-mono-linked-list-set.c \ - test-conc-hashtable.c \ - test-mono-handle.c \ - test-mono-callspec.c \ - test-mono-string.c \ - test-mono-embed.c \ - test-embed-invoke.c -libtestlib_la_LIBADD = ../metadata/libmonoruntimesgen.la ../sgen/libmonosgen.la ../utils/libmonoutils.la - -test_sgen_qsort_SOURCES = main.c -test_sgen_qsort_CFLAGS = $(test_cflags) -DMAIN=test_sgen_qsort_main -test_sgen_qsort_LDADD = $(test_ldadd) libtestlib_la-test-sgen-qsort.lo -test_sgen_qsort_LDFLAGS = $(test_ldflags) - -test_memfuncs_SOURCES = main.c -test_memfuncs_CFLAGS = $(test_cflags) -DMAIN=test_memfuncs_main -test_memfuncs_LDADD = $(test_ldadd) libtestlib_la-test-memfuncs.lo -test_memfuncs_LDFLAGS = $(test_ldflags) - -test_mono_linked_list_set_SOURCES = main.c -test_mono_linked_list_set_CFLAGS = $(test_cflags) -DMAIN=test_mono_linked_list_set_main -test_mono_linked_list_set_LDADD = $(test_ldadd) libtestlib_la-test-mono-linked-list-set.lo -test_mono_linked_list_set_LDFLAGS = $(test_ldflags) - -test_conc_hashtable_SOURCES = main.c -test_conc_hashtable_CFLAGS = $(test_cflags) -DMAIN=test_conc_hashtable_main -test_conc_hashtable_LDADD = $(test_ldadd) libtestlib_la-test-conc-hashtable.lo -test_conc_hashtable_LDFLAGS = $(test_ldflags) - -test_mono_handle_SOURCES = main.c -test_mono_handle_CFLAGS = $(test_cflags) -DMAIN=test_mono_handle_main -test_mono_handle_LDADD = $(test_ldadd) libtestlib_la-test-mono-handle.lo -test_mono_handle_LDFLAGS = $(test_ldflags) - -test_mono_callspec_SOURCES = main.c -test_mono_callspec_CFLAGS = $(AM_CFLAGS) -DMAIN=test_mono_callspec_main -test_mono_callspec_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs) libtestlib_la-test-mono-callspec.lo -test_mono_callspec_LDFLAGS = $(test_ldflags) -test_mono_callspec_DEPENDENCIES = callspec.exe - -test_mono_string_SOURCES = main.c -test_mono_string_CFLAGS = $(test_cflags) -DMAIN=test_mono_string_main -test_mono_string_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs) libtestlib_la-test-mono-string.lo -test_mono_string_LDFLAGS = $(test_ldflags) - -test_mono_embed_SOURCES = main.c -test_mono_embed_CFLAGS = $(test_cflags) -DMAIN=test_mono_embed_main -test_mono_embed_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs) libtestlib_la-test-mono-embed.lo -test_mono_embed_LDFLAGS = $(test_ldflags) -test_mono_embed_DEPENDENCIES = test-embed.exe - -test_path_SOURCES = test-path.c -test_path_CFLAGS = $(test-cflags) -test_path_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs) -test_path_LDFLAGS = $(test_ldflags) - -test_embed_invoke_SOURCES = main.c -test_embed_invoke_CFLAGS = $(test_cflags) -DMAIN=test_mono_embed_invoke_main -test_embed_invoke_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs) libtestlib_la-test-embed-invoke.lo -test_embed_invoke_LDFLAGS = $(test_ldflags) -test_embed_invoke_DEPENDENCIES = test-embed-invoke-cs.exe - - -check_PROGRAMS = test-sgen-qsort test-memfuncs test-mono-linked-list-set test-conc-hashtable test-mono-handle \ - test-path \ - test-mono-callspec test-mono-string test-mono-embed test-embed-invoke - -TESTS = test-sgen-qsort test-memfuncs test-mono-linked-list-set test-conc-hashtable test-mono-handle \ - test-path \ - test-mono-callspec test-mono-string test-mono-embed test-embed-invoke - -AM_TESTS_ENVIRONMENT = export MONO_PATH=$(mcs_topdir)/class/lib/build; - -test-local: $(check_PROGRAMS) - -.NOTPARALLEL: - -check-local: - if [ -e test-suite.log ]; then \ - if grep -q "# FAIL: 0\|tests passed" test-suite.log; then successbool=True && failures=0; else successbool=False && failures=1; fi; \ - echo "" > TestResult-unit-tests.xml; \ - if [ $$failures -ne 0 ]; then echo ""'> TestResult-unit-tests.xml && cat test-suite.log >> TestResult-unit-tests.xml && echo "]]>" >> TestResult-unit-tests.xml; fi; \ - echo "" >> TestResult-unit-tests.xml; \ - fi; - -clean-local: - rm -f callspec.exe callspec.pdb - rm -f test-embed.exe test-embed.pdb - rm -f test-embed-invoke-cs.exe test-embed-invoke-cs.pdb - -%.exe: %.cs - $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -out:$@ $< - -test-embed.exe: $(top_srcdir)/samples/embed/test.cs - $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -out:$@ $< - -test-embed-invoke-cs.exe: $(top_srcdir)/samples/embed/invoke.cs - $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -out:$@ $< - -endif !HOST_WIN32 -endif !CROSS_COMPILE diff --git a/src/mono/mono/utils/.gitignore b/src/mono/mono/utils/.gitignore index 870b8706cd0bff..5f6573813d5856 100644 --- a/src/mono/mono/utils/.gitignore +++ b/src/mono/mono/utils/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.deps /.libs /*.la diff --git a/src/mono/mono/utils/Makefile.am b/src/mono/mono/utils/Makefile.am deleted file mode 100644 index 8d9bd115981631..00000000000000 --- a/src/mono/mono/utils/Makefile.am +++ /dev/null @@ -1,373 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -if !ENABLE_MSVC_ONLY - -noinst_LTLIBRARIES = \ - libmonomath.la \ - libmonoutils.la - -if ENABLE_LLVM - if INTERNAL_LLVM - llvm_config=$(monodir)/llvm/usr/bin/llvm-config - else - llvm_config=$(EXTERNAL_LLVM_CONFIG) - endif - - llvm_api_version_from_config=$(shell $(llvm_config) --mono-api-version 2>/dev/null) - llvm_api_version=$(shell if [ -z "$(llvm_api_version_from_config)" ]; then echo "0"; else echo "$(llvm_api_version_from_config)"; fi) - LLVM_CFLAGS=-DLLVM_API_VERSION=$(llvm_api_version) -endif - -if ENABLE_LLVM -if INTERNAL_LLVM -llvm_config=$(monodir)/llvm/usr/bin/llvm-config -else -llvm_config=$(EXTERNAL_LLVM_CONFIG) -endif - -llvm_api_version_from_config=$(shell $(llvm_config) --mono-api-version 2>/dev/null) -llvm_api_version=$(shell if [ -z "$(llvm_api_version_from_config)" ]; then echo "0"; else echo "$(llvm_api_version_from_config)"; fi) -LLVM_CFLAGS=-DLLVM_API_VERSION=$(llvm_api_version) -endif - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS) $(LLVM_CFLAGS) - -if ENABLE_DTRACE - -BUILT_SOURCES = mono-dtrace.h - -mono-dtrace.h: $(top_srcdir)/data/mono.d - $(DTRACE) $(DTRACEFLAGS) -h -s $(top_srcdir)/data/mono.d -o $@ || > $@ - -endif - -if HOST_WIN32 -win32_sources = \ - mono-os-semaphore-win32.c \ - mono-os-wait-win32.c \ - mono-windows-thread-name.c \ - os-event-win32.c - -platform_sources = $(win32_sources) -else -unix_sources = \ - dlmalloc.h \ - dlmalloc.c \ - os-event-unix.c - -platform_sources = $(unix_sources) -endif - -monoutils_sources = \ - $(platform_sources) \ - mono-md5.c \ - mono-sha1.c \ - mono-logger.c \ - mono-logger-internals.h \ - mono-codeman.c \ - mono-counters.c \ - mono-compiler.h \ - mono-complex.h \ - mono-dl.c \ - mono-dl-windows.c \ - mono-dl-darwin.c \ - mono-dl-posix.c \ - mono-dl-wasm.c \ - mono-dl.h \ - mono-dl-windows-internals.h \ - mono-experiments.h \ - mono-experiments.c \ - mono-log-windows.c \ - mono-log-common.c \ - mono-log-posix.c \ - mono-log-android.c \ - mono-log-darwin.c \ - mono-log-flight-recorder.c \ - mono-merp.c \ - mono-merp.h \ - mono-state.h \ - mono-state.c \ - mono-internal-hash.c \ - mono-internal-hash.h \ - mono-io-portability.c \ - mono-io-portability.h \ - monobitset.c \ - mono-filemap.c \ - mono-mmap.c \ - mono-mmap-windows.c \ - mono-mmap-wasm.c \ - mono-mmap.h \ - mono-mmap-internals.h \ - mono-os-mutex.h \ - mono-os-mutex.c \ - mono-flight-recorder.h \ - mono-flight-recorder.c \ - mono-os-wait.h \ - mono-coop-mutex.h \ - mono-once.h \ - mono-lazy-init.h \ - mono-networkinterfaces.c \ - mono-networkinterfaces.h \ - mono-proclib.c \ - mono-proclib-windows.c \ - mono-proclib.h \ - mono-proclib-windows-internals.h \ - mono-publib.c \ - mono-jemalloc.c \ - mono-string.h \ - mono-time.c \ - mono-time.h \ - strenc-internals.h \ - strenc.h \ - strenc.c \ - mono-uri.c \ - mono-poll.c \ - mono-path.c \ - mono-os-semaphore.h \ - mono-coop-semaphore.h \ - mono-sigcontext.h \ - mono-stdlib.c \ - mono-property-hash.h \ - mono-property-hash.c \ - mono-value-hash.h \ - mono-value-hash.c \ - freebsd-elf_common.h \ - freebsd-elf32.h \ - freebsd-elf64.h \ - freebsd-dwarf.h \ - dtrace.h \ - gc_wrapper.h \ - mono-error.c \ - mono-error-internals.h \ - monobitset.h \ - mono-codeman.h \ - mono-counters.h \ - mono-digest.h \ - mono-error.h \ - mono-forward-internal.h \ - mono-machine.h \ - mono-math.h \ - mono-membar.h \ - mono-path.h \ - mono-poll.h \ - mono-uri.h \ - mono-stdlib.h \ - valgrind.h \ - mach-support.h \ - memcheck.h \ - mono-context.c \ - mono-context.h \ - mono-stack-unwinding.h \ - hazard-pointer.c \ - hazard-pointer.h \ - lifo-semaphore.c \ - lifo-semaphore.h \ - lock-free-queue.c \ - lock-free-queue.h \ - lock-free-alloc.c \ - lock-free-alloc.h \ - lock-free-array-queue.c \ - lock-free-array-queue.h \ - mono-linked-list-set.c \ - mono-linked-list-set.h \ - mono-threads.c \ - mono-threads-state-machine.c \ - mono-threads-posix.c \ - mono-threads-posix-signals.c \ - mono-threads-mach.c \ - mono-threads-mach-helper.c \ - mono-threads-windows.c \ - mono-threads-linux.c \ - mono-threads-freebsd.c \ - mono-threads-netbsd.c \ - mono-threads-openbsd.c \ - mono-threads-android.c \ - mono-threads-haiku.c \ - mono-threads-aix.c \ - mono-threads-wasm.c \ - mono-threads-sunos.c \ - mono-threads.h \ - mono-threads-debug.h \ - mono-threads-api.h \ - mono-threads-coop.c \ - mono-threads-coop.h \ - mono-utility-thread.c \ - mono-utility-thread.h \ - mono-tls.h \ - mono-tls-inline.h \ - mono-tls.c \ - mono-utils-debug.c \ - mono-utils-debug.h \ - linux_magic.h \ - mono-memory-model.h \ - atomic.h \ - atomic.c \ - mono-hwcap.h \ - mono-hwcap.c \ - mono-hwcap-vars.h \ - bsearch.h \ - bsearch.c \ - mono-signal-handler.h \ - mono-signal-handler.c \ - mono-conc-hashtable.h \ - mono-conc-hashtable.c \ - json.h \ - json.c \ - networking.c \ - networking-posix.c \ - networking-fallback.c \ - networking-missing.c \ - networking-windows.c \ - networking.h \ - mono-rand.c \ - mono-rand-windows.c \ - mono-rand.h \ - memfuncs.c \ - memfuncs.h \ - parse.c \ - parse.h \ - checked-build.c \ - checked-build.h \ - os-event.h \ - refcount.h \ - w32api.h \ - w32subset.h \ - unlocked.h \ - ward.h \ - options.h \ - options-def.h \ - options.c - -arch_sources = - -if !CROSS_COMPILE - -if X86 -arch_sources += mach-support-x86.c -endif - -if AMD64 -arch_sources += mach-support-amd64.c -endif - -if ARM -arch_sources += mach-support-arm.c -endif - -if ARM64 -arch_sources += mach-support-arm64.c -endif - -else - -arch_sources += mach-support-unknown.c - -endif - -if !CROSS_COMPILE - -if X86 -arch_sources += mono-hwcap-x86.c -endif - -if AMD64 -arch_sources += mono-hwcap-x86.c -endif - -if ARM -arch_sources += mono-hwcap-arm.c -endif - -if ARM64 -arch_sources += mono-hwcap-arm64.c -endif - -if MIPS -arch_sources += mono-hwcap-mips.c -endif - -if POWERPC -arch_sources += mono-hwcap-ppc.c -endif - -if POWERPC64 -arch_sources += mono-hwcap-ppc.c -endif - -if SPARC -arch_sources += mono-hwcap-sparc.c -endif - -if SPARC64 -arch_sources += mono-hwcap-sparc.c -endif - -if S390X -arch_sources += mono-hwcap-s390x.c -endif - -if RISCV -arch_sources += mono-hwcap-riscv.c -endif - -if HOST_WASM -arch_sources += mono-hwcap-wasm.c -endif - -else - -arch_sources += mono-hwcap-cross.c - -endif - -libmonoutils_la_SOURCES = $(monoutils_sources) $(arch_sources) -libmonoutils_la_CFLAGS = $(JEMALLOC_CFLAGS) @CXX_ADD_CFLAGS@ -libmonoutils_la_LDFLAGS = $(JEMALLOC_LDFLAGS) - -endif # !ENABLE_MSVC_ONLY - -libmonoutilsincludedir = $(includedir)/mono-$(API_VER)/mono/utils - -if !ENABLE_MSVC_ONLY - -libmonoutils_la_LIBADD = mono-math-c.lo - -libmonomath_la_SOURCES = mono-math-c.c -libmonomath_la_CFLAGS = @CXX_REMOVE_CFLAGS@ - -endif # !ENABLE_MSVC_ONLY - -# These are public headers. -# They should not use glib.h, G_BEGIN_DECLS, guint, etc. -# They should be wrapped in MONO_BEGIN_DECLS / MONO_END_DECLS. -libmonoutilsinclude_HEADERS = \ - mono-logger.h \ - mono-error.h \ - mono-forward.h \ - mono-publib.h \ - mono-jemalloc.h \ - mono-dl-fallback.h \ - mono-private-unstable.h \ - mono-counters.h - -EXTRA_DIST = mono-errno.h mono-embed.h mono-embed.c ../../support/libm/complex.c mono-experiments.def - -DIST_SUBDIRS = jemalloc - -if MONO_JEMALLOC_ENABLED -SUBDIRS = jemalloc -endif - -CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) - -if ENABLE_MSVC_ONLY - -all-local: - - make -C $(top_srcdir)/msvc libmonoutils - -clean-local: - - make -C $(top_srcdir)/msvc clean-libmonoutils - -endif # ENABLE_MSVC_ONLY diff --git a/src/mono/mono/utils/jemalloc/.gitignore b/src/mono/mono/utils/jemalloc/.gitignore deleted file mode 100644 index 5b038722a54d22..00000000000000 --- a/src/mono/mono/utils/jemalloc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/jemalloc diff --git a/src/mono/mono/utils/jemalloc/Makefile.am b/src/mono/mono/utils/jemalloc/Makefile.am deleted file mode 100644 index 3bd3acfb1466c5..00000000000000 --- a/src/mono/mono/utils/jemalloc/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -# -# Conditional submodule for jemalloc -# -# make reset-jemalloc will checkout a version of jemalloc which is suitable for this version of mono -# into $top_srcdir/jemalloc/jemalloc. -# - -JEMALLOC_PATH=jemalloc - -SUBMODULES_CONFIG_FILE = $(top_srcdir)/mono/utils/jemalloc/SUBMODULES.json -include $(top_srcdir)/scripts/submodules/versions.mk - -$(eval $(call ValidateVersionTemplate,jemalloc,JEMALLOC)) - -# Bump the given submodule to the revision given by the REV make variable -# If COMMIT is 1, commit the change -bump-jemalloc: __bump-version-jemalloc - -# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables -# If COMMIT is 1, commit the change -bump-branch-jemalloc: __bump-branch-jemalloc - -# Bump the given submodule to its current GIT version -# If COMMIT is 1, commit the change -bump-current-jemalloc: __bump-current-version-jemalloc - -clean-local: - $(RM) -r $(JEMALLOC_PATH) - -EXTRA_DIST=SUBMODULES.json - -if MONO_JEMALLOC_ASSERT -ASSERT_OPT=--enable-debug -endif - -jemalloc: - $(MAKE) reset-jemalloc - -# Set a prefix to enable access to allocation functions with a prefix, ie so mono_jemalloc isn't named malloc by default -# Disable zone allocator, otherwise malloc uses jemalloc for things it's not set for -# We call autoconf ourselves so we can call configure and not autogen. Autogen script is broken, minor bash issues around quote escaping -jemalloc/lib/libjemalloc.a: jemalloc Makefile - cd jemalloc && autoconf && ./configure --with-jemalloc-prefix=mono_je --prefix=`pwd` --enable-debug $(JEMALLOC_AUTOCONF_FLAGS) --disable-zone-allocator EXTRA_CFLAGS="-I $(top_srcdir) $(GLIB_CFLAGS) $(CFLAGS) $(PLATFORM_CFLAGS) $(ARCH_CFLAGS) $(SHARED_CFLAGS) -Wno-error" CC="$(CC)" CXX="$(CXX)" CPPFLAGS="$(CPPFLAGS) $(JEMALLOC_CPPFLAGS) " CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" - - cd jemalloc && $(MAKE) build_lib_static - -all-local: jemalloc/lib/libjemalloc.a - - diff --git a/src/mono/mono/utils/jemalloc/SUBMODULES.json b/src/mono/mono/utils/jemalloc/SUBMODULES.json deleted file mode 100644 index 22bd2871d4289a..00000000000000 --- a/src/mono/mono/utils/jemalloc/SUBMODULES.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "name": "jemalloc", - "url": "git://github.com/mono/jemalloc.git", - "rev": "896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb", - "remote-branch": "origin/master", - "branch": "master", - "directory": "jemalloc" - } -] diff --git a/src/mono/mono/zlib/.gitignore b/src/mono/mono/zlib/.gitignore index 0ded74811d29ef..77e8b62c4253d3 100644 --- a/src/mono/mono/zlib/.gitignore +++ b/src/mono/mono/zlib/.gitignore @@ -1,5 +1,3 @@ -/Makefile -/Makefile.in /.libs /.deps /libz.la diff --git a/src/mono/mono/zlib/Makefile.am b/src/mono/mono/zlib/Makefile.am deleted file mode 100644 index d3b4df16576f7d..00000000000000 --- a/src/mono/mono/zlib/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules - -ZLIB_SOURCE = \ - adler32.c \ - compress.c \ - crc32.c \ - uncompr.c \ - deflate.c \ - gzguts.h \ - trees.c \ - zutil.c \ - inflate.c \ - infback.c \ - inftrees.c \ - inffast.c \ - crc32.h \ - deflate.h \ - inffast.h \ - inffixed.h \ - inflate.h \ - inftrees.h \ - trees.h \ - zconf.h \ - zlib.h \ - zutil.h - -if !HAVE_SYS_ZLIB -if !HAVE_STATIC_ZLIB -noinst_LTLIBRARIES = libz.la -endif -endif - -libz_la_SOURCES = \ - $(ZLIB_SOURCE) diff --git a/src/mono/netcore/CoreFX.issues_interpreter.rsp b/src/mono/netcore/CoreFX.issues_interpreter.rsp deleted file mode 100644 index 84c2af8b0dc578..00000000000000 --- a/src/mono/netcore/CoreFX.issues_interpreter.rsp +++ /dev/null @@ -1,49 +0,0 @@ --nomethod System.Runtime.CompilerServices.Tests.RuntimeFeatureTests.DynamicCode_Jit --nomethod System.Net.Security.Tests.SslStreamStreamToStreamTest_* --nomethod XmlSerializerTests.Xml_Nullables --nomethod XmlSerializerTests.Xml_Soap_WithNullables --nomethod System.IO.Compression.DeflateStreamUnitTests.* --nomethod System.IO.Compression.GzipStreamUnitTests.* --nomethod System.Collections.Concurrent.Tests.ConcurrentDictionary_Generic_Tests_enum_enum.IDictionary_Generic_Add_DuplicateValue --nomethod System.ComponentModel.Tests.ToolboxItemFilterAttributeTests.Equals_Object_ReturnsExpected --nomethod System.Net.Http.Functional.Tests.MultipartContentTest.ReadAsStreamAsync_LargeContent_AllBytesRead --nomethod System.Net.Tests.ServicePointManagerTest.FindServicePoint_Collectible --nomethod System.Reflection.Metadata.Tests.ImmutableByteArrayInteropTest.DangerousCreateFromUnderlyingArray --nomethod DataContractJsonSerializerTests.DCJS_Nullables --nomethod DataContractSerializerTests.DCS_Nullables --nomethod System.Security.Cryptography.Hashing.Tests.HashAlgorithmTest.VerifyComputeHashAsync - -# crashes on Interpreter --nomethod ManagedTests.DynamicCSharp.Conformance.dynamic.dynamicType.statements.checked005.checked005.Test.DynamicCSharpRunTest --nomethod System.Linq.Expressions.Tests.ConvertCheckedTests.ConvertCheckedNullableFloatToSByteTest --nomethod System.Dynamic.Tests.BinaryOperationTests.ModuloDouble --nomethod System.Net.Http.Functional.Tests.SocketsHttpHandler* --nomethod System.Net.Tests.HttpRequestStreamTests.Read_LargeLengthAsynchronous_Success --nomethod System.Net.Tests.HttpRequestStreamTests.Read_LargeLengthSynchronous_Success --nomethod System.Net.Tests.FileWebRequestTest.InvalidArguments_Throws --nomethod System.Net.Tests.AuthorizationTest.MutuallyAuthenticated_Values_ExpectEqualValues --nomethod System.Text.Json.Tests.JsonEncodedTextTests.ReplacementCharacterUTF8 --noclass System.Net.Tests.HttpWebRequestTest --nonamespace System.Linq.Expressions.Tests --nonamespace System.Runtime.InteropServices.Tests --nonamespace System.Net.Tests --nonamespace System.Net.Http.Functional.Tests --nonamespace System.Text.Json - -# BrotliStream.BaseStream returned more bytes than requested in Read on Interpreter --nomethod System.IO.Compression.BrotliStreamUnitTests.Read --nomethod System.IO.Compression.BrotliStreamUnitTests.Read_SequentialReadsOnMemoryStream_Return_SameBytes --nomethod System.IO.Compression.BrotliStreamUnitTests.Parallel_CompressDecompressMultipleStreamsConcurrently --nomethod System.IO.Compression.BrotliStreamUnitTests.Read_BaseStreamSlowly --nomethod System.IO.Compression.BrotliStreamUnitTests.CompressDecompress_RoundTrip --nomethod System.IO.Compression.BrotliStreamUnitTests.Flush_RoundTrip --nomethod System.IO.Compression.BrotliStreamUnitTests.Flush_BeforeFirstWrites --nomethod System.IO.Compression.BrotliStreamUnitTests.Flush_Consecutive - -# extremely slow or hangs on Interpreter --nomethod System.IO.Compression.BrotliStreamUnitTests.WrapStreamReturningBadReadValues --nomethod System.Runtime.Serialization.Formatters.Tests.BinaryFormatterTests.* --nomethod System.Net.Sockets.Tests.SendReceiveSyncForceNonBlocking.TcpReceiveSendGetsCanceledByDispose - -# https://github.com/mono/mono/issues/18063 [interpreter] EqualityComparer.Default.Equals doesn't work correctly --nomethod System.Collections.Generic.Tests.EqualityComparerTests.NullableEquals* diff --git a/src/mono/netcore/CoreFX.issues_linux_arm64.rsp b/src/mono/netcore/CoreFX.issues_linux_arm64.rsp deleted file mode 100644 index 9e071c9b1c2770..00000000000000 --- a/src/mono/netcore/CoreFX.issues_linux_arm64.rsp +++ /dev/null @@ -1,2 +0,0 @@ -# these tests are extremly slow on our arm64 CI --nonamespace System.Transactions.Tests diff --git a/src/mono/netcore/System.Private.CoreLib/GenerateMonoCoreLibVersionFile.targets b/src/mono/netcore/System.Private.CoreLib/GenerateMonoCoreLibVersionFile.targets index 467cf4964101a3..b9bfab7bd6a4bc 100644 --- a/src/mono/netcore/System.Private.CoreLib/GenerateMonoCoreLibVersionFile.targets +++ b/src/mono/netcore/System.Private.CoreLib/GenerateMonoCoreLibVersionFile.targets @@ -5,9 +5,9 @@ $(IntermediateOutputPath)\Environment.MonoCoreLibVersion.cs - + - <_MonoCoreLibVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(MonoProjectRoot)\configure.ac')), 'MONO_CORLIB_VERSION=([a-fA-F0-9\-]+)').Groups[1].Value) + <_MonoCoreLibVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(MonoProjectRoot)\CMakeLists.txt')), 'MONO_CORLIB_VERSION ([a-fA-F0-9\-]+)').Groups[1].Value) <_MonoCoreLibVersionFileLines> // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license.