aboutsummaryrefslogtreecommitdiffstats
path: root/passes/sat/qbfsat.cc
diff options
context:
space:
mode:
authorMohamed A. Bamakhrama <mohamed@alumni.tum.de>2022-05-23 22:21:45 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2022-05-27 15:06:53 +0200
commit1822be8792865e3f6f0765693f93b8e85fcb279f (patch)
treecaea45b0b5de568251eeb3b71e6a7db149a5b9eb /passes/sat/qbfsat.cc
parentf9b6fe521dd9b7064ad7e576ffe779329f447e4f (diff)
downloadyosys-1822be8792865e3f6f0765693f93b8e85fcb279f.tar.gz
yosys-1822be8792865e3f6f0765693f93b8e85fcb279f.tar.bz2
yosys-1822be8792865e3f6f0765693f93b8e85fcb279f.zip
Observe $TMPDIR variable when creating tmp files
POSIX defines $TMPDIR as containing the pathname of the directory where programs can create temporary files. On most systems, this variable points to "/tmp". However, on some systems it can point to a different location. Without respecting this variable, yosys fails to run on such systems. Signed-off-by: Mohamed A. Bamakhrama <mohamed@alumni.tum.de>
Diffstat (limited to 'passes/sat/qbfsat.cc')
-rw-r--r--passes/sat/qbfsat.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/passes/sat/qbfsat.cc b/passes/sat/qbfsat.cc
index 6db7d4b64..864d6f05d 100644
--- a/passes/sat/qbfsat.cc
+++ b/passes/sat/qbfsat.cc
@@ -251,7 +251,7 @@ QbfSolutionType call_qbf_solver(RTLIL::Module *mod, const QbfSolveOptions &opt,
QbfSolutionType qbf_solve(RTLIL::Module *mod, const QbfSolveOptions &opt) {
QbfSolutionType ret, best_soln;
- const std::string tempdir_name = make_temp_dir("/tmp/yosys-qbfsat-XXXXXX");
+ const std::string tempdir_name = make_temp_dir(get_base_tmpdir() + "/yosys-qbfsat-XXXXXX");
RTLIL::Module *module = mod;
RTLIL::Design *design = module->design;
std::string module_name = module->name.str();