Gitweb links:
...log
http://git.netsurf-browser.org/toolchains.git/shortlog/1853c8c1efc7fd269c853793e79b092160fe4bdd
...commit
http://git.netsurf-browser.org/toolchains.git/commit/1853c8c1efc7fd269c853793e79b092160fe4bdd
...tree
http://git.netsurf-browser.org/toolchains.git/tree/1853c8c1efc7fd269c853793e79b092160fe4bdd
The branch, jmb/arm-riscos-gnueabihf has been updated
via 1853c8c1efc7fd269c853793e79b092160fe4bdd (commit)
via f5e946d3a4215693381acee1da1ecfc56b2942bc (commit)
from 7f53178a4cdbed363328a5fa60bead742bd628aa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/toolchains.git/commit/?id=1853c8c1efc7fd269c853793e79b092160fe4bdd
commit 1853c8c1efc7fd269c853793e79b092160fe4bdd
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
Use UnixLib's atomics implementation
Stop libgcc pulling in the atomics implementation for Linux. This
does not work on RISC OS and will result in unexpected aborts
deep in application code.
Additionally, enable the __sync_fetch_and_<op>_<size> atomics
when building UnixLib for EABI. It's not clear why these were
disabled, but things that need them will fail to link if they
are not present.
diff --git
a/arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-libgcc-no-linux-atomics.p
b/arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-libgcc-no-linux-atomics.p
new file mode 100644
index 0000000..12a88ac
--- /dev/null
+++ b/arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-libgcc-no-linux-atomics.p
@@ -0,0 +1,56 @@
+Index: gcc/libgcc.config.arm.t-riscos-gnueabihf
+===================================================================
+--- gcc/libgcc.config.arm.t-riscos-gnueabihf (revision 7698)
++++ gcc/libgcc.config.arm.t-riscos-gnueabihf (working copy)
+@@ -1,36 +1,2 @@
+-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+-# Contributed by John Tytgat ([email protected]).
+-#
+-# This file is part of GCC.
+-#
+-# GCC is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 3, or (at your option)
+-# any later version.
+-#
+-# GCC is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with GCC; see the file COPYING3. If not see
+-# <http://www.gnu.org/licenses/>.
+-
+-# vvv Part of config/arm/t-bpabi
+-LIB2ADD_ST += $(srcdir)/config/arm/fp16.c
+-
+-LIB2ADDEH = $(srcdir)/config/arm/unwind-arm.c \
+- $(srcdir)/config/arm/libunwind.S \
+- $(srcdir)/config/arm/pr-support.c $(srcdir)/unwind-c.c
+-# ^^^
+-
+-ifeq (,$(findstring mlibscl,$(CFLAGS))$(findstring mmodule,$(CFLAGS)))
+-# For shared libgcc building:
+-EXTRA_PARTS += crtbeginS.o crtendS.o
+-gcc_s_compile += -fPIC
+-SHLIB_LDFLAGS=-fPIC
+-include $(srcdir)/config/t-slibgcc
+-include $(srcdir)/config/t-slibgcc-nolc-override
+-endif
+-
++# Use a version of div0 which raises SIGFPE, and a special __clear_cache.
++LIB1ASMFUNCS := $(filter-out _dvmd_tls,$(LIB1ASMFUNCS)) _dvmd_lnx _clear_cache
+Index: gcc/libgcc.config.host.p
+===================================================================
+--- gcc/libgcc.config.host.p (revision 7698)
++++ gcc/libgcc.config.host.p (working copy)
+@@ -20,7 +20,7 @@
+ ;;
+ +arm*-riscos-gnueabihf)
+ + tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm"
+-+ tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi
t-slibgcc-libgcc t-slibgcc-nolc-override"
+++ tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-riscos-gnueabihf
t-slibgcc-libgcc t-slibgcc-nolc-override"
+ + tm_file="$tm_file arm/bpabi-lib.h"
+ + unwind_header=config/arm/unwind-arm.h
+ + tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp
t-softfp"
diff --git
a/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-sync-and-fetch-atomics.p
b/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-sync-and-fetch-atomics.p
new file mode 100644
index 0000000..f9764ba
--- /dev/null
+++
b/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-sync-and-fetch-atomics.p
@@ -0,0 +1,22 @@
+Index: libunixlib/gcccompat/atomics.c
+===================================================================
+--- libunixlib/gcccompat/atomics.c (revision 7698)
++++ libunixlib/gcccompat/atomics.c (working copy)
+@@ -146,8 +146,6 @@
+ ATOMIC_COMPARE_AND_EXCHANGE(4,uint32_t)
+ ATOMIC_COMPARE_AND_EXCHANGE(8,uint64_t)
+
+-#ifndef __ARM_EABI__
+-
+ /* These built-in functions perform the operation suggested by the name,
+ * and return the value that had previously been in *ptr. That is,
+ *
+@@ -200,8 +198,6 @@
+ SYNC_FETCH_AND_OP(xor,^,8,long long)
+ SYNC_FETCH_AND_OP(and,&,8,long long)
+
+-#endif
+-
+ /* These built-in functions perform the operation suggested by the name,
+ * and return the new value. That is,
+ *
commitdiff
http://git.netsurf-browser.org/toolchains.git/commit/?id=f5e946d3a4215693381acee1da1ecfc56b2942bc
commit f5e946d3a4215693381acee1da1ecfc56b2942bc
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>
Revert "Fix stack backtraces from UnixLib"
This reverts commit 7f53178a4cdbed363328a5fa60bead742bd628aa.
It turns out that the situation with stack frames in the EABI
toolchain is currently completely inconsistent. Some functions
end up with APCS-32 stack frames, others with AAPCS frames. It
is not reliably possible to distinguish which is which when
unwinding the stack to generate a backtrace. It also means that
the signal stack frame created in _signal.s would need to reflect
whatever reality made sense for the function that aborted.
Give up.
diff --git a/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-backtrace.p
b/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-backtrace.p
deleted file mode 100644
index 2c971cd..0000000
--- a/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-backtrace.p
+++ /dev/null
@@ -1,37 +0,0 @@
---- libunixlib/signal/post.c 2021-06-15 21:42:03.000000000 +0100
-+++ libunixlib/signal/post.c 2022-06-03 19:52:18.316234729 +0100
-@@ -307,6 +307,7 @@
- }
-
- #ifdef __ARM_EABI__
-+ const unsigned int *pc = NULL;
- const unsigned int * const lr = (unsigned int *)fp[LR_OFFSET];
- fprintf (stderr, " (%8x) lr: %8x",
- (unsigned int)fp, (unsigned int)lr);
-@@ -350,7 +351,6 @@
- #endif
- oldfp = fp;
- fp = (const unsigned int *)fp[FP_OFFSET];
--#ifndef __ARM_EABI__
- if (__ul_callbackfp != NULL && fp == __ul_callbackfp)
- {
- /* At &oldfp[1] = cpsr, a1-a4, v1-v6, sl, fp, ip, sp, lr, pc */
-@@ -424,7 +424,6 @@
-
- fputs ("\n\n", stderr);
- }
--#endif
- }
-
- fputc ('\n', stderr);
---- libunixlib/signal/_signal.s 2020-05-31 20:11:06.000000000 +0100
-+++ libunixlib/signal/_signal.s 2022-06-03 19:45:32.872892834 +0100
-@@ -761,7 +761,7 @@
- LDR a3, [sp, #14*4 + 4] @ saved USR lr
- LDR a1, [sp, #11*4 + 4] @ saved USR fp
- STMFD sp!, {a1, a3} @ create signal frame
-- MOV fp, sp @ FIXME: check this with compiler
output for similar function
-+ ADD fp, sp, #4 @ FIXME: check this with compiler
output for similar function
- #else
- @ Create an APCS-32 compilant signal stack frame
- ADR a4, __h_cback + 4*3 @ point at handler name for backtrace
-----------------------------------------------------------------------
Summary of changes:
.../patches/gccsdk/gcc-libgcc-no-linux-atomics.p | 56 ++++++++++++++++++++
.../recipes/patches/gccsdk/unixlib-backtrace.p | 37 -------------
.../gccsdk/unixlib-sync-and-fetch-atomics.p | 22 ++++++++
3 files changed, 78 insertions(+), 37 deletions(-)
create mode 100644
arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-libgcc-no-linux-atomics.p
delete mode 100644
arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-backtrace.p
create mode 100644
arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-sync-and-fetch-atomics.p
diff --git
a/arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-libgcc-no-linux-atomics.p
b/arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-libgcc-no-linux-atomics.p
new file mode 100644
index 0000000..12a88ac
--- /dev/null
+++ b/arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-libgcc-no-linux-atomics.p
@@ -0,0 +1,56 @@
+Index: gcc/libgcc.config.arm.t-riscos-gnueabihf
+===================================================================
+--- gcc/libgcc.config.arm.t-riscos-gnueabihf (revision 7698)
++++ gcc/libgcc.config.arm.t-riscos-gnueabihf (working copy)
+@@ -1,36 +1,2 @@
+-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+-# Contributed by John Tytgat ([email protected]).
+-#
+-# This file is part of GCC.
+-#
+-# GCC is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 3, or (at your option)
+-# any later version.
+-#
+-# GCC is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with GCC; see the file COPYING3. If not see
+-# <http://www.gnu.org/licenses/>.
+-
+-# vvv Part of config/arm/t-bpabi
+-LIB2ADD_ST += $(srcdir)/config/arm/fp16.c
+-
+-LIB2ADDEH = $(srcdir)/config/arm/unwind-arm.c \
+- $(srcdir)/config/arm/libunwind.S \
+- $(srcdir)/config/arm/pr-support.c $(srcdir)/unwind-c.c
+-# ^^^
+-
+-ifeq (,$(findstring mlibscl,$(CFLAGS))$(findstring mmodule,$(CFLAGS)))
+-# For shared libgcc building:
+-EXTRA_PARTS += crtbeginS.o crtendS.o
+-gcc_s_compile += -fPIC
+-SHLIB_LDFLAGS=-fPIC
+-include $(srcdir)/config/t-slibgcc
+-include $(srcdir)/config/t-slibgcc-nolc-override
+-endif
+-
++# Use a version of div0 which raises SIGFPE, and a special __clear_cache.
++LIB1ASMFUNCS := $(filter-out _dvmd_tls,$(LIB1ASMFUNCS)) _dvmd_lnx _clear_cache
+Index: gcc/libgcc.config.host.p
+===================================================================
+--- gcc/libgcc.config.host.p (revision 7698)
++++ gcc/libgcc.config.host.p (working copy)
+@@ -20,7 +20,7 @@
+ ;;
+ +arm*-riscos-gnueabihf)
+ + tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm"
+-+ tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi
t-slibgcc-libgcc t-slibgcc-nolc-override"
+++ tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-riscos-gnueabihf
t-slibgcc-libgcc t-slibgcc-nolc-override"
+ + tm_file="$tm_file arm/bpabi-lib.h"
+ + unwind_header=config/arm/unwind-arm.h
+ + tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp
t-softfp"
diff --git a/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-backtrace.p
b/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-backtrace.p
deleted file mode 100644
index 2c971cd..0000000
--- a/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-backtrace.p
+++ /dev/null
@@ -1,37 +0,0 @@
---- libunixlib/signal/post.c 2021-06-15 21:42:03.000000000 +0100
-+++ libunixlib/signal/post.c 2022-06-03 19:52:18.316234729 +0100
-@@ -307,6 +307,7 @@
- }
-
- #ifdef __ARM_EABI__
-+ const unsigned int *pc = NULL;
- const unsigned int * const lr = (unsigned int *)fp[LR_OFFSET];
- fprintf (stderr, " (%8x) lr: %8x",
- (unsigned int)fp, (unsigned int)lr);
-@@ -350,7 +351,6 @@
- #endif
- oldfp = fp;
- fp = (const unsigned int *)fp[FP_OFFSET];
--#ifndef __ARM_EABI__
- if (__ul_callbackfp != NULL && fp == __ul_callbackfp)
- {
- /* At &oldfp[1] = cpsr, a1-a4, v1-v6, sl, fp, ip, sp, lr, pc */
-@@ -424,7 +424,6 @@
-
- fputs ("\n\n", stderr);
- }
--#endif
- }
-
- fputc ('\n', stderr);
---- libunixlib/signal/_signal.s 2020-05-31 20:11:06.000000000 +0100
-+++ libunixlib/signal/_signal.s 2022-06-03 19:45:32.872892834 +0100
-@@ -761,7 +761,7 @@
- LDR a3, [sp, #14*4 + 4] @ saved USR lr
- LDR a1, [sp, #11*4 + 4] @ saved USR fp
- STMFD sp!, {a1, a3} @ create signal frame
-- MOV fp, sp @ FIXME: check this with compiler
output for similar function
-+ ADD fp, sp, #4 @ FIXME: check this with compiler
output for similar function
- #else
- @ Create an APCS-32 compilant signal stack frame
- ADR a4, __h_cback + 4*3 @ point at handler name for backtrace
diff --git
a/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-sync-and-fetch-atomics.p
b/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-sync-and-fetch-atomics.p
new file mode 100644
index 0000000..f9764ba
--- /dev/null
+++
b/arm-riscos-gnueabihf/recipes/patches/gccsdk/unixlib-sync-and-fetch-atomics.p
@@ -0,0 +1,22 @@
+Index: libunixlib/gcccompat/atomics.c
+===================================================================
+--- libunixlib/gcccompat/atomics.c (revision 7698)
++++ libunixlib/gcccompat/atomics.c (working copy)
+@@ -146,8 +146,6 @@
+ ATOMIC_COMPARE_AND_EXCHANGE(4,uint32_t)
+ ATOMIC_COMPARE_AND_EXCHANGE(8,uint64_t)
+
+-#ifndef __ARM_EABI__
+-
+ /* These built-in functions perform the operation suggested by the name,
+ * and return the value that had previously been in *ptr. That is,
+ *
+@@ -200,8 +198,6 @@
+ SYNC_FETCH_AND_OP(xor,^,8,long long)
+ SYNC_FETCH_AND_OP(and,&,8,long long)
+
+-#endif
+-
+ /* These built-in functions perform the operation suggested by the name,
+ * and return the new value. That is,
+ *
--
Cross-compilation toolchains and environments
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]