diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2022-06-02 23:52:46 +0100 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2022-06-02 23:52:46 +0100 |
commit | caa9c7239d6d608c4c3d4e71e7d08d4de8cc6e4a (patch) | |
tree | 6c1e7aac77488b03794b0e6d80236ddf3853ffcc | |
parent | 47b419d2dec6285bf92c7b4c180d103b8bdf24fd (diff) | |
download | ttf2f-caa9c7239d6d608c4c3d4e71e7d08d4de8cc6e4a.tar.gz ttf2f-caa9c7239d6d608c4c3d4e71e7d08d4de8cc6e4a.tar.bz2 |
Tweak RISC OS host detection for new tooling.
The new toolchain has a different machine triplet, so update the
things that care about it to work either way.
Additionally, ensure that elf2aif is passed the right flags when
building for EABI (if not, it will fail hard).
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | src/Makefile | 2 |
2 files changed, 10 insertions, 5 deletions
@@ -24,7 +24,7 @@ CFLAGS := $(CFLAGS) -std=c99 \ # Freetype2 ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) ifneq ($(PKGCONFIG),) - ifeq ($(HOST),arm-unknown-riscos) + ifeq ($(findstring -riscos,$(HOST)),-riscos) CFLAGS := $(CFLAGS) $(shell $(PKGCONFIG) freetype2 --cflags --static) LDFLAGS := $(LDFLAGS) $(shell $(PKGCONFIG) freetype2 --libs --static) else @@ -39,7 +39,7 @@ endif # OSLib (RISC OS target only) ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) - ifeq ($(HOST),arm-unknown-riscos) + ifeq ($(findstring -riscos,$(HOST)),-riscos) CFLAGS := $(CFLAGS) -I$(PREFIX)/include -static LDFLAGS := $(LDFLAGS) -lOSLib32 -lOSLibSupport32 -static endif @@ -47,7 +47,7 @@ endif include $(NSBUILD)/Makefile.top -ifeq ($(HOST),arm-unknown-riscos) +ifeq ($(findstring -riscos,$(HOST)),-riscos) realoutput := $(OUTPUT) e1f := ,e1f ifeq ($(EXEEXT),$(e1f)) @@ -56,9 +56,14 @@ ifeq ($(HOST),arm-unknown-riscos) POST_TARGETS := $(realoutput) $(POST_TARGETS) + ELF2AIF_FLAGS := + ifeq ($(HOST),arm-riscos-gnueabihf) + ELF2AIF_FLAGS := -e $(ELF2AIF_FLAGS) + endif + $(realoutput): $(OUTPUT) $(Q)echo " ELF2AIF: $@" - $(Q)$(dir $(CC))elf2aif $(OUTPUT) $@ + $(Q)$(dir $(CC))elf2aif $(ELF2AIF_FLAGS) $(OUTPUT) $@ $(Q)echo " SQUEEZE: $@" $(Q)$(dir $(CC))squeeze $@ diff --git a/src/Makefile b/src/Makefile index 0265d3f..bfe8aa1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,7 +4,7 @@ DIR_SOURCES := encoding.c ft.c glyphs.c intmetrics.c outlines.c utils.c ifeq ($(FRONTEND),cli) DIR_SOURCES := $(DIR_SOURCES) cli.c else - ifeq ($(HOST),arm-unknown-riscos) + ifeq ($(findstring -riscos,$(HOST)),-riscos) DIR_SOURCES := $(DIR_SOURCES) toolbox.c endif endif |