mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Link librt when compiling with --staticbin on Linux
Fixes issue #2457. The workaround is described here: https://stackoverflow.com/questions/58848694/gcc-whole-archive-recipe-for-static-linking-to-pthread-stopped-working-in-rec
This commit is contained in:
		
							parent
							
								
									d14b083bc9
								
							
						
					
					
						commit
						8ebbc094eb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -2632,7 +2632,7 @@ def mk_config():
 | 
			
		|||
        config.write('LINK_FLAGS=\n')
 | 
			
		||||
        config.write('LINK_OUT_FLAG=-o \n')
 | 
			
		||||
        if is_linux() and (build_static_lib() or build_static_bin()):
 | 
			
		||||
            config.write('LINK_EXTRA_FLAGS=-Wl,--whole-archive -lpthread -Wl,--no-whole-archive %s\n' % LDFLAGS)
 | 
			
		||||
            config.write('LINK_EXTRA_FLAGS=-Wl,--whole-archive -lrt -lpthread -Wl,--no-whole-archive %s\n' % LDFLAGS)
 | 
			
		||||
        else:
 | 
			
		||||
            config.write('LINK_EXTRA_FLAGS=-lpthread %s\n' % LDFLAGS)
 | 
			
		||||
        config.write('SO_EXT=%s\n' % SO_EXT)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue