diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2023-12-18 18:23:13 +0000 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2023-12-18 18:23:13 +0000 |
commit | 176d4e610327d40de2ebd486abaff3d2726ad77a (patch) | |
tree | 3524cee463c5ae935cbd9c8f0b229b06b3b8f45e /makefiles/Makefile.gcc | |
parent | 3e6c0a971c48fa764cc0fd21d5ef5a559c89be96 (diff) | |
download | buildsystem-176d4e610327d40de2ebd486abaff3d2726ad77a.tar.gz buildsystem-176d4e610327d40de2ebd486abaff3d2726ad77a.tar.bz2 |
RISC OS: push backtrace extensions into Makefile.gcc
These are GCC-specific, so ensure they're only enabled when using
that compiler. Also, enable unwind table generation for gnueabi(hf)
hosts.
Diffstat (limited to 'makefiles/Makefile.gcc')
-rw-r--r-- | makefiles/Makefile.gcc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/makefiles/Makefile.gcc b/makefiles/Makefile.gcc index 4a9dff7..0ce0d9b 100644 --- a/makefiles/Makefile.gcc +++ b/makefiles/Makefile.gcc @@ -67,7 +67,10 @@ endif # RISC OS module extensions ifeq ($(COMPONENT_TYPE),riscos-module) ifneq ($(HOST),arm-unknown-riscos) - $(error Attempting to build a RISC OS module for a non-RISC OS target) + # Note: this also rejects the gnueabi(hf) RISC OS hosts, too, as the + # tooling for those is not able to generate code compatible with RISC OS + # module environments. + $(error Attempting to build a RISC OS module for a non-RISC OS host) endif CFLAGS := $(CFLAGS) -mmodule @@ -75,6 +78,17 @@ ifeq ($(COMPONENT_TYPE),riscos-module) LDFLAGS := $(LDFLAGS) -mmodule endif +# RISC OS backtrace extensions +ifneq ($(findstring -riscos,$(HOST)),) + CFLAGS := $(CFLAGS) -mpoke-function-name + CXXFLAGS := $(CXXFLAGS) -mpoke-function-name + ifneq ($(findstring -gnueabi,$(HOST)),) + # Note: this assumes we're not generating RISC OS module code (see above) + CFLAGS := $(CFLAGS) -funwind-tables + CXXFLAGS := $(CXXFLAGS) -funwind-tables + endif +endif + ############################################################################### # Mac OS X Universal Binaries ############################################################################### |