From 7a767da220c745dfc58a1c30281c3d1cb10d949a Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Thu, 3 Nov 2022 20:57:12 +0000 Subject: Buildsystem: support arm-riscos-gnueabi --- frontends/riscos/Makefile.tools | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/frontends/riscos/Makefile.tools b/frontends/riscos/Makefile.tools index 19a2e7768..8ef4dd019 100644 --- a/frontends/riscos/Makefile.tools +++ b/frontends/riscos/Makefile.tools @@ -18,25 +18,30 @@ ifeq ($(HOST),riscos) ZIP := zip else # Cross-build for RO - # Three options are available: - # a. GCCSDK 3.4.6 - AOF (machine: arm-unknown-riscos) - # b. GCCSDK 4 - ELF (machine: arm-unknown-riscos) - # c. GCCSDK 8+ - ELF, using EABI (machine: arm-riscos-gnueabihf) + # Four options are available: + # a. GCCSDK 3.4.6 - AOF (machine: arm-unknown-riscos) + # b. GCCSDK 4 - ELF (machine: arm-unknown-riscos) + # c. GCCSDK 8+ - ELF, using soft-float EABI (machine: arm-riscos-gnueabi) + # d. GCCSDK 8+ - ELF, using hard-float EABI (machine: arm-riscos-gnueabihf) # GCCSDK 3.4.6 and 4 are distinguished by GCCSDK 3.4.6 binary names # not having the machine prefix (e.g. gcc), whereas GCCSDK 4 binaries # do (e.g. arm-unknown-riscos-gcc). # Search for the toolchain install locations if we haven't been told - # The search order prefers GCCSDK 3.4.6/4 over 8+. + # The search order prefers GCCSDK 3.4.6/4 over 8+ and soft-float over hard. ifeq ($(origin GCCSDK_INSTALL_ENV),undefined) ifneq ($(realpath /opt/netsurf/arm-unknown-riscos/env),) GCCSDK_INSTALL_ENV := /opt/netsurf/arm-unknown-riscos/env else - ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabihf/env),) - GCCSDK_INSTALL_ENV := /opt/netsurf/arm-riscos-gnueabihf/env + ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabi/env),) + GCCSDK_INSTALL_ENV := /opt/netsurf/arm-riscos-gnueabi/env else - # No NetSurf-specific toolchain found: try the "normal" GCCSDK path - GCCSDK_INSTALL_ENV := /home/riscos/env + ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabihf/env),) + GCCSDK_INSTALL_ENV := /opt/netsurf/arm-riscos-gnueabihf/env + else + # No NetSurf-specific toolchain found: try the "normal" GCCSDK path + GCCSDK_INSTALL_ENV := /home/riscos/env + endif endif endif endif @@ -45,11 +50,15 @@ else ifneq ($(realpath /opt/netsurf/arm-unknown-riscos/cross/bin),) GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-unknown-riscos/cross/bin else - ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabihf/cross/bin),) - GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-riscos-gnueabihf/cross/bin + ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabi/cross/bin),) + GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-riscos-gnueabi/cross/bin else - # No NetSurf-specific toolchain found: try the "normal" GCCSDK path - GCCSDK_INSTALL_CROSSBIN := /home/riscos/cross/bin + ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabihf/cross/bin),) + GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-riscos-gnueabihf/cross/bin + else + # No NetSurf-specific toolchain found: try the "normal" GCCSDK path + GCCSDK_INSTALL_CROSSBIN := /home/riscos/cross/bin + endif endif endif endif @@ -68,9 +77,12 @@ else EXEEXT := ,e1f ELF2AIF := $(GCCSDK_INSTALL_CROSSBIN)/elf2aif else - ifneq (,$(findstring arm-riscos-gnueabihf-gcc,$(CC))) + ifneq (,$(findstring arm-riscos-gnueabi,$(CC))) # GCCSDK 8+ SUBTARGET := -elfeabi + ifneq (,$(findstring gnueabihf,$(CC))) + SUBTARGET := -elfeabihf + endif EXEEXT := ,e1f ELF2AIF := $(GCCSDK_INSTALL_CROSSBIN)/elf2aif -e else -- cgit v1.2.3