mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:47:46 +00:00
Toolchain+Ports: Split the GCC patches
This shouldn't cause any breaking changes, so a toolchain rebuild is not required. As per Hendiadyoin's request, math errno is disabled by default, which should enable some extra compiler optimizations in LibGL and LibSoftGPU code that uses math functions heavily. Co-Authored-By: Ali Mohammad Pur <mpfard@serenityos.org>
This commit is contained in:
parent
83aa5dcbf6
commit
d0edf2627c
15 changed files with 538 additions and 347 deletions
|
@ -0,0 +1,30 @@
|
|||
From 7cb91a236863aa5c582d25a920ffbb7408c10e2f Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Bertalan <dani@danielbertalan.dev>
|
||||
Date: Mon, 16 May 2022 15:04:33 +0200
|
||||
Subject: [PATCH 5/6] i386: Disable math errno for SerenityOS
|
||||
|
||||
SerenityOS uses exceptions for math error handling, which allows the
|
||||
compiler to do more optimizations on calls to math functions. This patch
|
||||
has the effect of setting -fno-math-errno by default.
|
||||
---
|
||||
gcc/common/config/i386/i386-common.cc | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gcc/common/config/i386/i386-common.cc b/gcc/common/config/i386/i386-common.cc
|
||||
index 07fdd045f..6e2419563 100644
|
||||
--- a/gcc/common/config/i386/i386-common.cc
|
||||
+++ b/gcc/common/config/i386/i386-common.cc
|
||||
@@ -1707,6 +1707,10 @@ ix86_option_init_struct (struct gcc_options *opts)
|
||||
avoid calling them when that's the only reason we would. */
|
||||
opts->x_flag_errno_math = 0;
|
||||
|
||||
+#ifdef TARGET_SERENITY
|
||||
+ opts->x_flag_errno_math = 0;
|
||||
+#endif
|
||||
+
|
||||
opts->x_flag_pcc_struct_return = 2;
|
||||
opts->x_flag_asynchronous_unwind_tables = 2;
|
||||
}
|
||||
--
|
||||
2.36.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue