summaryrefslogtreecommitdiff
path: root/arm-riscos-gnueabi/recipes/patches/oslib
diff options
context:
space:
mode:
Diffstat (limited to 'arm-riscos-gnueabi/recipes/patches/oslib')
-rw-r--r--arm-riscos-gnueabi/recipes/patches/oslib/buildsystem-elfeabi.p144
-rw-r--r--arm-riscos-gnueabi/recipes/patches/oslib/defmod-elfeabi.p84
-rw-r--r--arm-riscos-gnueabi/recipes/patches/oslib/vapi.p10
3 files changed, 238 insertions, 0 deletions
diff --git a/arm-riscos-gnueabi/recipes/patches/oslib/buildsystem-elfeabi.p b/arm-riscos-gnueabi/recipes/patches/oslib/buildsystem-elfeabi.p
new file mode 100644
index 0000000..83bd862
--- /dev/null
+++ b/arm-riscos-gnueabi/recipes/patches/oslib/buildsystem-elfeabi.p
@@ -0,0 +1,144 @@
+Index: Source/Makefile
+===================================================================
+--- Source/Makefile (revision 477)
++++ Source/Makefile (working copy)
+@@ -3,8 +3,8 @@
+ # already be built upfront.
+ # Written by OSLib Development Team.
+
+-# Build type: CROSSGCC_AOF, CROSSGCC_ELF (default), [NORCROFT_AOF: not
+-# supported yet]
++# Build type: CROSSGCC_AOF, CROSSGCC_ELF (default), CROSSGCC_ELFEABI,
++# [NORCROFT_AOF: not supported yet]
+ export BUILDTYPE ?= CROSSGCC_ELF
+ # Possible values: "SOFTFPU" (e.g. for UnixLib usage), "HARDFPU" (e.g. for
+ # SharedCLibrary usage) and "MODULE" (latter also meaning HARDFPU but the
+@@ -12,9 +12,10 @@
+ export ELFOBJECTTYPE ?= SOFTFPU
+
+ ifeq ($(BUILDTYPE),CROSSGCC_ELF)
++else ifeq ($(BUILDTYPE),CROSSGCC_ELFEABI)
+ else ifeq ($(BUILDTYPE),CROSSGCC_AOF)
+ else
+-$(error Unknown BUILDTYPE value, possible values are CROSSGCC_AOF and CROSSGCC_ELF)
++$(error Unknown BUILDTYPE value, possible values are CROSSGCC_AOF, CROSSGCC_ELF, and CROSSGCC_ELFEABI)
+ endif
+ include Makefile.setup.$(BUILDTYPE)
+
+Index: Source/Makefile.inc
+===================================================================
+--- Source/Makefile.inc (revision 477)
++++ Source/Makefile.inc (working copy)
+@@ -65,6 +65,9 @@
+ ifeq ($(BUILDTYPE),CROSSGCC_ELF)
+ .ELFHdr.Hdr:
+ if [ -s "$<" ]; then $(CP) $< $@; fi
++else ifeq ($(BUILDTYPE),CROSSGCC_ELFEABI)
++.ELFHdr.Hdr:
++ if [ -s "$<" ]; then $(CP) $< $@; fi
+ else
+ .AOFHdr.Hdr:
+ if [ -s "$<" ]; then $(CP) $< $@; fi
+@@ -98,6 +101,9 @@
+ ifeq ($(BUILDTYPE),CROSSGCC_ELF)
+ .gas.o:
+ $(AS) -o $@ $<
++else ifeq ($(BUILDTYPE),CROSSGCC_ELFEABI)
++.gas.o:
++ $(AS) -o $@ $<
+ else
+ .asm.o:
+ $(AS) -o $@ $<
+Index: Source/Makefile.setup.CROSSGCC_ELFEABI
+===================================================================
+--- Source/Makefile.setup.CROSSGCC_ELFEABI (nonexistent)
++++ Source/Makefile.setup.CROSSGCC_ELFEABI (working copy)
+@@ -0,0 +1,62 @@
++# Settings for ELF building
++
++ifndef GCCSDK_INSTALL_CROSSBIN
++$(error Environment variable GCCSDK_INSTALL_CROSSBIN is not defined)
++endif
++ifndef GCCSDK_INSTALL_ENV
++$(error Environment variable GCCSDK_INSTALL_ENV is not defined)
++endif
++
++ifeq ($(ELFOBJECTTYPE),SOFTFPU)
++CCFLAGS = -mfloat-abi=soft
++DEFMODFLAGS = -float-abi soft
++else ifeq ($(ELFOBJECTTYPE),HARDFPU)
++CCFLAGS = -mlibscl
++DEFMODFLAGS = -float-abi hard
++else ifeq ($(ELFOBJECTTYPE),MODULE)
++CCFLAGS = -mmodule
++DEFMODFLAGS = -float-abi hard
++else
++$(error Unknown ELFOBJECTTYPE value, possible values are SOFTFPU, HARDFPU and MODULE)
++endif
++
++export SOURCEDIR := $(abspath .)
++export BINDIR := $(SOURCEDIR)/../Bin
++export BUILDDIR := $(SOURCEDIR)/../Build
++export RELEASEDIR := $(SOURCEDIR)/../Release
++export RELEASEBINDIR := $(SOURCEDIR)/../Release/$(BUILDTYPE)/$(ELFOBJECTTYPE)
++export EXAMPLESDIR := $(SOURCEDIR)/../examples
++export DOCSDIR := $(SOURCEDIR)/../docs
++
++export TOPHEADERDIR := $(BUILDDIR)/Header
++export HEADERDIR := $(TOPHEADERDIR)/oslib
++export CSTRONGDIR := $(BUILDDIR)/CStrong
++export VAPIDIR := $(BUILDDIR)/\!Vala/vapi
++export VAPIHDIR := $(BUILDDIR)/vapih
++export OBJDIR := $(BUILDDIR)/Objs
++export OBJEXCEPTDIR := $(BUILDDIR)/Objs/Exceptions
++export OSLIBSUPPORTDIR := $(BUILDDIR)/OSLibSupport
++
++export BYTEWIDE := $(SOURCEDIR)/ByteWide
++export DEFMOD := $(BINDIR)/defmod -asmtype gccelfeabi $(DEFMODFLAGS)
++export REDUCEAOF := @echo Not needed for ELF build: reduceaof
++export BINDHELP := $(BINDIR)/bindhelp
++
++export PATH := $(GCCSDK_INSTALL_CROSSBIN):$(PATH)
++
++export CC := arm-riscos-gnueabi-gcc $(CCFLAGS)
++export CXX := arm-riscos-gnueabi-g++ $(CCFLAGS)
++export AS := arm-riscos-gnueabi-gcc -c -xassembler-with-cpp $(CCFLAGS) -I.. -I$(SOURCEDIR)/Types
++export LIBFILE := arm-riscos-gnueabi-ar rs
++export MKDIR := mkdir -p
++export RM := rm -rf
++export CP := cp -r
++export INSTALL := $(GCCSDK_INSTALL_ENV)/ro-install
++
++export ASMEXT := .gas
++export EXEEXT := ,e1f
++export LIBSUFFIX := a
++
++export OSLIBLIB := $(BUILDDIR)/libOSLib32.$(LIBSUFFIX)
++export OSLIBSUPPORTLIB := $(OSLIBSUPPORTDIR)/libOSLibSupport32.$(LIBSUFFIX)
++export OSLIBCSTRONG := $(BUILDDIR)/OSLib,3d6
+Index: Makefile
+===================================================================
+--- Makefile (revision 477)
++++ Makefile (working copy)
+@@ -29,6 +29,10 @@
+ install-elf: oslib-elf
+ $(MAKE) -C Source install BUILDTYPE=CROSSGCC_ELF
+
++# Installs the ELF headers & library in GCCSDK environment.
++install-elfeabi: oslib-elfeabi
++ $(MAKE) -C Source install BUILDTYPE=CROSSGCC_ELFEABI
++
+ # Installs the AOF headers & library in GCCSDK environment.
+ install-aof: oslib-aof
+ $(MAKE) -C Source install BUILDTYPE=CROSSGCC_AOF
+@@ -49,6 +53,10 @@
+ $(MAKE) -C Source oslib BUILDTYPE=CROSSGCC_ELF
+ $(MAKE) -C Source oslibsupport BUILDTYPE=CROSSGCC_ELF
+
++oslib-elfeabi: tools
++ $(MAKE) -C Source oslib BUILDTYPE=CROSSGCC_ELFEABI
++ $(MAKE) -C Source oslibsupport BUILDTYPE=CROSSGCC_ELFEABI
++
+ vapis: tools
+ $(MAKE) -C Source vapis BUILDTYPE=CROSSGCC_ELF
+
diff --git a/arm-riscos-gnueabi/recipes/patches/oslib/defmod-elfeabi.p b/arm-riscos-gnueabi/recipes/patches/oslib/defmod-elfeabi.p
new file mode 100644
index 0000000..eadeb6d
--- /dev/null
+++ b/arm-riscos-gnueabi/recipes/patches/oslib/defmod-elfeabi.p
@@ -0,0 +1,84 @@
+Index: Tools/DefMod2/assembler.c
+===================================================================
+--- Tools/DefMod2/assembler.c (revision 477)
++++ Tools/DefMod2/assembler.c (working copy)
+@@ -1242,6 +1242,21 @@
+ goto finish;
+ break;
+ }
++ case AsmType_eGCCELFEABI:
++ {
++ const char *floatABI = (FloatABI == FloatABI_eSoft) ? "soft" : "hard";
++ if (!apcs32)
++ {
++ fprintf(stderr, "EABI does not support APCS-26.");
++ goto finish;
++ }
++ if ((rc = sprintf (cmd,
++ "arm-riscos-gnueabi-gcc -c -xassembler -mfloat-abi=%s -o %s %s",
++ floatABI,
++ name2, name1)) < 0)
++ goto finish;
++ break;
++ }
+ default:
+ fprintf (stderr, "Unknown assembler type\n");
+ goto finish;
+Index: Tools/DefMod2/assembler.h
+===================================================================
+--- Tools/DefMod2/assembler.h (revision 477)
++++ Tools/DefMod2/assembler.h (working copy)
+@@ -22,8 +22,9 @@
+ AsmType_eGCCAOF, /* Assembler used in GCCSDK 3.4 (AOF) release, called
+ 'as' (predecessor of AsAsm). */
+ AsmType_eARMASM, /* ARM's assembler. */
+- AsmType_eGCCELF /* Assembler used in GCCSDK 4 (ELF) release, called
++ AsmType_eGCCELF, /* Assembler used in GCCSDK 4 (ELF) release, called
+ 'gas' (GNU binutils assembler). */
++ AsmType_eGCCELFEABI /* Assembler used in EABI-capable GCCSDK */
+ } AsmType_e;
+
+ typedef enum
+@@ -37,7 +38,7 @@
+ extern AsmType_e AsmType;
+ extern FloatABI_e FloatABI;
+
+-#define GASSyntax (AsmType == AsmType_eGCCELF)
++#define GASSyntax (AsmType == AsmType_eGCCELF || AsmType == AsmType_eGCCELFEABI)
+
+ /*if |separate|, output is to the directory |output|; otherwise, to the file |file|.*/
+ extern os_error *assembler_output (FILE *file, const char *title, const char *author, lookup_t types, lookup_t swis, osbool separate, osbool apcs32, char *output);
+Index: Tools/DefMod2/defmod.y
+===================================================================
+--- Tools/DefMod2/defmod.y (revision 477)
++++ Tools/DefMod2/defmod.y (working copy)
+@@ -1179,7 +1179,7 @@
+ "[-o <output-dir> | > <output-file>] "
+ "[-byte_wide <byte-wide-file>] "
+ "[-26bit | -32bit] "
+- "[-asmtype [objasm | asasmaof | asasmelf | gccaof | armasm | gccelf]] "
++ "[-asmtype [objasm | asasmaof | asasmelf | gccaof | armasm | gccelf | gccelfeabi]] "
+ "[-float-abi [soft | hard]] "
+ "< <module-interface-file>\r"
+ "Purpose: generate output from a module interface file\r"
+@@ -1203,6 +1203,7 @@
+ "\tgccaof\t\t" "...use GCC AOF toolkit (GCCSDK 3.4 only)\r"
+ "\tarmasm\t\t" "...use ARM ASM\r"
+ "\tgccelf\t\t" "...use GCC ELF toolkit (GCCSDK 4 only)\r"
++ "\tgccelfeabi\t\t" "...use GCC EABI ELF toolkit (GCCSDK 8+ only)\r"
+ "-float-abi\t\t" "marks object files which float-abi is in use\r"
+ "\tsoft\t\t" "...soft-float, no FP instructions used\r"
+ "\thard\t\t" "...hard-float, FP instructions can be used\r"
+@@ -1345,9 +1346,11 @@
+ AsmType = AsmType_eARMASM;
+ else if (strcmp (argv[i], "gccelf") == 0)
+ AsmType = AsmType_eGCCELF;
++ else if (strcmp (argv[i], "gccelfeabi") == 0)
++ AsmType = AsmType_eGCCELFEABI;
+ else
+ {
+- fprintf (stderr, "Unknown option value %s for -asmtype (only \"objasm\", \"asasmaof\", \"asasmelf\", \"armarm\", \"gccaof\" and \"gccelf\" are known)\n", argv[i]);
++ fprintf (stderr, "Unknown option value %s for -asmtype (only \"objasm\", \"asasmaof\", \"asasmelf\", \"armarm\", \"gccaof\", \"gccelf\" and \"gccelfeabi\" are known)\n", argv[i]);
+ Parse_Error = TRUE;
+ goto finish;
+ }
diff --git a/arm-riscos-gnueabi/recipes/patches/oslib/vapi.p b/arm-riscos-gnueabi/recipes/patches/oslib/vapi.p
new file mode 100644
index 0000000..a3daf40
--- /dev/null
+++ b/arm-riscos-gnueabi/recipes/patches/oslib/vapi.p
@@ -0,0 +1,10 @@
+--- Tools/DefMod2/vapi.c.orig 2017-09-19 11:57:15.559547484 +0100
++++ Tools/DefMod2/vapi.c 2017-09-19 11:57:31.067750029 +0100
+@@ -23,6 +23,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <stdbool.h>
+
+ #include "oslib/os.h"
+