summaryrefslogtreecommitdiff
path: root/makefiles
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2023-12-18 18:23:13 +0000
committerJohn-Mark Bell <jmb@netsurf-browser.org>2023-12-18 18:23:13 +0000
commit176d4e610327d40de2ebd486abaff3d2726ad77a (patch)
tree3524cee463c5ae935cbd9c8f0b229b06b3b8f45e /makefiles
parent3e6c0a971c48fa764cc0fd21d5ef5a559c89be96 (diff)
downloadbuildsystem-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')
-rw-r--r--makefiles/Makefile.gcc16
-rw-r--r--makefiles/Makefile.tools5
2 files changed, 17 insertions, 4 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
###############################################################################
diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index e5504e7..40e4d10 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -185,9 +185,8 @@ else
EXEEXT := ,ffa
endif
- # TODO: this assumes GCC
- CFLAGS := $(CFLAGS) -mpoke-function-name -I$(GCCSDK_INSTALL_ENV)/include
- CXXFLAGS := $(CXXFLAGS) -mpoke-function-name -I$(GCCSDK_INSTALL_ENV)/include
+ CFLAGS := $(CFLAGS) -I$(GCCSDK_INSTALL_ENV)/include
+ CXXFLAGS := $(CXXFLAGS) -I$(GCCSDK_INSTALL_ENV)/include
LDFLAGS := $(LDFLAGS) -L$(GCCSDK_INSTALL_ENV)/lib
CMHGFLAGS := -p -tgcc -32bit -apcs 3/32/nonreent/fpe2/noswst/nofpr/nofp