mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	build fix for mxe
This commit is contained in:
		
							parent
							
								
									9474928672
								
							
						
					
					
						commit
						9fb715dc74
					
				
					 1 changed files with 9 additions and 8 deletions
				
			
		|  | @ -409,21 +409,22 @@ int main(int argc, char **argv) | ||||||
| #ifdef YOSYS_ENABLE_COVER | #ifdef YOSYS_ENABLE_COVER | ||||||
| 	if (getenv("YOSYS_COVER_DIR") || getenv("YOSYS_COVER_FILE")) | 	if (getenv("YOSYS_COVER_DIR") || getenv("YOSYS_COVER_FILE")) | ||||||
| 	{ | 	{ | ||||||
| 		char filename_buffer[4096]; | 		string filename; | ||||||
| 		FILE *f; | 		FILE *f; | ||||||
| 
 | 
 | ||||||
| 		if (getenv("YOSYS_COVER_DIR")) { | 		if (getenv("YOSYS_COVER_DIR")) { | ||||||
| 			snprintf(filename_buffer, 4096, "%s/yosys_cover_%d_XXXXXX.txt", getenv("YOSYS_COVER_DIR"), getpid()); | 			filename = stringf("%s/yosys_cover_%d_XXXXXX.txt", getenv("YOSYS_COVER_DIR"), getpid()); | ||||||
| 			f = fdopen(mkstemps(filename_buffer, 4), "w"); | 			filename = make_temp_file(filename); | ||||||
| 		} else { | 		} else { | ||||||
| 			snprintf(filename_buffer, 4096, "%s", getenv("YOSYS_COVER_FILE")); | 			filename = getenv("YOSYS_COVER_FILE"); | ||||||
| 			f = fopen(filename_buffer, "a+"); |  | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		if (f == NULL) | 		f = fopen(filename.c_str(), "a+"); | ||||||
| 			log_error("Can't create coverage file `%s'.\n", filename_buffer); |  | ||||||
| 
 | 
 | ||||||
| 		log("<writing coverage file \"%s\">\n", filename_buffer); | 		if (f == NULL) | ||||||
|  | 			log_error("Can't create coverage file `%s'.\n", filename.c_str()); | ||||||
|  | 
 | ||||||
|  | 		log("<writing coverage file \"%s\">\n", filename.c_str()); | ||||||
| 
 | 
 | ||||||
| 		for (auto &it : get_coverage_data()) | 		for (auto &it : get_coverage_data()) | ||||||
| 			fprintf(f, "%-60s %10d %s\n", it.second.first.c_str(), it.second.second, it.first.c_str()); | 			fprintf(f, "%-60s %10d %s\n", it.second.first.c_str(), it.second.second, it.first.c_str()); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue