Skip to content

Commit

Permalink
Allow OMRPORT_OMRSIG_SUPPORT to be enabled and disabled globally
Browse files Browse the repository at this point in the history
These changes will allow a consumer of OMR to enable and disable
OMRPORT_OMRSIG_SUPPORT via the configure files.

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
  • Loading branch information
babsingh committed Aug 14, 2018
1 parent 32e6657 commit 9add673
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 13 deletions.
1 change: 1 addition & 0 deletions cmake/config.cmake
Expand Up @@ -161,6 +161,7 @@ set(OMR_PORT_CAN_RESERVE_SPECIFIC_ADDRESS ON CACHE BOOL "TODO: Document")
set(OMR_PORT_NUMA_SUPPORT OFF CACHE BOOL "TODO: Document")
set(OMR_PORT_ALLOCATE_TOP_DOWN OFF CACHE BOOL "TODO: Document")
set(OMR_PORT_ZOS_CEEHDLRSUPPORT OFF CACHE BOOL "TODO: Document")
set(OMRPORT_OMRSIG_SUPPORT OFF CACHE BOOL "TODO: Document")
set(OMR_PORT_ASYNC_HANDLER OFF CACHE BOOL "TODO: Document")


Expand Down
37 changes: 24 additions & 13 deletions configure
Expand Up @@ -665,6 +665,7 @@ OMRTHREAD_LIB_UNIX
OMRTHREAD_LIB_ZOS
OMRTHREAD_LIB_WIN32
OMRTHREAD_LIB_AIX
OMRPORT_OMRSIG_SUPPORT
OMR_PORT_ZOS_CEEHDLRSUPPORT
OMR_PORT_ALLOCATE_TOP_DOWN
OMR_OPT_CUDA
Expand Down Expand Up @@ -789,7 +790,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -887,6 +887,7 @@ enable_OMR_PORT_NUMA_SUPPORT
enable_OMR_OPT_CUDA
enable_OMR_PORT_ALLOCATE_TOP_DOWN
enable_OMR_PORT_ZOS_CEEHDLRSUPPORT
enable_OMRPORT_OMRSIG_SUPPORT
enable_OMRTHREAD_LIB_AIX
enable_OMRTHREAD_LIB_WIN32
enable_OMRTHREAD_LIB_ZOS
Expand Down Expand Up @@ -964,7 +965,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -1217,15 +1217,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;

-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;

-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Expand Down Expand Up @@ -1363,7 +1354,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1516,7 +1507,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
Expand Down Expand Up @@ -1684,6 +1674,8 @@ Optional Features:
--enable-OMR_PORT_ZOS_CEEHDLRSUPPORT
--enable-OMRPORT_OMRSIG_SUPPORT
--enable-OMRTHREAD_LIB_AIX
--enable-OMRTHREAD_LIB_WIN32
Expand Down Expand Up @@ -6959,6 +6951,25 @@ else
fi
# Check whether --enable-OMRPORT_OMRSIG_SUPPORT was given.
if test "${enable_OMRPORT_OMRSIG_SUPPORT+set}" = set; then :
enableval=$enable_OMRPORT_OMRSIG_SUPPORT; if test "x${enableval}" = xyes; then :
OMRPORT_OMRSIG_SUPPORT=1
$as_echo "#define OMRPORT_OMRSIG_SUPPORT 1" >>confdefs.h
else
OMRPORT_OMRSIG_SUPPORT=0
fi
else
OMRPORT_OMRSIG_SUPPORT=0
fi
# Check whether --enable-OMRTHREAD_LIB_AIX was given.
if test "${enable_OMRTHREAD_LIB_AIX+set}" = set; then :
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -492,6 +492,7 @@ fi
OMRCFG_DEFINE_FLAG_OFF([OMR_OPT_CUDA])
OMRCFG_DEFINE_FLAG_OFF([OMR_PORT_ALLOCATE_TOP_DOWN])
OMRCFG_DEFINE_FLAG_OFF([OMR_PORT_ZOS_CEEHDLRSUPPORT])
OMRCFG_DEFINE_FLAG_OFF([OMRPORT_OMRSIG_SUPPORT])

OMRCFG_DEFINE_FLAG([OMRTHREAD_LIB_AIX],[1],
[AS_IF([test "$OMR_HOST_OS" = aix],
Expand Down
7 changes: 7 additions & 0 deletions include_core/omrcfg.h.in
Expand Up @@ -247,4 +247,11 @@
*/
#undef OMR_VALGRIND_MEMCHECK

/**
* This flags enables calls to omrsig_primary_signal, omrsig_primary_sigaction and
* omrsig_handler (omrsig library). If disabled, then calls to signal and sigaction
* will be enabled, and calls to functions in omrsig library will be disabled.
*/
#undef OMRPORT_OMRSIG_SUPPORT

#endif /* !defined(OMRCFG_H_) */
7 changes: 7 additions & 0 deletions omrcfg.CMakeTemplate.h
Expand Up @@ -233,4 +233,11 @@
*/
#cmakedefine OMR_THR_YIELD_ALG

/**
* This flags enables calls to omrsig_primary_signal, omrsig_primary_sigaction and
* omrsig_handler (omrsig library). If disabled, then calls to signal and sigaction
* will be enabled, and calls to functions in omrsig library will be disabled.
*/
#cmakedefine OMRPORT_OMRSIG_SUPPORT

#endif /* !defined(OMRCFG_H_) */
1 change: 1 addition & 0 deletions omrmakefiles/configure.mk.in
Expand Up @@ -88,6 +88,7 @@ OMR_PORT_ASYNC_HANDLER := @OMR_PORT_ASYNC_HANDLER@
OMR_PORT_CAN_RESERVE_SPECIFIC_ADDRESS := @OMR_PORT_CAN_RESERVE_SPECIFIC_ADDRESS@
OMR_PORT_NUMA_SUPPORT := @OMR_PORT_NUMA_SUPPORT@
OMR_PORT_ZOS_CEEHDLRSUPPORT := @OMR_PORT_ZOS_CEEHDLRSUPPORT@
OMRPORT_OMRSIG_SUPPORT := @OMRPORT_OMRSIG_SUPPORT@
OMR_RAS_TDF_TRACE := @OMR_RAS_TDF_TRACE@
OMR_TEST_COMPILER := @OMR_TEST_COMPILER@
OMR_THR_ADAPTIVE_SPIN := @OMR_THR_ADAPTIVE_SPIN@
Expand Down

0 comments on commit 9add673

Please sign in to comment.