1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:17:35 +00:00

LibC: Run constructors on process startup.

Cooperate with the compiler to generate and execute the _init_array list
of constructor functions on userspace program statup. This took two days
to get working, my goodness. :^)
This commit is contained in:
Andreas Kling 2019-03-27 12:48:21 +01:00
parent f1a2cb0882
commit 23bb276fcd
22 changed files with 101 additions and 61 deletions

View file

@ -86,7 +86,7 @@ APPS = \
ARCH_FLAGS =
STANDARD_FLAGS = -std=c++17
WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough
FLAVOR_FLAGS = -fno-exceptions -fno-rtti
FLAVOR_FLAGS = -fno-exceptions -fno-rtti -fno-sized-deallocation
OPTIMIZATION_FLAGS = -Os
INCLUDE_FLAGS = -I.. -I. -I../LibC
@ -94,7 +94,7 @@ DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
CXX = i686-pc-serenity-g++
LD = i686-pc-serenity-ld
LD = i686-pc-serenity-g++
AR = i686-pc-serenity-r
LDFLAGS = -L ../LibC