Build a separate libsupc++ for the kernel with correct flags.
Kernel mode code on x86_64 needs to be built with -mno-red-zone as interrupts would corrupt the red zone if it were in use. However, the kernel is linked with libsupc++, which was not compiled with -mno-red-zone. If an interrupt occurred in libsupc++ code the red zone would get corrupted. This was causing random panics, particularly under heavy system load. Therefore, on x86_64 a separate build of libsupc++ with -mno-red-zone is now done for the kernel to use. Note: this commit will require a rerun of configure and rebuild of cross tools.
This commit is contained in:
@@ -48,9 +48,9 @@ rule KernelLd
|
||||
# libsupc++ is opt-out.
|
||||
local libs ;
|
||||
if ! [ on $(1) return HAIKU_NO_LIBSUPC++ ] {
|
||||
libs += $(TARGET_STATIC_LIBSUPC++) ;
|
||||
libs += $(TARGET_KERNEL_LIBSUPC++) ;
|
||||
}
|
||||
LINKLIBS on $(1) = $(libs) $(TARGET_GCC_LIBGCC) ;
|
||||
LINKLIBS on $(1) = $(libs) $(TARGET_KERNEL_LIBGCC) ;
|
||||
|
||||
# TODO: Do we really want to invoke SetupKernel here? The objects should
|
||||
# have been compiled with KernelObjects anyway, so we're doing that twice.
|
||||
|
||||
Reference in New Issue
Block a user