if not config.parallelism_group:
config.parallelism_group = 'shadow-memory'
+
+if config.host_os == 'NetBSD':
+ config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix))
config.clang = " " + " ".join(run_wrapper + [config.compile_wrapper, config.clang]) + " "
config.target_cflags = " " + " ".join(target_cflags + extra_cflags) + " "
+
+if config.host_os == 'NetBSD':
+ nb_commands_dir = os.path.join(config.compiler_rt_src_root,
+ "test", "sanitizer_common", "netbsd_commands")
+ config.netbsd_noaslr_prefix = ('sh ' +
+ os.path.join(nb_commands_dir, 'run_noaslr.sh'))
config.substitutions.append( ('CHECK-%short-stack', 'CHECK-SHORT-STACK'))
else:
config.substitutions.append( ('CHECK-%short-stack', 'CHECK-FULL-STACK'))
+
+if config.host_os == 'NetBSD':
+ config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix))
if not config.parallelism_group:
config.parallelism_group = 'shadow-memory'
+
+if config.host_os == 'NetBSD':
+ config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix))
--- /dev/null
+#!/bin/sh
+/usr/sbin/paxctl +a "${1}"
+exec "${@}"
if not config.parallelism_group:
config.parallelism_group = 'shadow-memory'
+
+if config.host_os == 'NetBSD':
+ config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix))