105 lines
3.8 KiB
Diff
105 lines
3.8 KiB
Diff
link:
|
|
subject: support e2k arch and lcc openmp in autotools config
|
|
bug:
|
|
tags: common
|
|
|
|
diff -rupN a/config/openmp.m4 b/config/openmp.m4
|
|
--- a/config/openmp.m4 2015-11-03 12:40:34.000000000 +0300
|
|
+++ b/config/openmp.m4 2021-01-04 18:54:06.318472196 +0300
|
|
@@ -40,6 +40,19 @@ AC_DEFUN([AX_CHECK_OPENMP],
|
|
[enable_openmp_intel="${enableval}"],
|
|
[enable_openmp_intel="${enable_openmp_intel_default}"]
|
|
)
|
|
+ if test "${Architecture}" = "e2k"; then
|
|
+ enable_openmp_lcc_default="yes"
|
|
+ else
|
|
+ enable_openmp_lcc_default="no"
|
|
+ fi
|
|
+ AC_ARG_ENABLE(openmp-lcc,
|
|
+ AC_HELP_STRING(
|
|
+ [--enable-openmp-lcc],
|
|
+ [Enable support for tracing OpenMP LCC (enabled by default on Elbrus systems)]
|
|
+ ),
|
|
+ [enable_openmp_lcc="${enableval}"],
|
|
+ [enable_openmp_lcc="${enable_openmp_lcc_default}"],
|
|
+ )
|
|
AC_ARG_ENABLE(openmp-gnu,
|
|
AC_HELP_STRING(
|
|
[--enable-openmp-gnu],
|
|
@@ -66,6 +79,7 @@ AC_DEFUN([AX_CHECK_OPENMP],
|
|
enable_openmp_ibm="no"
|
|
enable_openmp_gnu="no"
|
|
enable_openmp_intel="no"
|
|
+ enable_openmp_lcc="no"
|
|
enable_openmp_ompt="yes"
|
|
|
|
AC_DEFINE([OMPT_INSTRUMENTATION], [1], [Define if OpenMP is instrumented through OMPT])
|
|
@@ -74,6 +88,7 @@ AC_DEFUN([AX_CHECK_OPENMP],
|
|
fi
|
|
|
|
if test "${enable_openmp_intel}" = "yes" -o \
|
|
+ "${enable_openmp_lcc}" = "yes" -o \
|
|
"${enable_openmp_gnu}" = "yes" -o \
|
|
"${enable_openmp_ibm}" = "yes" -o \
|
|
"${enable_openmp_ompt}" = "yes" ; then
|
|
@@ -115,6 +130,7 @@ AC_DEFUN([AX_CHECK_OPENMP],
|
|
|
|
AM_CONDITIONAL(WANT_OPENMP, test "${enable_openmp}" = "yes" )
|
|
AM_CONDITIONAL(WANT_OPENMP_INTEL, test "${enable_openmp_intel}" = "yes" )
|
|
+ AM_CONDITIONAL(WANT_OPENMP_LCC, test "${enable_openmp_lcc}" = "yes" )
|
|
AM_CONDITIONAL(WANT_OPENMP_GNU, test "${enable_openmp_gnu}" = "yes" )
|
|
AM_CONDITIONAL(WANT_OPENMP_IBM, test "${enable_openmp_ibm}" = "yes" )
|
|
AM_CONDITIONAL(WANT_OPENMP_OMPT, test "${enable_openmp_ompt}" = "yes" )
|
|
@@ -152,6 +168,7 @@ AC_DEFUN([AX_OPENMP_SHOW_CONFIGURATION],
|
|
fi
|
|
echo -e \\\tIBM OpenMP: ${enable_openmp_ibm}
|
|
echo -e \\\tIntel OpenMP: ${enable_openmp_intel}
|
|
+ echo -e \\\tLCC OpenMP: ${enable_openmp_lcc}
|
|
echo -e \\\tOMPT: ${enable_openmp_ompt}
|
|
else
|
|
echo OpenMP instrumentation: no
|
|
|
|
diff -rupN a/config/system.m4 b/config/system.m4
|
|
--- a/config/system.m4 2015-11-03 12:40:34.000000000 +0300
|
|
+++ b/config/system.m4 2021-01-04 18:54:06.318472196 +0300
|
|
@@ -39,6 +39,20 @@ AC_DEFUN([AX_SYSTEM_TYPE],
|
|
target_cpu="sparc64"
|
|
target_os="linux"
|
|
fi
|
|
+
|
|
+ AC_ARG_ENABLE(e2k,
|
|
+ AC_HELP_STRING(
|
|
+ [--enable-e2k],
|
|
+ [Enable compilation for E2K architecture (disabled by default; needed when compiling for Elbrus E2K)]
|
|
+ ),
|
|
+ [enable_e2k="${enableval}"],
|
|
+ [enable_e2k="no"]
|
|
+ )
|
|
+ IS_E2K_MACHINE=${enable_e2k}
|
|
+ if test "${IS_E2K_MACHINE}" = "yes" ; then
|
|
+ target_cpu="e2k"
|
|
+ target_os="linux"
|
|
+ fi
|
|
|
|
# Check if this is an Altix machine and if it has an /dev/mmtimer device
|
|
# (which is a global clock!)
|
|
@@ -90,6 +104,9 @@ AC_DEFUN([AX_SYSTEM_TYPE],
|
|
AC_DEFINE([ARCH_MIPS], [1], [Define if architecture is MIPS]) ;;
|
|
sparc64 ) Architecture="sparc64"
|
|
AC_DEFINE([ARCH_SPARC64], [1], [Define if architecture is SPARC64]) ;;
|
|
+ e2k|elbrus )
|
|
+ Architecture="e2k"
|
|
+ AC_DEFINE([ARCH_E2K], [1], [Define if architecture is E2K]) ;;
|
|
esac
|
|
|
|
case "${target_os}" in
|
|
@@ -118,6 +135,7 @@ AC_DEFUN([AX_SYSTEM_TYPE],
|
|
AM_CONDITIONAL(ARCH_ALPHA, test "${Architecture}" = "alpha" )
|
|
AM_CONDITIONAL(ARCH_MIPS, test "${Architecture}" = "mips" )
|
|
AM_CONDITIONAL(ARCH_SPARC64, test "${Architecture}" = "sparc64" )
|
|
+ AM_CONDITIONAL(ARCH_E2K, test "${Architecture}" = "e2k" )
|
|
|
|
AM_CONDITIONAL(OS_ANDROID, test "${OperatingSystem}" = "android" )
|
|
AM_CONDITIONAL(OS_LINUX, test "${OperatingSystem}" = "linux" )
|
|
|