diff options
author | Fabian Deutsch <fabian.deutsch@gmx.de> | 2012-01-01 21:41:04 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2014-06-23 10:21:42 +0200 |
commit | 6a6f7869f903cb79454403e96c7a16cd1c469d5b (patch) | |
tree | e2922d9cdbb9bb5ae5a026d9e32b190e55dbd69f | |
parent | 9e692e406bd23e652fd34029ea662456b8e44691 (diff) |
Add compiler option for ENABLE_USER_CODEMEM.rawhide
This option disbales non-user-dependent path checking at compile time. If enabled, only paths corresponding to a user are checked.
Signed-off-by: Fabian Deutsch <fabian.deutsch@gmx.de>
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | orc/Makefile.am | 3 | ||||
-rw-r--r-- | orc/orccodemem.c | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a396b05..39df4b1 100644 --- a/configure.ac +++ b/configure.ac @@ -181,6 +181,10 @@ AM_CONDITIONAL(ENABLE_BACKEND_ARM, test "x$ENABLE_BACKEND_ARM" = "xyes") AM_CONDITIONAL(ENABLE_BACKEND_C64X, test "x$ENABLE_BACKEND_C64X" = "xyes") AM_CONDITIONAL(ENABLE_BACKEND_MIPS, test "x$ENABLE_BACKEND_MIPS" = "xyes") +AC_ARG_ENABLE(user-codemem, + AC_HELP_STRING([--enable-user-codemem],[Force codemem allocation to be user dependent (default is no)]), + [], [enable_user_codemem=no]) +AM_CONDITIONAL(ENABLE_USER_CODEMEM, test "x$enable_user_codemem" = "xyes") AC_DEFINE(ORC_EXPORTS, 1, [Defined for compiling internal code]) diff --git a/orc/Makefile.am b/orc/Makefile.am index 26263e0..887d36b 100644 --- a/orc/Makefile.am +++ b/orc/Makefile.am @@ -9,6 +9,9 @@ liborc_@ORC_MAJORMINOR@_la_LDFLAGS = \ -no-undefined -export-symbols-regex 'orc_' liborc_@ORC_MAJORMINOR@_la_CFLAGS = $(ORC_CFLAGS) \ -DORC_ENABLE_UNSTABLE_API +if ENABLE_USER_CODEMEM +liborc_@ORC_MAJORMINOR@_la_CFLAGS += -DORC_FORCE_USER_CODEMEM +endif liborc_@ORC_MAJORMINOR@_la_SOURCES = \ orc.c \ diff --git a/orc/orccodemem.c b/orc/orccodemem.c index 295a880..4a91e3e 100644 --- a/orc/orccodemem.c +++ b/orc/orccodemem.c @@ -280,12 +280,14 @@ orc_code_region_allocate_codemem (OrcCodeRegion *region) { const char *tmpdir; +#ifndef ORC_FORCE_USER_CODEMEM tmpdir = getenv ("TMPDIR"); if (tmpdir && orc_code_region_allocate_codemem_dual_map (region, tmpdir, FALSE)) return; if (orc_code_region_allocate_codemem_dual_map (region, "/tmp", FALSE)) return; +#endif tmpdir = getenv ("XDG_RUNTIME_DIR"); if (tmpdir && orc_code_region_allocate_codemem_dual_map (region, |