mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:52:45 +00:00 
			
		
		
		
	 88cebb05ad
			
		
	
	
		88cebb05ad
		
	
	
	
	
		
			
			GCC will insert various calls to pthread functions when compiling C++ code with static initializers, even when the user doesn't link their program against libpthread explicitly. This is used to make static initializers thread-safe, e.g. when building a library that does not itself use thread functionality and thus does not link against libpthread - but is intended to be used with other code that does use libpthread explicitly. This makes these symbols available in libc.
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			243 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
	
		
			243 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| set(SOURCES
 | |
|     forward.cpp
 | |
|     pthread.cpp
 | |
|     pthread_once.cpp
 | |
|     semaphore.cpp
 | |
| )
 | |
| 
 | |
| serenity_libc(LibPthread pthread)
 | |
| target_link_libraries(LibPthread LibC LibSystem)
 | |
| target_include_directories(LibPthread PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
 |