2022-09-16 21:21:19 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2022-05-17 09:52:17 +04:30
|
|
|
From: Daniel Bertalan <dani@danielbertalan.dev>
|
|
|
|
Date: Mon, 16 May 2022 15:04:33 +0200
|
2022-09-16 21:21:19 +02:00
|
|
|
Subject: [PATCH] i386: Disable math errno for SerenityOS
|
2022-05-17 09:52:17 +04:30
|
|
|
|
|
|
|
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
|
2023-08-01 17:14:43 +02:00
|
|
|
index c72644cb7db37b18cb22cf1ff02a972a18509d01..cce666b274cd6129796efc81870428dc17a6f229 100644
|
2022-05-17 09:52:17 +04:30
|
|
|
--- a/gcc/common/config/i386/i386-common.cc
|
|
|
|
+++ b/gcc/common/config/i386/i386-common.cc
|
2023-05-03 20:48:54 +02:00
|
|
|
@@ -1854,6 +1854,10 @@ ix86_option_init_struct (struct gcc_options *opts)
|
2022-05-17 09:52:17 +04:30
|
|
|
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;
|
|
|
|
}
|