mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Embed DATDIR make variable value into yosys binary.
Use it as the last resort in the share/ directory location search.
This commit is contained in:
		
							parent
							
								
									a922d705d4
								
							
						
					
					
						commit
						963c0d2525
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		
							
								
								
									
										1
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -281,6 +281,7 @@ $(eval $(call add_include_file,backends/ilang/ilang_backend.h)) | ||||||
| 
 | 
 | ||||||
| OBJS += kernel/driver.o kernel/register.o kernel/rtlil.o kernel/log.o kernel/calc.o kernel/yosys.o kernel/cellaigs.o | OBJS += kernel/driver.o kernel/register.o kernel/rtlil.o kernel/log.o kernel/calc.o kernel/yosys.o kernel/cellaigs.o | ||||||
| kernel/log.o: CXXFLAGS += -DYOSYS_SRC='"$(YOSYS_SRC)"' | kernel/log.o: CXXFLAGS += -DYOSYS_SRC='"$(YOSYS_SRC)"' | ||||||
|  | kernel/yosys.o: CXXFLAGS += -DYOSYS_DATDIR='"$(DATDIR)"' | ||||||
| 
 | 
 | ||||||
| OBJS += libs/bigint/BigIntegerAlgorithms.o libs/bigint/BigInteger.o libs/bigint/BigIntegerUtils.o | OBJS += libs/bigint/BigIntegerAlgorithms.o libs/bigint/BigInteger.o libs/bigint/BigIntegerUtils.o | ||||||
| OBJS += libs/bigint/BigUnsigned.o libs/bigint/BigUnsignedInABase.o | OBJS += libs/bigint/BigUnsigned.o libs/bigint/BigUnsignedInABase.o | ||||||
|  |  | ||||||
|  | @ -701,6 +701,11 @@ std::string proc_share_dirname() | ||||||
| 	proc_share_path = proc_self_path + "../share/yosys/"; | 	proc_share_path = proc_self_path + "../share/yosys/"; | ||||||
| 	if (check_file_exists(proc_share_path, true)) | 	if (check_file_exists(proc_share_path, true)) | ||||||
| 		return proc_share_path; | 		return proc_share_path; | ||||||
|  | #    ifdef YOSYS_DATDIR | ||||||
|  | 	proc_share_path = YOSYS_DATDIR "/"; | ||||||
|  | 	if (check_file_exists(proc_share_path, true)) | ||||||
|  | 		return proc_share_path; | ||||||
|  | #    endif | ||||||
| #  endif | #  endif | ||||||
| 	log_error("proc_share_dirname: unable to determine share/ directory!\n"); | 	log_error("proc_share_dirname: unable to determine share/ directory!\n"); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue