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:
Alex Smith
2012-08-16 13:57:04 +01:00
parent 294818c5fd
commit c864ba1a2d
10 changed files with 44 additions and 11 deletions
+4
View File
@@ -1035,6 +1035,8 @@ if $(TARGET_PLATFORM) = haiku {
TARGET_GCC_LIBGCC = $(HAIKU_GCC_LIBGCC) ;
TARGET_GCC_LIBGCC_OBJECTS = $(HAIKU_GCC_LIBGCC_OBJECTS) ;
TARGET_KERNEL_LIBGCC = $(HAIKU_KERNEL_LIBGCC) ;
TARGET_KERNEL_LIBSUPC++ = $(HAIKU_KERNEL_LIBSUPC++) ;
TARGET_BOOT_LIBGCC = $(HAIKU_BOOT_LIBGCC) ;
TARGET_BOOT_LIBSUPC++ = $(HAIKU_BOOT_LIBSUPC++) ;
@@ -1054,6 +1056,8 @@ if $(TARGET_PLATFORM) = haiku {
TARGET_GCC_LIBGCC = ;
TARGET_GCC_LIBGCC_OBJECTS = ;
TARGET_KERNEL_LIBGCC = ;
TARGET_KERNEL_LIBSUPC++ = ;
TARGET_BOOT_LIBGCC = ;
TARGET_BOOT_LIBSUPC++ = ;