diff options
author | Mohamed A. Bamakhrama <mohamed@alumni.tum.de> | 2022-05-23 22:21:45 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2022-05-27 15:06:53 +0200 |
commit | 1822be8792865e3f6f0765693f93b8e85fcb279f (patch) | |
tree | caea45b0b5de568251eeb3b71e6a7db149a5b9eb /passes/techmap/abc9.cc | |
parent | f9b6fe521dd9b7064ad7e576ffe779329f447e4f (diff) | |
download | yosys-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/techmap/abc9.cc')
-rw-r--r-- | passes/techmap/abc9.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc index fe0802d70..79c994b11 100644 --- a/passes/techmap/abc9.cc +++ b/passes/techmap/abc9.cc @@ -404,7 +404,7 @@ struct Abc9Pass : public ScriptPass if (!active_design->selected_whole_module(mod)) log_error("Can't handle partially selected module %s!\n", log_id(mod)); - std::string tempdir_name = "/tmp/" + proc_program_prefix() + "yosys-abc-XXXXXX"; + std::string tempdir_name = get_base_tmpdir() + "/" + proc_program_prefix() + "yosys-abc-XXXXXX"; if (!cleanup) tempdir_name[0] = tempdir_name[4] = '_'; tempdir_name = make_temp_dir(tempdir_name); |