mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:22:45 +00:00 
			
		
		
		
	 82f86e35d6
			
		
	
	
		82f86e35d6
		
	
	
	
	
		
			
			This new flag controls two things: - Whether the kernel will generate core dumps for the process - Whether the EUID:EGID should own the process's files in /proc Processes are automatically made non-dumpable when their EUID or EGID is changed, either via syscalls that specifically modify those ID's, or via sys$execve(), when a set-uid or set-gid program is executed. A process can change its own dumpable flag at any time by calling the new sys$prctl(PR_SET_DUMPABLE) syscall. Fixes #4504.
		
			
				
	
	
		
			82 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			82 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
| set(LIBC_SOURCES
 | |
|     arpa/inet.cpp
 | |
|     assert.cpp
 | |
|     ctype.cpp
 | |
|     cxxabi.cpp
 | |
|     dirent.cpp
 | |
|     dlfcn.cpp
 | |
|     fcntl.cpp
 | |
|     getopt.cpp
 | |
|     grp.cpp
 | |
|     ioctl.cpp
 | |
|     libcinit.cpp
 | |
|     libgen.cpp
 | |
|     locale.cpp
 | |
|     malloc.cpp
 | |
|     mman.cpp
 | |
|     mntent.cpp
 | |
|     netdb.cpp
 | |
|     poll.cpp
 | |
|     pwd.cpp
 | |
|     qsort.cpp
 | |
|     scanf.cpp
 | |
|     sched.cpp
 | |
|     serenity.cpp
 | |
|     setjmp.S
 | |
|     signal.cpp
 | |
|     spawn.cpp
 | |
|     stat.cpp
 | |
|     stdio.cpp
 | |
|     stdlib.cpp
 | |
|     string.cpp
 | |
|     strings.cpp
 | |
|     syslog.cpp
 | |
|     sys/prctl.cpp
 | |
|     sys/ptrace.cpp
 | |
|     sys/select.cpp
 | |
|     sys/socket.cpp
 | |
|     sys/uio.cpp
 | |
|     sys/wait.cpp
 | |
|     termcap.cpp
 | |
|     termios.cpp
 | |
|     time.cpp
 | |
|     times.cpp
 | |
|     ulimit.cpp
 | |
|     unistd.cpp
 | |
|     utime.cpp
 | |
|     utsname.cpp
 | |
|     wchar.cpp
 | |
| )
 | |
| 
 | |
| file(GLOB AK_SOURCES CONFIGURE_DEPENDS "../../AK/*.cpp")
 | |
| file(GLOB ELF_SOURCES CONFIGURE_DEPENDS "../LibELF/*.cpp")
 | |
| set(ELF_SOURCES ${ELF_SOURCES} ../LibELF/Arch/i386/plt_trampoline.S)
 | |
| 
 | |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option -DSERENITY_LIBC_BUILD")
 | |
| 
 | |
| find_program(INSTALL_COMMAND ginstall)
 | |
| if(NOT INSTALL_COMMAND)
 | |
|     set(INSTALL_COMMAND install)
 | |
| endif()
 | |
| 
 | |
| add_library(crt0 STATIC crt0.cpp)
 | |
| add_custom_command(
 | |
|     TARGET crt0
 | |
|     COMMAND ${INSTALL_COMMAND} -D $<TARGET_OBJECTS:crt0> ${CMAKE_INSTALL_PREFIX}/usr/lib/crt0.o
 | |
| )
 | |
| add_library(crt0_shared STATIC crt0_shared.cpp)
 | |
| add_custom_command(
 | |
|     TARGET crt0_shared
 | |
|     COMMAND ${INSTALL_COMMAND} -D $<TARGET_OBJECTS:crt0_shared> ${CMAKE_INSTALL_PREFIX}/usr/lib/crt0_shared.o
 | |
| )
 | |
| 
 | |
| set(SOURCES ${LIBC_SOURCES} ${AK_SOURCES} ${ELF_SOURCES})
 | |
| 
 | |
| serenity_libc_static(LibCStatic c)
 | |
| target_link_libraries(LibCStatic crt0)
 | |
| add_dependencies(LibCStatic LibM)
 | |
| 
 | |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
 | |
| serenity_libc(LibC c)
 | |
| target_link_libraries(LibC crt0)
 | |
| add_dependencies(LibC LibM)
 |