Index: compiler-rt/test/builtins/Unit/clear_cache_test.c =================================================================== --- compiler-rt/test/builtins/Unit/clear_cache_test.c +++ compiler-rt/test/builtins/Unit/clear_cache_test.c @@ -1,6 +1,6 @@ // REQUIRES: native-run // UNSUPPORTED: arm, aarch64 -// RUN: %clang_builtins %s %librt -o %t && %run %t +// RUN: %clang_builtins %s %librt -o %t && %paxctl_nomprotect %t && %run %t // REQUIRES: librt_has_clear_cache //===-- clear_cache_test.c - Test clear_cache -----------------------------===// // Index: compiler-rt/test/builtins/Unit/enable_execute_stack_test.c =================================================================== --- compiler-rt/test/builtins/Unit/enable_execute_stack_test.c +++ compiler-rt/test/builtins/Unit/enable_execute_stack_test.c @@ -1,5 +1,5 @@ // REQUIRES: native-run -// RUN: %clang_builtins %s %librt -o %t && %run %t +// RUN: %clang_builtins %s %librt -o %t && %paxctl_nomprotect %t && %run %t // REQUIRES: librt_has_enable_execute_stack //===-- enable_execute_stack_test.c - Test __enable_execute_stack ----------===// // Index: compiler-rt/test/lit.common.cfg.py =================================================================== --- compiler-rt/test/lit.common.cfg.py +++ compiler-rt/test/lit.common.cfg.py @@ -504,3 +504,6 @@ "test", "sanitizer_common", "netbsd_commands") config.netbsd_noaslr_prefix = ('sh ' + os.path.join(nb_commands_dir, 'run_noaslr.sh')) + config.substitutions.append( ('%paxctl_nomprotect', '/usr/sbin/paxctl +m') ) +else: + config.substitutions.append( ('%paxctl_nomprotect', ':') )