summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2020-04-10 19:52:24 -0700
committerAndreas Kling <kling@serenityos.org>2020-04-11 10:03:19 +0200
commit7cc7d303e32fea3d86bd57ed19dc59fdfa20ade1 (patch)
treef94fdae90b43077c218f0c36d51f1ea54ec2842b
parent54fc972a72f1b6a36c0ad4fb7c812a7f929cefbe (diff)
downloadserenity-7cc7d303e32fea3d86bd57ed19dc59fdfa20ade1.zip
Kernel: Add $SERENITY_KERNEL_CUSTOM_{CXXFLAGS/LDFLAGS} for build customization
I normally want to build with debug symbols for the kernel so I can use a debugger. Add a hook to allow me to do so, but to impact no-one else.
-rw-r--r--Kernel/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Makefile b/Kernel/Makefile
index 806dcbe2c3..c38060f6ee 100644
--- a/Kernel/Makefile
+++ b/Kernel/Makefile
@@ -140,11 +140,11 @@ KERNEL = 1
PROGRAM = kernel
SUBPROJECT_CXXFLAGS += -pie -fPIE -ffreestanding -fbuiltin -mno-80387 -mno-mmx -mno-sse -mno-sse2 -fno-asynchronous-unwind-tables
-SUBPROJECT_CXXFLAGS += -nostdlib -nostdinc -nostdinc++
+SUBPROJECT_CXXFLAGS += -nostdlib -nostdinc -nostdinc++ $(SERENITY_KERNEL_CUSTOM_CXXFLAGS)
SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.3.0/
SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.3.0/i686-pc-serenity/
-LDFLAGS += -Wl,-T linker.ld -nostdlib -lgcc -lstdc++
+LDFLAGS += -Wl,-T linker.ld -nostdlib -lgcc -lstdc++ $(SERENITY_KERNEL_CUSTOM_LDFLAGS)
all: $(PROGRAM) $(MODULE_OBJS) kernel.map