Radix cross Linux Toolchains for ARC architecture

ARC Toolchains for boot loaders components of some SoCs (such as Amlogic System on Chip)

20 Commits   0 Branches   8 Tags
Index: binutils/2020.03.18/Makefile
===================================================================
--- binutils/2020.03.18/Makefile	(nonexistent)
+++ binutils/2020.03.18/Makefile	(revision 5)
@@ -0,0 +1,79 @@
+
+
+COMPONENT_TARGETS  = $(TOOLCHAIN_S8XX_NEWLIB)
+
+
+include ../../../build-system/config.mk
+
+
+SOURCE_REQUIRES  = sources/binutils
+
+# ======= __END_OF_REQUIRES__ =======
+
+tar_xz_archive       = $(SRC_PACKAGE_PATH)/binutils/binutils-gdb-arc-2020.03.18.tar.xz
+SRC_ARCHIVE          = $(tar_xz_archive)
+SRC_DIR              = $(TARGET_BUILD_DIR)/binutils-gdb-arc-2020.03.18
+src_dir_name         = binutils-gdb-arc-2020.03.18
+src_done             = $(SRC_DIR)/.source-done
+
+PATCHES       = PATCHES
+
+build_dir            = $(TARGET_BUILD_DIR)/build
+install_dir          = $(TOOLCHAIN_PATH)
+
+sysroot_dir          = $(TOOLCHAIN_PATH)/$(TARGET)/sys-root
+
+build_target         = $(TARGET_BUILD_DIR)/.built
+install_target       = $(TARGET_BUILD_DIR)/.installed
+
+
+BUILD_TARGETS  = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+include ../../../build-system/core.mk
+
+
+ifeq ($(TOOLCHAIN),$(TOOLCHAIN_S8XX_NEWLIB))
+extra_configure_switches  = --with-cpu=arcem
+extra_configure_switches += --with-endian=little
+extra_configure_switches += --disable-multilib
+extra_configure_switches += --disable-werror
+endif
+
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(build_target): $(src_done)
+	@mkdir -p $(build_dir)
+	@cd $(build_dir) && ../$(src_dir_name)/configure \
+	  --prefix=$(TOOLCHAIN_PATH)                     \
+	  --target=$(TARGET)                             \
+	  --infodir=$(TOOLCHAIN_PATH)/share/info         \
+	  --mandir=$(TOOLCHAIN_PATH)/share/man           \
+	  $(extra_configure_switches)
+	@$(MAKE) -C $(build_dir) all-{binutils,gas,ld}
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(install_dir)
+	@$(MAKE) -j1 -C $(build_dir) pdf-{binutils,gas,ld}
+	@$(MAKE) -j1 -C $(build_dir) install-{,pdf-}{binutils,gas,ld}
+	@echo ""                                       > $(TOOLCHAIN_PATH)/README
+	@echo "  TOOLCHAIN = $(TOOLCHAIN)"            >> $(TOOLCHAIN_PATH)/README
+	@echo "     TARGET = $(TARGET)"               >> $(TOOLCHAIN_PATH)/README
+	@echo "  BASE_PATH = $(TOOLCHAINS_BASE_PATH)" >> $(TOOLCHAIN_PATH)/README
+	@echo "  DIRECTORY = $(TOOLCHAIN_DIR)"        >> $(TOOLCHAIN_PATH)/README
+	@echo "    VERSION = $(TOOLCHAIN_VERSION)"    >> $(TOOLCHAIN_PATH)/README
+	@echo ""                                      >> $(TOOLCHAIN_PATH)/README
+	@echo "-----------"                           >> $(TOOLCHAIN_PATH)/README
+	@echo ""                                      >> $(TOOLCHAIN_PATH)/README
+	@if [ -n "`cat $(build_dir)/bfd/bfdver.h | grep BFD_VERSION_STRING | cut -f4 -d'"'`" ] ; then \
+	   version_string="`cat $(build_dir)/bfd/bfdver.h | grep BFD_VERSION_STRING | cut -f4 -d'"'`" ; \
+	   echo "  binutils-$${version_string}" >> $(TOOLCHAIN_PATH)/README ; \
+	 else \
+	   echo "  $(subst $(TOP_BUILD_DIR_ABS)/,,$(CURDIR))$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	 fi
+	@touch $@
Index: binutils/2020.03.18/PATCHES
===================================================================
Index: binutils/2020.03.18
===================================================================
--- binutils/2020.03.18	(nonexistent)
+++ binutils/2020.03.18	(revision 5)

Property changes on: binutils/2020.03.18
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,34 ##
+
+# Target build dirs
+.noarch/
+.host/
+
+.s8xx-newlib/
+
+# Hidden files (each file)
+.makefile
+
+# Tarballs
+*.gz
+*.bz2
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Default linux config files
+*.defconfig
+
+# Object Files
+*.[ao]
+
+# backup copies
+*~
Index: binutils
===================================================================
--- binutils	(nonexistent)
+++ binutils	(revision 5)

Property changes on: binutils
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,34 ##
+
+# Target build dirs
+.noarch/
+.host/
+
+.s8xx-newlib/
+
+# Hidden files (each file)
+.makefile
+
+# Tarballs
+*.gz
+*.bz2
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Default linux config files
+*.defconfig
+
+# Object Files
+*.[ao]
+
+# backup copies
+*~
Index: gcc/2020.03.16/Makefile
===================================================================
--- gcc/2020.03.16/Makefile	(nonexistent)
+++ gcc/2020.03.16/Makefile	(revision 5)
@@ -0,0 +1,172 @@
+
+
+COMPONENT_TARGETS  = $(TOOLCHAIN_S8XX_NEWLIB)
+
+
+FLAVOURS = static full
+
+
+include ../../../build-system/config.mk
+
+
+SOURCE_REQUIRES  = sources/gcc
+SOURCE_REQUIRES += sources/GNU/gmp
+SOURCE_REQUIRES += sources/GNU/mpfr
+SOURCE_REQUIRES += sources/GNU/mpc
+
+
+ifneq ($(findstring newlib, $(TOOLCHAIN)),)
+ifeq ($(FLAVOUR),static)
+REQUIRES  = core/newlib/2020.03.18^headers
+endif
+ifeq ($(FLAVOUR),full)
+REQUIRES  = core/newlib/2020.03.18^full
+endif
+endif
+
+
+# ======= __END_OF_REQUIRES__ =======
+
+tar_xz_archive        = $(SRC_PACKAGE_PATH)/gcc/gcc-arc-2020.03.16.tar.xz
+tar_xz_archive_gmp    = $(SRC_PACKAGE_PATH)/GNU/gmp/gmp-6.2.0.tar.xz
+tar_xz_archive_mpfr   = $(SRC_PACKAGE_PATH)/GNU/mpfr/mpfr-4.0.2.tar.xz
+tar_gz_archive_mpc    = $(SRC_PACKAGE_PATH)/GNU/mpc/mpc-1.1.0.tar.gz
+SRC_ARCHIVE           = $(tar_xz_archive)
+SRC_DIR               = $(TARGET_BUILD_DIR)/gcc-arc-2020.03.16
+src_dir_name          = gcc-arc-2020.03.16
+src_done              = $(TARGET_BUILD_DIR)/.source-done
+gmp_src_done          = $(TARGET_BUILD_DIR)/.gmp-source-done
+mpfr_src_done         = $(TARGET_BUILD_DIR)/.mpfr-source-done
+mpc_src_done          = $(TARGET_BUILD_DIR)/.mpc-source-done
+
+PATCHES = PATCHES
+
+build_dir             = $(TARGET_BUILD_DIR)/build
+
+sysroot_dir           = $(TOOLCHAIN_PATH)/$(TARGET)/sys-root
+
+static_build_target   = $(TARGET_BUILD_DIR)/.static-built
+static_install_target = $(TARGET_BUILD_DIR)/.static-installed
+full_build_target     = $(TARGET_BUILD_DIR)/.full-built
+full_install_target   = $(TARGET_BUILD_DIR)/.full-installed
+
+
+LIBSUFFIX    =
+
+
+ifeq ($(FLAVOUR),static)
+BUILD_TARGETS  = $(static_build_target)
+BUILD_TARGETS += $(static_install_target)
+endif
+
+ifeq ($(FLAVOUR),full)
+BUILD_TARGETS  = $(full_build_target)
+BUILD_TARGETS += $(full_install_target)
+endif
+
+
+include ../../../build-system/core.mk
+
+
+ifeq ($(TOOLCHAIN),$(TOOLCHAIN_S8XX_NEWLIB))
+extra_configure_switches  = --with-cpu=arcem
+extra_configure_switches += --disable-multilib
+extra_configure_switches += --with-endian=little
+extra_configure_switches += --disable-werror
+ifeq ($(FLAVOUR),static)
+extra_configure_switches += --enable-languages=c
+else
+extra_configure_switches += --enable-languages=c,c++
+extra_configure_switches += --with-newlib
+endif
+endif
+
+
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(gmp_src_done): $(src_done)
+	@echo "Expanding $(tar_xz_archive_gmp)"
+	@tar xJf $(tar_xz_archive_gmp) -C $(TARGET_BUILD_DIR)
+	@cd $(SRC_DIR); ln -sf ../gmp-6.2.0 gmp
+	@touch $@
+
+$(mpfr_src_done): $(src_done)
+	@echo "Expanding $(tar_xz_archive_mpfr)"
+	@tar xJf $(tar_xz_archive_mpfr) -C $(TARGET_BUILD_DIR)
+	@cd $(SRC_DIR); ln -sf ../mpfr-4.0.2 mpfr
+	@touch $@
+
+$(mpc_src_done): $(src_done)
+	@echo "Expanding $(tar_gz_archive_mpc)"
+	@tar xzf $(tar_gz_archive_mpc) -C $(TARGET_BUILD_DIR)
+	@cd $(SRC_DIR); ln -sf ../mpc-1.1.0 mpc
+	@touch $@
+
+$(static_build_target): $(gmp_src_done) $(mpfr_src_done) $(mpc_src_done)
+	@mkdir -p $(build_dir)
+	@cd $(build_dir) && $(environment) ../$(src_dir_name)/configure \
+	  --prefix=$(TOOLCHAIN_PATH)       \
+	  --build=$(HOST)                  \
+	  --host=$(HOST)                   \
+	  --target=$(TARGET)               \
+	  --with-as=$(TOOLCHAIN_PATH)/bin/$(TARGET)-as \
+	  --with-ld=$(TOOLCHAIN_PATH)/bin/$(TARGET)-ld \
+	  --datadir=$(TOOLCHAIN_PATH)/share       \
+	  --infodir=$(TOOLCHAIN_PATH)/share/info  \
+	  --mandir=$(TOOLCHAIN_PATH)/share/man    \
+	  $(extra_configure_switches)
+	@$(environment) $(MAKE) -C $(build_dir) all-{gcc,target-libgcc}
+	@touch $@
+
+$(static_install_target): $(static_build_target)
+	@$(MAKE) $(environment) -j1 -C $(build_dir) install-{gcc,target-libgcc}
+	@( major="`cat $(build_dir)/gcc/bversion.h | grep '#define BUILDING_GCC_MAJOR' | cut -f3 -d' '`"      ; \
+	   minor="`cat $(build_dir)/gcc/bversion.h | grep '#define BUILDING_GCC_MINOR' | cut -f3 -d' '`"      ; \
+	   patch="`cat $(build_dir)/gcc/bversion.h | grep '#define BUILDING_GCC_PATCHLEVEL' | cut -f3 -d' '`" ; \
+	   version_string="$${major}.$${minor}.$${patch}" ; \
+	   if [ -n "$${version_string}" ] ; then \
+	     echo "  gcc-$${version_string}$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	   else \
+	     echo "  $(subst $(TOP_BUILD_DIR_ABS)/,,$(CURDIR))$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	   fi ; \
+	 )
+	@touch $@
+
+
+$(full_build_target): $(gmp_src_done) $(mpfr_src_done) $(mpc_src_done)
+	@mkdir -p $(build_dir)
+	cd $(build_dir) && $(environment) ../$(src_dir_name)/configure \
+	  --prefix=$(TOOLCHAIN_PATH)       \
+	  --build=$(HOST)                  \
+	  --host=$(HOST)                   \
+	  --target=$(TARGET)               \
+	  --with-as=$(TOOLCHAIN_PATH)/bin/$(TARGET)-as \
+	  --with-ld=$(TOOLCHAIN_PATH)/bin/$(TARGET)-ld \
+	  --datadir=$(TOOLCHAIN_PATH)/share       \
+	  --infodir=$(TOOLCHAIN_PATH)/share/info  \
+	  --mandir=$(TOOLCHAIN_PATH)/share/man    \
+	  $(extra_configure_switches)
+	@$(environment) $(MAKE) -C $(build_dir) all-{gcc,target-libgcc,target-libstdc++-v3}
+	@touch $@
+
+$(full_install_target): $(full_build_target)
+	@$(MAKE) $(environment) -j1 -C $(build_dir) pdf-gcc
+	@$(MAKE) $(environment) -j1 -C $(build_dir) install-{gcc,target-libgcc,target-libstdc++-v3,pdf-gcc}
+	@( cd $(TOOLCHAIN_PATH)/$(TARGET)/lib$(LIBSUFFIX) ; \
+	   sed -i 's,-L.*\.libs,-L$(TOOLCHAIN_PATH)/$(TARGET)/lib$(LIBSUFFIX),g' libstdc++.la libsupc++.la ; \
+	 )
+	@( major="`cat $(build_dir)/gcc/bversion.h | grep '#define BUILDING_GCC_MAJOR' | cut -f3 -d' '`"      ; \
+	   minor="`cat $(build_dir)/gcc/bversion.h | grep '#define BUILDING_GCC_MINOR' | cut -f3 -d' '`"      ; \
+	   patch="`cat $(build_dir)/gcc/bversion.h | grep '#define BUILDING_GCC_PATCHLEVEL' | cut -f3 -d' '`" ; \
+	   version_string="$${major}.$${minor}.$${patch}" ; \
+	   if [ -n "$${version_string}" ] ; then \
+	     echo "  gcc-$${version_string}$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	   else \
+	     echo "  $(subst $(TOP_BUILD_DIR_ABS)/,,$(CURDIR))$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	   fi ; \
+	 )
+	@touch $@
Index: gcc/2020.03.16/PATCHES
===================================================================
Index: gcc/2020.03.16
===================================================================
--- gcc/2020.03.16	(nonexistent)
+++ gcc/2020.03.16	(revision 5)

Property changes on: gcc/2020.03.16
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,34 ##
+
+# Target build dirs
+.noarch/
+.host/
+
+.s8xx-newlib/
+
+# Hidden files (each file)
+.makefile
+
+# Tarballs
+*.gz
+*.bz2
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Default linux config files
+*.defconfig
+
+# Object Files
+*.[ao]
+
+# backup copies
+*~
Index: gcc
===================================================================
--- gcc	(nonexistent)
+++ gcc	(revision 5)

Property changes on: gcc
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,34 ##
+
+# Target build dirs
+.noarch/
+.host/
+
+.s8xx-newlib/
+
+# Hidden files (each file)
+.makefile
+
+# Tarballs
+*.gz
+*.bz2
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Default linux config files
+*.defconfig
+
+# Object Files
+*.[ao]
+
+# backup copies
+*~
Index: gdb/2020.03.18/Makefile
===================================================================
--- gdb/2020.03.18/Makefile	(nonexistent)
+++ gdb/2020.03.18/Makefile	(revision 5)
@@ -0,0 +1,73 @@
+
+
+COMPONENT_TARGETS  = $(TOOLCHAIN_S8XX_NEWLIB)
+
+
+include ../../../build-system/config.mk
+
+
+SOURCE_REQUIRES = sources/binutils
+
+REQUIRES  = core/gcc/2020.03.16^full
+
+# ======= __END_OF_REQUIRES__ =======
+
+tar_xz_archive   = $(SRC_PACKAGE_PATH)/binutils/binutils-gdb-arc-2020.03.18.tar.xz
+SRC_ARCHIVE      = $(tar_xz_archive)
+SRC_DIR          = $(TARGET_BUILD_DIR)/binutils-gdb-arc-2020.03.18
+src_dir_name     = binutils-gdb-arc-2020.03.18
+src_done         = $(SRC_DIR)/.source-done
+
+PATCHES       = PATCHES
+
+build_dir        = $(TARGET_BUILD_DIR)/build
+
+build_target     = $(TARGET_BUILD_DIR)/.built
+install_target   = $(TARGET_BUILD_DIR)/.installed
+
+environment  = PATH=$(TOOLCHAIN_PATH)/bin:$(PATH)
+
+
+BUILD_TARGETS  = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+include ../../../build-system/core.mk
+
+
+
+ifeq ($(TOOLCHAIN),$(TOOLCHAIN_S8XX_NEWLIB))
+extra_configure_switches  = --with-cpu=arcem
+extra_configure_switches += --with-endian=little
+extra_configure_switches += --disable-multilib
+extra_configure_switches += --disable-werror
+extra_configure_switches += --enable-languages=c,c++
+endif
+
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(build_target): $(src_done)
+	@mkdir -p $(build_dir)
+	@cd $(build_dir) && $(environment) ../$(src_dir_name)/configure \
+	  --prefix=$(TOOLCHAIN_PATH)              \
+	  --target=$(TARGET)                      \
+	  --datadir=$(TOOLCHAIN_PATH)/share       \
+	  --infodir=$(TOOLCHAIN_PATH)/share/info  \
+	  --mandir=$(TOOLCHAIN_PATH)/share/man    \
+	  $(extra_configure_switches)
+	@$(MAKE) $(environment) -C $(build_dir) all-{gdb,sim}
+	@touch $@
+
+$(install_target): $(build_target)
+	@$(MAKE) $(environment) -j1 -C $(build_dir) install-{gdb,sim}
+	@( version_string="`cat $(SRC_DIR)/gdb/version.in | cut -f1,2,3 -d'.'`" ; \
+	   if [ -n "$${version_string}" ] ; then \
+	     echo "  gdb-$${version_string}" >> $(TOOLCHAIN_PATH)/README ; \
+	   else \
+	     echo "  $(subst $(TOP_BUILD_DIR_ABS)/,,$(CURDIR))$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	   fi ; \
+	 )
+	@touch $@
Index: gdb/2020.03.18/PATCHES
===================================================================
Index: gdb/2020.03.18
===================================================================
--- gdb/2020.03.18	(nonexistent)
+++ gdb/2020.03.18	(revision 5)

Property changes on: gdb/2020.03.18
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,34 ##
+
+# Target build dirs
+.noarch/
+.host/
+
+.s8xx-newlib/
+
+# Hidden files (each file)
+.makefile
+
+# Tarballs
+*.gz
+*.bz2
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Default linux config files
+*.defconfig
+
+# Object Files
+*.[ao]
+
+# backup copies
+*~
Index: gdb
===================================================================
--- gdb	(nonexistent)
+++ gdb	(revision 5)

Property changes on: gdb
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,34 ##
+
+# Target build dirs
+.noarch/
+.host/
+
+.s8xx-newlib/
+
+# Hidden files (each file)
+.makefile
+
+# Tarballs
+*.gz
+*.bz2
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Default linux config files
+*.defconfig
+
+# Object Files
+*.[ao]
+
+# backup copies
+*~
Index: newlib/2020.03.18/Makefile
===================================================================
--- newlib/2020.03.18/Makefile	(nonexistent)
+++ newlib/2020.03.18/Makefile	(revision 5)
@@ -0,0 +1,147 @@
+
+NO_PARALLEL = true
+
+COMPONENT_TARGETS  = $(TOOLCHAIN_S8XX_NEWLIB)
+
+FLAVOURS = headers full
+
+
+include ../../../build-system/config.mk
+
+
+SOURCE_REQUIRES = sources/newlib
+
+ifeq ($(FLAVOUR),headers)
+REQUIRES  = core/binutils/2020.03.18
+endif
+ifeq ($(FLAVOUR),full)
+REQUIRES  = core/gcc/2020.03.16^static
+endif
+
+# ======= __END_OF_REQUIRES__ =======
+
+tar_xz_archive  = $(SRC_PACKAGE_PATH)/newlib/newlib-arc-2020.03.18.tar.xz
+SRC_ARCHIVE     = $(tar_xz_archive)
+SRC_DIR         = $(TARGET_BUILD_DIR)/newlib-arc-2020.03.18
+src_dir_name    = newlib-arc-2020.03.18
+src_done        = $(TARGET_BUILD_DIR)/.source-done
+
+PATCHES       = PATCHES
+
+build_dir       = $(TARGET_BUILD_DIR)/build
+
+install_dir         = $(TOOLCHAIN_PATH)
+headers_install_dir = $(TOOLCHAIN_PATH)/$(TARGET)
+
+headers_target  = $(TARGET_BUILD_DIR)/.headers-installed
+
+build_target    = $(TARGET_BUILD_DIR)/.built
+full_target     = $(TARGET_BUILD_DIR)/.installed
+
+
+
+ifeq ($(FLAVOUR),headers)
+BUILD_TARGETS  = $(headers_target)
+endif
+
+ifeq ($(FLAVOUR),full)
+BUILD_TARGETS  = $(build_target)
+BUILD_TARGETS += $(full_target)
+endif
+
+include ../../../build-system/core.mk
+
+
+environment  = AS="$(TOOLCHAIN_PATH)/bin/$(TARGET)-as"
+environment += LD="$(TOOLCHAIN_PATH)/bin/$(TARGET)-ld"
+environment += CC="$(CCACHE)$(TOOLCHAIN_PATH)/bin/$(TARGET)-gcc"
+environment += AR="$(TOOLCHAIN_PATH)/bin/$(TARGET)-ar"
+environment += RANLIB="$(TOOLCHAIN_PATH)/bin/$(TARGET)-ranlib"
+
+environment += PATH_FIG2DEV="/usr/bin:/usr/X11R6/bin:/usr/share/texmf/bin"
+environment += PATH="$(TOOLCHAIN_PATH)/bin:$(PATH):$(PATH_FIG2DEV)"
+#                                                   =============
+# need for fig2dev and documentation (see: ../.config).
+
+environment += BUILD_CC="$(CCACHE)/usr/bin/gcc"
+environment += TARGET_CFLAGS=""
+
+
+ifeq ($(TOOLCHAIN),$(TOOLCHAIN_S8XX_NEWLIB))
+extra_configure_switches  = --disable-multilib
+extra_configure_switches += --with-cpu=arcem
+extra_configure_switches += --with-endian=little
+
+extra_configure_switches += --with-gnu-as
+extra_configure_switches += --with-gnu-ld
+extra_configure_switches += --enable-newlib-supplied-sycalls
+# extra_configure_switches += --enable-newlib-global-atexit
+
+extra_configure_switches += --enable-newlib-io-c99-formats
+extra_configure_switches += --enable-newlib-io-long-long
+extra_configure_switches += --enable-newlib-io-pos-args
+extra_configure_switches += --enable-newlib-multithread
+endif
+
+
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(headers_target): $(src_done)
+	@mkdir -p $(headers_install_dir)
+	@cp -ar $(TARGET_BUILD_DIR)/$(src_dir_name)/newlib/libc/include $(headers_install_dir)/sys-include
+	@if [ -n "`cat $(SRC_DIR)/newlib/configure | grep _NEWLIB_VERSION | cut -f3 -d'"' | sed 's,[^0-9.],,g'`" ] ; then \
+	   version_string="`cat $(SRC_DIR)/newlib/configure | grep _NEWLIB_VERSION | cut -f3 -d'"' | sed 's,[^0-9.],,g'`" ; \
+	   echo "  newlib-$${version_string}$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	 else \
+	   echo "  $(subst $(TOP_BUILD_DIR_ABS)/,,$(CURDIR))$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	 fi
+	@touch $@
+
+$(build_target): $(src_done)
+	# =======  Building newlib =======
+	@mkdir -p $(build_dir)
+	@cd $(build_dir) && $(environment) ../$(src_dir_name)/newlib/configure \
+	  --prefix=$(TOOLCHAIN_PATH)       \
+	  --build=$(BUILD)                 \
+	  --host=$(TARGET)                 \
+	  --target=$(TARGET)               \
+	  --infodir=$(TOOLCHAIN_PATH)/share/info \
+	  --mandir=$(TOOLCHAIN_PATH)/share/man   \
+	  $(extra_configure_switches)
+	@$(environment) $(MAKE) -C $(build_dir) all
+	# =======  Building libgloss =======
+	@mkdir -p $(build_dir)/libgloss
+	@cd $(build_dir)/libgloss && $(environment) ../../$(src_dir_name)/libgloss/configure \
+	  --prefix=$(TOOLCHAIN_PATH)       \
+	  --build=$(BUILD)                 \
+	  --host=$(TARGET)                 \
+	  --target=$(TARGET)               \
+	  --infodir=$(TOOLCHAIN_PATH)/share/info \
+	  --mandir=$(TOOLCHAIN_PATH)/share/man   \
+	  $(extra_configure_switches)
+	@$(environment) $(MAKE) -C $(build_dir)/libgloss all info
+	@touch $@
+
+$(full_target): $(build_target)
+	@mkdir -p $(install_dir)
+	@$(environment) $(MAKE) -C $(build_dir) install
+	@$(environment) $(MAKE) -C $(build_dir)/libgloss install
+	@$(environment) $(MAKE) -C $(build_dir) pdf
+	@$(environment) $(MAKE) -C $(build_dir)/libgloss pdf
+	# ======= Install Documentation =======
+	@$(environment) $(MAKE) -C $(build_dir)/libgloss/doc install-info
+	@mkdir -p $(TOOLCHAIN_PATH)/share/doc/newlib
+	@cp $(build_dir)/libc/libc.pdf            $(TOOLCHAIN_PATH)/share/doc/newlib
+	@cp $(build_dir)/libm/libm.pdf            $(TOOLCHAIN_PATH)/share/doc/newlib
+	@cp $(build_dir)/libgloss/doc/porting.pdf $(TOOLCHAIN_PATH)/share/doc/newlib
+	@if [ -n "`cat $(SRC_DIR)/newlib/configure | grep _NEWLIB_VERSION | cut -f3 -d'"' | sed 's,[^0-9.],,g'`" ] ; then \
+	   version_string="`cat $(SRC_DIR)/newlib/configure | grep _NEWLIB_VERSION | cut -f3 -d'"' | sed 's,[^0-9.],,g'`" ; \
+	   echo "  newlib-$${version_string}$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	 else \
+	   echo "  $(subst $(TOP_BUILD_DIR_ABS)/,,$(CURDIR))$(if $(FLAVOUR),:$(FLAVOUR),)" >> $(TOOLCHAIN_PATH)/README ; \
+	 fi
+	@touch $@
Index: newlib/2020.03.18/PATCHES
===================================================================
Index: newlib/2020.03.18
===================================================================
--- newlib/2020.03.18	(nonexistent)
+++ newlib/2020.03.18	(revision 5)

Property changes on: newlib/2020.03.18
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,34 ##
+
+# Target build dirs
+.noarch/
+.host/
+
+.s8xx-newlib/
+
+# Hidden files (each file)
+.makefile
+
+# Tarballs
+*.gz
+*.bz2
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Default linux config files
+*.defconfig
+
+# Object Files
+*.[ao]
+
+# backup copies
+*~
Index: newlib
===================================================================
--- newlib	(nonexistent)
+++ newlib	(revision 5)

Property changes on: newlib
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,34 ##
+
+# Target build dirs
+.noarch/
+.host/
+
+.s8xx-newlib/
+
+# Hidden files (each file)
+.makefile
+
+# Tarballs
+*.gz
+*.bz2
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Default linux config files
+*.defconfig
+
+# Object Files
+*.[ao]
+
+# backup copies
+*~
Index: .
===================================================================
--- .	(nonexistent)
+++ .	(revision 5)

Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,34 ##
+
+# Target build dirs
+.noarch/
+.host/
+
+.s8xx-newlib/
+
+# Hidden files (each file)
+.makefile
+
+# Tarballs
+*.gz
+*.bz2
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Default linux config files
+*.defconfig
+
+# Object Files
+*.[ao]
+
+# backup copies
+*~