mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									f9b6fe521d
								
							
						
					
					
						commit
						1822be8792
					
				
					 6 changed files with 37 additions and 7 deletions
				
			
		|  | @ -780,7 +780,7 @@ void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std::strin | |||
| 	if (dff_mode && clk_sig.empty()) | ||||
| 		log_cmd_error("Clock domain %s not found.\n", clk_str.c_str()); | ||||
| 
 | ||||
| 	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); | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue