summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ports/tinycc/patches/0001-Disable-backtrace-on-serenity.patch25
-rw-r--r--Ports/tinycc/patches/0002-Manually-set-the-target-os-instead-of-using-uname.patch25
-rw-r--r--Ports/tinycc/patches/ReadMe.md12
-rw-r--r--Ports/tinycc/patches/disable-backtrace.patch11
-rw-r--r--Ports/tinycc/patches/targetos.patch11
5 files changed, 62 insertions, 22 deletions
diff --git a/Ports/tinycc/patches/0001-Disable-backtrace-on-serenity.patch b/Ports/tinycc/patches/0001-Disable-backtrace-on-serenity.patch
new file mode 100644
index 0000000000..1e0c511aec
--- /dev/null
+++ b/Ports/tinycc/patches/0001-Disable-backtrace-on-serenity.patch
@@ -0,0 +1,25 @@
+From efa276eb16b2857f2fb2c8bc372debf0b14574d9 Mon Sep 17 00:00:00 2001
+From: Sergey Bugaev <bugaevc@gmail.com>
+Date: Wed, 2 Oct 2019 22:50:20 +0300
+Subject: [PATCH 1/2] Disable backtrace on serenity
+
+---
+ tcc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tcc.h b/tcc.h
+index ccb3b60..efc54be 100644
+--- a/tcc.h
++++ b/tcc.h
+@@ -184,7 +184,7 @@ extern long double strtold (const char *__nptr, char **__endptr);
+ # endif
+ #endif
+
+-#if defined TCC_IS_NATIVE && !defined CONFIG_TCCBOOT
++#if defined TCC_IS_NATIVE && !defined CONFIG_TCCBOOT && !define __serenity__
+ # define CONFIG_TCC_BACKTRACE
+ # if (defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64 || \
+ defined TCC_TARGET_ARM || defined TCC_TARGET_ARM64 || \
+--
+2.36.1
+
diff --git a/Ports/tinycc/patches/0002-Manually-set-the-target-os-instead-of-using-uname.patch b/Ports/tinycc/patches/0002-Manually-set-the-target-os-instead-of-using-uname.patch
new file mode 100644
index 0000000000..5d7ac4fdab
--- /dev/null
+++ b/Ports/tinycc/patches/0002-Manually-set-the-target-os-instead-of-using-uname.patch
@@ -0,0 +1,25 @@
+From 45136fa3e435eaad300fd8866879e4ef817f885b Mon Sep 17 00:00:00 2001
+From: Sergey Bugaev <bugaevc@gmail.com>
+Date: Wed, 2 Oct 2019 22:50:20 +0300
+Subject: [PATCH 2/2] Manually set the target os instead of using uname
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 5673d17..9bd864f 100755
+--- a/configure
++++ b/configure
+@@ -52,7 +52,7 @@ cc_name="gcc"
+ ar_set=
+
+ # OS specific
+-targetos=`uname`
++targetos=Serenity
+ case $targetos in
+ Darwin)
+ confvars="$confvars OSX"
+--
+2.36.1
+
diff --git a/Ports/tinycc/patches/ReadMe.md b/Ports/tinycc/patches/ReadMe.md
new file mode 100644
index 0000000000..7fb308917d
--- /dev/null
+++ b/Ports/tinycc/patches/ReadMe.md
@@ -0,0 +1,12 @@
+# Patches for tinycc on SerenityOS
+
+## `0001-Disable-backtrace-on-serenity.patch`
+
+Disable backtrace on serenity
+
+
+## `0002-Manually-set-the-target-os-instead-of-using-uname.patch`
+
+Manually set the target os instead of using uname
+
+
diff --git a/Ports/tinycc/patches/disable-backtrace.patch b/Ports/tinycc/patches/disable-backtrace.patch
deleted file mode 100644
index 13a46fa373..0000000000
--- a/Ports/tinycc/patches/disable-backtrace.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- tinycc-dev/tcc.h 2019-05-14 22:40:39.000000000 +0300
-+++ tinycc-dev-serenity/tcc.h 2019-10-02 13:37:16.919990212 +0300
-@@ -162,7 +162,7 @@
- # endif
- #endif
-
--#if defined TCC_IS_NATIVE && !defined CONFIG_TCCBOOT
-+#if defined TCC_IS_NATIVE && !defined CONFIG_TCCBOOT && !defined __serenity__
- # define CONFIG_TCC_BACKTRACE
- # if (defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64) \
- && !defined TCC_UCLIBC && !defined TCC_MUSL
diff --git a/Ports/tinycc/patches/targetos.patch b/Ports/tinycc/patches/targetos.patch
deleted file mode 100644
index 82840548db..0000000000
--- a/Ports/tinycc/patches/targetos.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- tinycc-dev/configure 2019-05-14 22:40:39.000000000 +0300
-+++ tinycc-dev-serenity/configure 2019-10-02 13:31:15.464543005 +0300
-@@ -49,7 +49,7 @@
- gcc_minor=0
-
- # OS specific
--targetos=`uname`
-+targetos=Serenity
- case $targetos in
- Darwin)
- confvars="$confvars OSX"