update buildroot to 2017.02.11

This commit is contained in:
jbnadal
2018-05-22 15:35:47 +02:00
parent 4bf1f5e091
commit a3c10bd762
9257 changed files with 433426 additions and 1701 deletions

View File

@@ -0,0 +1,147 @@
if BR2_TOOLCHAIN_EXTERNAL
comment "Toolchain External Options"
choice
prompt "Toolchain"
comment "glibc toolchains only available with shared lib support"
depends on BR2_STATIC_LIBS
# Kept toolchains sorted by architecture in order to use some toolchain
# as default choice
# Aarch64 (use Linaro toolchain by default)
source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in"
# ARC
source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in"
# ARM (use Linaro toolchain by default)
source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in"
# ARM big-endian
source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in"
# MIPS (use codesourcery toolchain by default)
source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in"
source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in"
source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in"
# NIOSII
source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in"
# SH4a
source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in"
# x86/x86_64 (use amd64 toolchain by default for AMD64)
source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in"
source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in"
# Kept last, so it remains the non-default choice, unless there isn't
# any available toolchain profile for the currently selected
# architecture.
source "toolchain/toolchain-external/toolchain-external-custom/Config.in"
endchoice
choice
prompt "Toolchain origin"
# Keep compatibility with old defconfig files that are using
# custom toolchains, and which are therefore assuming that
# "preinstalled" in the default choice.
default BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
config BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
bool "Toolchain to be downloaded and installed"
help
Select this option if you want Buildroot to download and install the
toolchain. If you have selected a custom toolchain, specify the URL
in BR2_TOOLCHAIN_EXTERNAL_URL.
config BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED
bool "Pre-installed toolchain"
help
Select this option if you want to use a pre-installed toolchain.
Specify the path to this toolchain in BR2_TOOLCHAIN_EXTERNAL_PATH.
endchoice
config BR2_TOOLCHAIN_EXTERNAL_PATH
string "Toolchain path"
default "/path/to/toolchain/usr"
depends on BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED
help
Path to where the external toolchain is installed.
config BR2_TOOLCHAIN_EXTERNAL_GLIBC
bool
select BR2_TOOLCHAIN_USES_GLIBC
config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
bool
select BR2_TOOLCHAIN_USES_UCLIBC
config BR2_TOOLCHAIN_EXTERNAL_MUSL
bool
select BR2_TOOLCHAIN_USES_MUSL
# Compatibility headers: cdefs.h, queue.h
select BR2_PACKAGE_MUSL_COMPAT_HEADERS
# Make sure the virtual-package infra checks the provider
config BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL
bool
default y
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
string
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
string
# Kept toolchains sorted as in the choice above
# The toolchain Config.in.options must define
# BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL and BR2_TOOLCHAIN_EXTERNAL_PREFIX
# Aarch64
source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options"
# ARC
source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options"
# ARM
source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options"
# ARM big-endian
source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options"
# MIPS
source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options"
source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options"
source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options"
# NIOSII
source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options"
# SH4a
source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options"
# x86/x86_64
source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options"
source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options"
# Custom toolchains
source "toolchain/toolchain-external/toolchain-external-custom/Config.in.options"
config BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
bool "Copy gdb server to the Target"
depends on BR2_TOOLCHAIN_EXTERNAL
help
Copy the gdbserver provided by the external toolchain to the
target.
endif # BR2_TOOLCHAIN_EXTERNAL

View File

@@ -0,0 +1,609 @@
################################################################################
# External toolchain package infrastructure
#
# This package infrastructure implements the support for external
# toolchains, i.e toolchains that are available pre-built, ready to
# use. Such toolchain may either be readily available on the Web
# (Linaro, Sourcery CodeBench, from processor vendors) or may be built
# with tools like Crosstool-NG or Buildroot itself. So far, we have
# tested this with:
#
# * Toolchains generated by Crosstool-NG
# * Toolchains generated by Buildroot
# * Toolchains provided by Linaro for the ARM and AArch64
# architectures
# * Sourcery CodeBench toolchains (from Mentor Graphics) for the ARM,
# MIPS, PowerPC, x86, x86_64 and NIOS 2 architectures. For the MIPS
# toolchain, the -muclibc variant isn't supported yet, only the
# default glibc-based variant is.
# * Xilinx toolchains for the Microblaze architecture
# * Synopsys DesignWare toolchains for ARC cores
#
# The basic principle is the following
#
# 1. If the toolchain is not pre-installed, download and extract it
# in $(TOOLCHAIN_EXTERNAL_INSTALL_DIR). Otherwise,
# $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) points to were the toolchain has
# already been installed by the user.
#
# 2. For all external toolchains, perform some checks on the
# conformity between the toolchain configuration described in the
# Buildroot menuconfig system, and the real configuration of the
# external toolchain. This is for example important to make sure that
# the Buildroot configuration system knows whether the toolchain
# supports RPC, IPv6, locales, large files, etc. Unfortunately, these
# things cannot be detected automatically, since the value of these
# options (such as BR2_TOOLCHAIN_HAS_NATIVE_RPC) are needed at
# configuration time because these options are used as dependencies
# for other options. And at configuration time, we are not able to
# retrieve the external toolchain configuration.
#
# 3. Copy the libraries needed at runtime to the target directory,
# $(TARGET_DIR). Obviously, things such as the C library, the dynamic
# loader and a few other utility libraries are needed if dynamic
# applications are to be executed on the target system.
#
# 4. Copy the libraries and headers to the staging directory. This
# will allow all further calls to gcc to be made using --sysroot
# $(STAGING_DIR), which greatly simplifies the compilation of the
# packages when using external toolchains. So in the end, only the
# cross-compiler binaries remains external, all libraries and headers
# are imported into the Buildroot tree.
#
# 5. Build a toolchain wrapper which executes the external toolchain
# with a number of arguments (sysroot/march/mtune/..) hardcoded,
# so we're sure the correct configuration is always used and the
# toolchain behaves similar to an internal toolchain.
# This toolchain wrapper and symlinks are installed into
# $(HOST_DIR)/usr/bin like for the internal toolchains, and the rest
# of Buildroot is handled identical for the 2 toolchain types.
################################################################################
#
# Definitions of where the toolchain can be found
#
TOOLCHAIN_EXTERNAL_PREFIX = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
else
TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
endif
ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),)
ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),)
# if no path set, figure it out from path
TOOLCHAIN_EXTERNAL_BIN := $(shell dirname $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc))
endif
else
TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin
endif
# If this is a buildroot toolchain, it already has a wrapper which we want to
# bypass. Since this is only evaluated after it has been extracted, we can use
# $(wildcard ...) here.
TOOLCHAIN_EXTERNAL_SUFFIX = \
$(if $(wildcard $(TOOLCHAIN_EXTERNAL_BIN)/*.br_real),.br_real)
TOOLCHAIN_EXTERNAL_CROSS = $(TOOLCHAIN_EXTERNAL_BIN)/$(TOOLCHAIN_EXTERNAL_PREFIX)-
TOOLCHAIN_EXTERNAL_CC = $(TOOLCHAIN_EXTERNAL_CROSS)gcc$(TOOLCHAIN_EXTERNAL_SUFFIX)
TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++$(TOOLCHAIN_EXTERNAL_SUFFIX)
TOOLCHAIN_EXTERNAL_FC = $(TOOLCHAIN_EXTERNAL_CROSS)gfortran$(TOOLCHAIN_EXTERNAL_SUFFIX)
TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf$(TOOLCHAIN_EXTERNAL_SUFFIX)
# Normal handling of downloaded toolchain tarball extraction.
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
# As a regular package, the toolchain gets extracted in $(@D), but
# since it's actually a fairly special package, we need it to be moved
# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR.
define TOOLCHAIN_EXTERNAL_MOVE
rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
endef
endif
#
# Definitions of the list of libraries that should be copied to the target.
#
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
TOOLCHAIN_EXTERNAL_LIBS += libatomic.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* libnsl.so.* libresolv.so.* librt.so.* libutil.so.*
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_ARM_EABIHF),yy)
TOOLCHAIN_EXTERNAL_LIBS += ld-linux-armhf.so.*
else
TOOLCHAIN_EXTERNAL_LIBS += ld*.so.*
endif
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
TOOLCHAIN_EXTERNAL_LIBS += libpthread.so.*
ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),)
TOOLCHAIN_EXTERNAL_LIBS += libthread_db.so.*
endif # gdbserver
endif # ! no threads
endif
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y)
TOOLCHAIN_EXTERNAL_LIBS += libnss_files.so.* libnss_dns.so.* libmvec.so.* libanl.so.*
endif
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
TOOLCHAIN_EXTERNAL_LIBS += libc.so libgcc_s.so.*
endif
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
TOOLCHAIN_EXTERNAL_LIBS += libstdc++.so.*
endif
ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
TOOLCHAIN_EXTERNAL_LIBS += libgfortran.so.*
# fortran needs quadmath on x86 and x86_64
ifeq ($(BR2_TOOLCHAIN_HAS_LIBQUADMATH),y)
TOOLCHAIN_EXTERNAL_LIBS += libquadmath.so*
endif
endif
TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS))
#
# Definition of the CFLAGS to use with the external toolchain, as well as the
# common toolchain wrapper build arguments
#
ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU))
else
CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
endif
CC_TARGET_ARCH_ := $(call qstrip,$(BR2_GCC_TARGET_ARCH))
CC_TARGET_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_ABI))
CC_TARGET_FPU_ := $(call qstrip,$(BR2_GCC_TARGET_FPU))
CC_TARGET_FLOAT_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI))
CC_TARGET_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_MODE))
# march/mtune/floating point mode needs to be passed to the external toolchain
# to select the right multilib variant
ifeq ($(BR2_x86_64),y)
TOOLCHAIN_EXTERNAL_CFLAGS += -m64
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_64
endif
ifneq ($(CC_TARGET_ARCH_),)
TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_)
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"'
endif
ifneq ($(CC_TARGET_CPU_),)
TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_)
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"'
endif
ifneq ($(CC_TARGET_ABI_),)
TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
endif
ifneq ($(CC_TARGET_FPU_),)
TOOLCHAIN_EXTERNAL_CFLAGS += -mfpu=$(CC_TARGET_FPU_)
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FPU='"$(CC_TARGET_FPU_)"'
endif
ifneq ($(CC_TARGET_FLOAT_ABI_),)
TOOLCHAIN_EXTERNAL_CFLAGS += -mfloat-abi=$(CC_TARGET_FLOAT_ABI_)
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FLOAT_ABI='"$(CC_TARGET_FLOAT_ABI_)"'
endif
ifneq ($(CC_TARGET_MODE_),)
TOOLCHAIN_EXTERNAL_CFLAGS += -m$(CC_TARGET_MODE_)
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MODE='"$(CC_TARGET_MODE_)"'
endif
ifeq ($(BR2_BINFMT_FLAT),y)
TOOLCHAIN_EXTERNAL_CFLAGS += -Wl,-elf2flt
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_BINFMT_FLAT
endif
ifeq ($(BR2_mipsel)$(BR2_mips64el),y)
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MIPS_TARGET_LITTLE_ENDIAN
TOOLCHAIN_EXTERNAL_CFLAGS += -EL
endif
ifeq ($(BR2_mips)$(BR2_mips64),y)
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MIPS_TARGET_BIG_ENDIAN
TOOLCHAIN_EXTERNAL_CFLAGS += -EB
endif
ifeq ($(BR2_arceb),y)
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ARC_TARGET_BIG_ENDIAN
TOOLCHAIN_EXTERNAL_CFLAGS += -EB
endif
TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION))
ifeq ($(BR2_SOFT_FLOAT),y)
TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_SOFTFLOAT=1
endif
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
-DBR_CROSS_PATH_SUFFIX='"$(TOOLCHAIN_EXTERNAL_SUFFIX)"'
ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),)
# TOOLCHAIN_EXTERNAL_BIN points outside HOST_DIR => absolute path
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
-DBR_CROSS_PATH_ABS='"$(TOOLCHAIN_EXTERNAL_BIN)"'
else
# TOOLCHAIN_EXTERNAL_BIN points inside HOST_DIR => relative path
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
-DBR_CROSS_PATH_REL='"$(TOOLCHAIN_EXTERNAL_BIN:$(HOST_DIR)/%=%)"'
endif
#
# The following functions creates the symbolic links needed to get the
# cross-compilation tools visible in $(HOST_DIR)/usr/bin. Some of
# links are done directly to the corresponding tool in the external
# toolchain installation directory, while some other links are done to
# the toolchain wrapper (preprocessor, C, C++ and Fortran compiler)
#
# We skip gdb symlink when we are building our own gdb to prevent two
# gdb's in $(HOST_DIR)/usr/bin.
#
# The LTO support in gcc creates wrappers for ar, ranlib and nm which load
# the lto plugin. These wrappers are called *-gcc-ar, *-gcc-ranlib, and
# *-gcc-nm and should be used instead of the real programs when -flto is
# used. However, we should not add the toolchain wrapper for them, and they
# match the *cc-* pattern. Therefore, an additional case is added for *-ar,
# *-ranlib and *-nm.
define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
$(Q)cd $(HOST_DIR)/usr/bin; \
for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
base=$${i##*/}; \
case "$$base" in \
*-ar|*-ranlib|*-nm) \
ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
;; \
*cc|*cc-*|*++|*++-*|*cpp|*-gfortran) \
ln -sf toolchain-wrapper $$base; \
;; \
*gdb|*gdbtui) \
if test "$(BR2_PACKAGE_HOST_GDB)" != "y"; then \
ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
fi \
;; \
*) \
ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
;; \
esac; \
done
endef
# Various utility functions used by the external toolchain package
# infrastructure. Those functions are mainly responsible for:
#
# - installation the toolchain libraries to $(TARGET_DIR)
# - copying the toolchain sysroot to $(STAGING_DIR)
# - installing a gdbinit file
#
# Details about sysroot directory selection.
#
# To find the sysroot directory, we use the trick of looking for the
# 'libc.a' file with the -print-file-name gcc option, and then
# mangling the path to find the base directory of the sysroot.
#
# Note that we do not use the -print-sysroot option, because it is
# only available since gcc 4.4.x, and we only recently dropped support
# for 4.2.x and 4.3.x.
#
# When doing this, we don't pass any option to gcc that could select a
# multilib variant (such as -march) as we want the "main" sysroot,
# which contains all variants of the C library in the case of multilib
# toolchains. We use the TARGET_CC_NO_SYSROOT variable, which is the
# path of the cross-compiler, without the --sysroot=$(STAGING_DIR),
# since what we want to find is the location of the original toolchain
# sysroot. This "main" sysroot directory is stored in SYSROOT_DIR.
#
# Then, multilib toolchains are a little bit more complicated, since
# they in fact have multiple sysroots, one for each variant supported
# by the toolchain. So we need to find the particular sysroot we're
# interested in.
#
# To do so, we ask the compiler where its sysroot is by passing all
# flags (including -march and al.), except the --sysroot flag since we
# want to the compiler to tell us where its original sysroot
# is. ARCH_SUBDIR will contain the subdirectory, in the main
# SYSROOT_DIR, that corresponds to the selected architecture
# variant. ARCH_SYSROOT_DIR will contain the full path to this
# location.
#
# One might wonder why we don't just bother with ARCH_SYSROOT_DIR. The
# fact is that in multilib toolchains, the header files are often only
# present in the main sysroot, and only the libraries are available in
# each variant-specific sysroot directory.
# toolchain_find_sysroot returns the sysroot location for the given
# compiler + flags. We need to handle cases where libc.a is in:
#
# - lib/
# - usr/lib/
# - lib32/
# - lib64/
# - lib32-fp/ (Cavium toolchain)
# - lib64-fp/ (Cavium toolchain)
# - usr/lib/<tuple>/ (Linaro toolchain)
#
# And variations on these.
define toolchain_find_sysroot
$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
endef
# Returns the lib subdirectory for the given compiler + flags (i.e
# typically lib32 or lib64 for some toolchains)
define toolchain_find_libdir
$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:')
endef
# Returns the location of the libc.a file for the given compiler + flags
define toolchain_find_libc_a
$$(readlink -f $$(LANG=C $(1) -print-file-name=libc.a))
endef
# Integration of the toolchain into Buildroot: find the main sysroot
# and the variant-specific sysroot, then copy the needed libraries to
# the $(TARGET_DIR) and copy the whole sysroot (libraries and headers)
# to $(STAGING_DIR).
#
# Variables are defined as follows:
#
# SYSROOT_DIR: the main sysroot directory, deduced from the location of
# the libc.a file in the default multilib variant, by
# removing the usr/lib[32|64]/libc.a part of the path.
# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/
#
# ARCH_SYSROOT_DIR: the sysroot of the selected multilib variant,
# deduced from the location of the libc.a file in the
# selected multilib variant (taking into account the
# CFLAGS), by removing usr/lib[32|64]/libc.a at the end
# of the path.
# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/
#
# ARCH_LIB_DIR: 'lib', 'lib32' or 'lib64' depending on where libraries
# are stored. Deduced from the location of the libc.a file
# in the selected multilib variant, by looking at
# usr/lib??/libc.a.
# Ex: lib
#
# ARCH_SUBDIR: the relative location of the sysroot of the selected
# multilib variant compared to the main sysroot.
# Ex: mips16/soft-float/el
#
# SUPPORT_LIB_DIR: some toolchains, such as recent Linaro toolchains,
# store GCC support libraries (libstdc++,
# libgcc_s, etc.) outside of the sysroot. In
# this case, SUPPORT_LIB_DIR is set to a
# non-empty value, and points to the directory
# where these support libraries are
# available. Those libraries will be copied to
# our sysroot, and the directory will also be
# considered when searching libraries for copy
# to the target filesystem.
#
# Please be very careful to check the major toolchain sources:
# Buildroot, Crosstool-NG, CodeSourcery and Linaro
# before doing any modification on the below logic.
ifeq ($(BR2_STATIC_LIBS),)
define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS
$(Q)$(call MESSAGE,"Copying external toolchain libraries to target...")
$(Q)for libs in $(TOOLCHAIN_EXTERNAL_LIBS); do \
$(call copy_toolchain_lib_root,$$libs); \
done
endef
endif
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),y)
define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER
$(Q)$(call MESSAGE,"Copying gdbserver")
$(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
gdbserver_found=0 ; \
for d in $${ARCH_SYSROOT_DIR}/usr \
$${ARCH_SYSROOT_DIR}/../debug-root/usr \
$${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \
$(TOOLCHAIN_EXTERNAL_INSTALL_DIR); do \
if test -f $${d}/bin/gdbserver ; then \
install -m 0755 -D $${d}/bin/gdbserver $(TARGET_DIR)/usr/bin/gdbserver ; \
gdbserver_found=1 ; \
break ; \
fi ; \
done ; \
if [ $${gdbserver_found} -eq 0 ] ; then \
echo "Could not find gdbserver in external toolchain" ; \
exit 1 ; \
fi
endef
endif
define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS
$(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \
ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
SUPPORT_LIB_DIR="" ; \
if test `find $${ARCH_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \
LIBSTDCPP_A_LOCATION=$$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \
if [ -e "$${LIBSTDCPP_A_LOCATION}" ]; then \
SUPPORT_LIB_DIR=`readlink -f $${LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \
fi ; \
fi ; \
if [ "$${SYSROOT_DIR}" == "$${ARCH_SYSROOT_DIR}" ] ; then \
ARCH_SUBDIR="" ; \
elif [ "`dirname $${ARCH_SYSROOT_DIR}`" = "`dirname $${SYSROOT_DIR}`" ] ; then \
SYSROOT_DIR_DIRNAME=`dirname $${SYSROOT_DIR}`/ ; \
ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR_DIRNAME}(.*)/$$:\1:"` ; \
else \
ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
fi ; \
$(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \
$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR})
endef
# Create a symlink from (usr/)$(ARCH_LIB_DIR) to lib.
# Note: the skeleton package additionally creates lib32->lib or lib64->lib
# (as appropriate)
#
# $1: destination directory (TARGET_DIR / STAGING_DIR)
create_lib_symlinks = \
$(Q)DESTDIR="$(strip $1)" ; \
ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
if [ ! -e "$${DESTDIR}/$${ARCH_LIB_DIR}" -a ! -e "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ]; then \
ln -snf lib "$${DESTDIR}/$${ARCH_LIB_DIR}" ; \
ln -snf lib "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ; \
fi
define TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK
$(call create_lib_symlinks,$(STAGING_DIR))
endef
define TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK
$(call create_lib_symlinks,$(TARGET_DIR))
endef
#
# Generate gdbinit file for use with Buildroot
#
define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT
$(Q)if test -f $(TARGET_CROSS)gdb ; then \
$(call MESSAGE,"Installing gdbinit"); \
$(gen_gdbinit_file); \
fi
endef
# Various utility functions used by the external toolchain based on musl.
# With the musl C library, the libc.so library directly plays the role
# of the dynamic library loader. We just need to create a symbolic
# link to libc.so with the appropriate name.
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL):$(BR2_STATIC_LIBS),y:)
ifeq ($(BR2_i386),y)
MUSL_ARCH = i386
else ifeq ($(BR2_ARM_EABIHF),y)
MUSL_ARCH = armhf
else ifeq ($(BR2_mips):$(BR2_SOFT_FLOAT),y:y)
MUSL_ARCH = mips-sf
else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y)
MUSL_ARCH = mipsel-sf
else ifeq ($(BR2_sh),y)
MUSL_ARCH = sh
else
MUSL_ARCH = $(ARCH)
endif
define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1
endef
endif
# uClibc-ng dynamic loader is called ld-uClibc.so.1, but gcc is not
# patched specifically for uClibc-ng, so it continues to generate
# binaries that expect the dynamic loader to be named ld-uClibc.so.0,
# like with the original uClibc. Therefore, we create an additional
# symbolic link to make uClibc-ng systems work properly.
define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO
$(Q)if test -e $(TARGET_DIR)/lib/ld-uClibc.so.1; then \
ln -sf ld-uClibc.so.1 $(TARGET_DIR)/lib/ld-uClibc.so.0 ; \
fi
$(Q)if test -e $(TARGET_DIR)/lib/ld64-uClibc.so.1; then \
ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \
fi
endef
################################################################################
# inner-toolchain-external-package -- defines the generic installation rules
# for external toolchain packages
#
# argument 1 is the lowercase package name
# argument 2 is the uppercase package name, including a HOST_ prefix
# for host packages
# argument 3 is the uppercase package name, without the HOST_ prefix
# for host packages
# argument 4 is the type (target or host)
################################################################################
define inner-toolchain-external-package
$(2)_INSTALL_STAGING = YES
$(2)_ADD_TOOLCHAIN_DEPENDENCY = NO
# In fact, we don't need to download the toolchain, since it is already
# available on the system, so force the site and source to be empty so
# that nothing will be downloaded/extracted.
ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y)
$(2)_SITE =
$(2)_SOURCE =
endif
ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
$(2)_EXCLUDES = usr/lib/locale/*
$(2)_POST_EXTRACT_HOOKS += \
TOOLCHAIN_EXTERNAL_MOVE
endif
# Checks for an already installed toolchain: check the toolchain
# location, check that it is usable, and then verify that it
# matches the configuration provided in Buildroot: ABI, C++ support,
# kernel headers version, type of C library and all C library features.
define $(2)_CONFIGURE_CMDS
$$(Q)$$(call check_cross_compiler_exists,$$(TOOLCHAIN_EXTERNAL_CC))
$$(Q)$$(call check_unusable_toolchain,$$(TOOLCHAIN_EXTERNAL_CC))
$$(Q)SYSROOT_DIR="$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC))" ; \
$$(call check_kernel_headers_version,\
$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC)),\
$$(call qstrip,$$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
$$(call check_gcc_version,$$(TOOLCHAIN_EXTERNAL_CC),\
$$(call qstrip,$$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \
if test "$$(BR2_arm)" = "y" ; then \
$$(call check_arm_abi,\
"$$(TOOLCHAIN_EXTERNAL_CC) $$(TOOLCHAIN_EXTERNAL_CFLAGS)",\
$$(TOOLCHAIN_EXTERNAL_READELF)) ; \
fi ; \
if test "$$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
$$(call check_cplusplus,$$(TOOLCHAIN_EXTERNAL_CXX)) ; \
fi ; \
if test "$$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \
$$(call check_fortran,$$(TOOLCHAIN_EXTERNAL_FC)) ; \
fi ; \
if test "$$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \
$$(call check_uclibc,$$$${SYSROOT_DIR}) ; \
elif test "$$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \
$$(call check_musl,$$$${SYSROOT_DIR}) ; \
else \
$$(call check_glibc,$$$${SYSROOT_DIR}) ; \
fi
$$(Q)$$(call check_toolchain_ssp,$$(TOOLCHAIN_EXTERNAL_CC))
endef
$(2)_TOOLCHAIN_WRAPPER_ARGS += $$(TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS)
$(2)_BUILD_CMDS = $$(TOOLCHAIN_WRAPPER_BUILD)
define $(2)_INSTALL_STAGING_CMDS
$$(TOOLCHAIN_WRAPPER_INSTALL)
$$(TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK)
$$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS)
$$(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER)
$$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
endef
ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
$(2)_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
endif
# Even though we're installing things in both the staging, the host
# and the target directory, we do everything within the
# install-staging step, arbitrarily.
define $(2)_INSTALL_TARGET_CMDS
$$(TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK)
$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS)
$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER)
$$(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
endef
# Call the generic package infrastructure to generate the necessary
# make targets
$(call inner-generic-package,$(1),$(2),$(3),$(4))
endef
toolchain-external-package = $(call inner-toolchain-external-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)

View File

@@ -0,0 +1,61 @@
config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
bool "Codescape IMG GNU Linux Toolchain 2016.05"
depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on BR2_MIPS_CPU_MIPS32R6 || (BR2_MIPS_CPU_MIPS64R6 && !BR2_MIPS_SOFT_FLOAT)
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_INSTALL_LIBSTDCPP
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
select BR2_TOOLCHAIN_HAS_FORTRAN
help
Codescape IMG GNU Linux Toolchain 2016.05 for the MIPS
architecture, from Imagination Technologies. It uses gcc
4.9.2, binutils 2.24.90, glibc 2.20, gdb 7.9.1 and kernel
headers 4.7. It has support for the following variants:
- MIPS32r6 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
Select 'MIPS (big endian)' Target Architecture
Select 'mips 32r6' Target Architecture Variant
Disable 'Use soft-float'
- MIPS32r6 - Big-Endian, Soft-Float, 2008 NaN, o32 ABI
Select 'MIPS (big endian)' Target Architecture
Select 'mips 32r6' Target Architecture Variant
Enable 'Use soft-float'
- MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
Select 'MIPS (little endian)' Target Architecture
Select 'mips 32r6' Target Architecture Variant
Disable 'Use soft-float'
- MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI
Select 'MIPS (little endian)' Target Architecture
Select 'mips 32r6' Target Architecture Variant
Enable 'Use soft-float'
- MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
Select 'MIPS (little endian)' Target Architecture
Select 'mips 32r6' Target Architecture Variant
Disable 'Use soft-float'
Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
- MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI, microMIPS
Select 'MIPS (little endian)' Target Architecture
Select 'mips 32r6' Target Architecture Variant
Enable 'Use soft-float'
Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
- MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n32 ABI
Select 'MIPS64 (big endian)' Target Architecture
Select 'mips 64r6' Target Architecture Variant
Select 'n32' Target ABI
Disable 'Use soft-float'
- MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n32 ABI
Select 'MIPS64 (little endian)' Target Architecture
Select 'mips 64r6' Target Architecture Variant
Select 'n32' Target ABI
Disable 'Use soft-float'
- MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n64 ABI
Select 'MIPS64 (big endian)' Target Architecture
Select 'mips 64r6' Target Architecture Variant
Select 'n64' Target ABI
Disable 'Use soft-float'
- MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n64 ABI
Select 'MIPS64 (little endian)' Target Architecture
Select 'mips 64r6' Target Architecture Variant
Select 'n64' Target ABI
Disable 'Use soft-float'

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "mips-img-linux-gnu"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-codescape-img-mips"
endif

View File

@@ -0,0 +1,4 @@
# Codescape toolchains from Imagination Technologies
# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-06/downloads.html
sha256 8d9cdf711dd402d7bf82883d425c221038fe8ce9d0c91a3f6b30939d9d55476c Codescape.GNU.Tools.Package.2016.05-06.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
sha256 6e2784d6df962fe4db7510c8a62ce3947b73f54207b10e18b52da59d1bc487bd Codescape.GNU.Tools.Package.2016.05-06.for.MIPS.IMG.Linux.CentOS-5.x86_64.tar.gz

View File

@@ -0,0 +1,51 @@
################################################################################
#
# toolchain-external-codescape-img-mips
#
################################################################################
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION = 2016.05-06
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION)
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STRIP_COMPONENTS = 2
ifeq ($(HOSTARCH),x86)
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION).for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
else
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION).for.MIPS.IMG.Linux.CentOS-5.x86_64.tar.gz
endif
# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
# tools in the appropriate location.
ifeq ($(BR2_MIPS_OABI32),y)
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = o32
else ifeq ($(BR2_MIPS_NABI32),y)
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = n32
else ifeq ($(BR2_MIPS_NABI64),y)
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = n64
endif
define TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STAGING_FIXUPS
rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
endef
# The Codescape toolchain uses a sysroot layout that places them
# side-by-side instead of nested like multilibs. A symlink is needed
# much like for the nested sysroots which are handled in
# copy_toolchain_sysroot but there is not enough information in there
# to determine whether the sysroot layout was nested or side-by-side.
# Add the symlink here for now.
define TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SYMLINK
$(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))"; \
ARCH_SUBDIR=`basename $${ARCH_SYSROOT_DIR}`; \
ln -snf . $(STAGING_DIR)/$${ARCH_SUBDIR}
endef
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_POST_INSTALL_STAGING_HOOKS += \
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STAGING_FIXUPS \
TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SYMLINK
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,72 @@
config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
bool "Codescape MTI GNU Linux Toolchain 2016.05"
depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on BR2_MIPS_CPU_MIPS32R2 || (BR2_MIPS_CPU_MIPS64R2 && !BR2_MIPS_SOFT_FLOAT) || \
BR2_MIPS_CPU_MIPS32R5 || (BR2_MIPS_CPU_MIPS64R5 && !BR2_MIPS_SOFT_FLOAT)
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_INSTALL_LIBSTDCPP
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
select BR2_TOOLCHAIN_HAS_FORTRAN
help
Codescape MTI GNU Linux Toolchain 2016.05 for the MIPS
architecture, from Imagination Technologies. It uses gcc
4.9.2, binutils 2.24.90, glibc 2.20, gdb 7.9.1 and kernel
headers 4.7. It has support for the following variants:
- MIPS32r2 - Big-Endian, Hard-Float, Legacy NaN, o32 ABI
Select 'MIPS (big endian)' Target Architecture
Select 'mips 32r2' Target Architecture Variant
Disable 'Use soft-float'
- MIPS32r2 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
Select 'MIPS (big endian)' Target Architecture
Select 'mips 32r2' Target Architecture Variant
Disable 'Use soft-float'
Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
- MIPS32r2 - Big-Endian, Soft-Float, Legacy NaN, o32 ABI
Select 'MIPS (big endian)' Target Architecture
Select 'mips 32r2' Target Architecture Variant
Enable 'Use soft-float'
- MIPS32r2 - Little-Endian, Hard-Float, Legacy NaN, o32 ABI
Select 'MIPS (little endian)' Target Architecture
Select 'mips 32r2' Target Architecture Variant
Disable 'Use soft-float'
- MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
Select 'MIPS (little endian)' Target Architecture
Select 'mips 32r2' Target Architecture Variant
Disable 'Use soft-float'
Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
- MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI
Select 'MIPS (little endian)' Target Architecture
Select 'mips 32r2' Target Architecture Variant
Enable 'Use soft-float'
- MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
Select 'MIPS (little endian)' Target Architecture
Select 'mips 32r2' Target Architecture Variant
Enable 'Use soft-float'
Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
- MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI, microMIPS
Select 'MIPS (little endian)' Target Architecture
Select 'mips 32r2' Target Architecture Variant
Disable 'Use soft-float'
Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
- MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n32 ABI
Select 'MIPS64 (big endian)' Target Architecture
Select 'mips 64r2' Target Architecture Variant
Select 'n32' Target ABI
Disable 'Use soft-float'
- MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n32 ABI
Select 'MIPS64 (little endian)' Target Architecture
Select 'mips 64r2' Target Architecture Variant
Select 'n32' Target ABI
Disable 'Use soft-float'
- MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n64 ABI
Select 'MIPS64 (big endian)' Target Architecture
Select 'mips 64r2' Target Architecture Variant
Select 'n64' Target ABI
Disable 'Use soft-float'
- MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n64 ABI
Select 'MIPS64 (little endian)' Target Architecture
Select 'mips 64r2' Target Architecture Variant
Select 'n64' Target ABI
Disable 'Use soft-float'

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "mips-mti-linux-gnu"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-codescape-mti-mips"
endif

View File

@@ -0,0 +1,4 @@
# Codescape toolchains from Imagination Technologies
# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-06/downloads.html
sha256 3a7aba259beb05f0e3054b5a61a368a5085447f47361949a938ac9cc7de4227b Codescape.GNU.Tools.Package.2016.05-06.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
sha256 a676a8b3647c8c651fb8935a75db8f00b79d36ec55676f7c05bac12b550788f7 Codescape.GNU.Tools.Package.2016.05-06.for.MIPS.MTI.Linux.CentOS-5.x86_64.tar.gz

View File

@@ -0,0 +1,51 @@
################################################################################
#
# toolchain-external-codescape-mti-mips
#
################################################################################
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION = 2016.05-06
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION)
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STRIP_COMPONENTS = 2
ifeq ($(HOSTARCH),x86)
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION).for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
else
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION).for.MIPS.MTI.Linux.CentOS-5.x86_64.tar.gz
endif
# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
# tools in the appropriate location.
ifeq ($(BR2_MIPS_OABI32),y)
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = o32
else ifeq ($(BR2_MIPS_NABI32),y)
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n32
else ifeq ($(BR2_MIPS_NABI64),y)
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n64
endif
define TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS
rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
endef
# The Codescape toolchain uses a sysroot layout that places them
# side-by-side instead of nested like multilibs. A symlink is needed
# much like for the nested sysroots which are handled in
# copy_toolchain_sysroot but there is not enough information in there
# to determine whether the sysroot layout was nested or side-by-side.
# Add the symlink here for now.
define TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SYMLINK
$(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))"; \
ARCH_SUBDIR=`basename $${ARCH_SYSROOT_DIR}`; \
ln -snf . $(STAGING_DIR)/$${ARCH_SUBDIR}
endef
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_POST_INSTALL_STAGING_HOOKS += \
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS \
TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SYMLINK
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,17 @@
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
bool "CodeSourcery AArch64 2014.11"
depends on BR2_aarch64
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_INSTALL_LIBSTDCPP
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
help
Sourcery CodeBench toolchain for the AArch64 architecture,
from Mentor Graphics. It uses gcc 4.9.1, binutils
2.24.51.20140217, glibc 2.20, gdb 7.7.50 and kernel headers
3.16.2.

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "aarch64-amd-linux-gnu"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-codesourcery-aarch64"
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 405aada821146755c5f2df566375c2a682456d6b8451ee47b88cf1a52b093676 aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
sha256 3f50dd6ee433eb5b6992a1071b988e50379a738f54f58722bc60081613764716 aarch64-amd-2014.11-95-aarch64-amd-linux-gnu.src.tar.bz2

View File

@@ -0,0 +1,22 @@
################################################################################
#
# toolchain-external-codesourcery-aarch64
#
################################################################################
TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION = 2014.11-95
TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SOURCE = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_ACTUAL_SOURCE_TARBALL = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
ln -sf ld-2.20.so $(STAGING_DIR)/lib/ld-linux-aarch64.so.1
endef
TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
ln -sf ld-2.20.so $(TARGET_DIR)/lib/ld-linux-aarch64.so.1
endef
TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_POST_INSTALL_TARGET_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,25 @@
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
bool "Sourcery CodeBench AMD64 2016.11"
depends on BR2_x86_64
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on !BR2_STATIC_LIBS
depends on BR2_x86_jaguar || BR2_x86_steamroller
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_INSTALL_LIBSTDCPP
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
select BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615 # based-on binutils-2.26
help
Sourcery CodeBench toolchain for the amd64 (x86_64)
architectures, from Mentor Graphics. It uses gcc 6.2,
binutils 2.26, glibc 2.24, gdb 7.11 and kernel headers
4.7. It has support for the following variants:
- AMD Puma/Jaguar (family 16h), glibc
Default for x86_64, nothing special to do.
- AMD Steamroller (family 15h), glibc
Select a steamroller core.
No other architecture variants are supported since glibc
is optimized for one of these two baselines.

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "x86_64-amd-linux-gnu"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-codesourcery-amd64"
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 a6c23837dd45a33866c60a2fd8d7af40520cd84ff1059abda797952d7ee0fafd amd-2016.11-19-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
sha256 d61ce0b5648ad63cca16fe233c82e7eaa6a3212a549d69a527e7a2d5350f7b4a amd-2016.11-19-x86_64-amd-linux-gnu.src.tar.bz2

View File

@@ -0,0 +1,12 @@
################################################################################
#
# toolchain-external-codesourcery-amd64
#
################################################################################
TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_VERSION = 2016.11-19
TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_SOURCE = amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_ACTUAL_SOURCE_TARBALL = amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,35 @@
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
bool "Sourcery CodeBench ARM 2014.05"
depends on BR2_arm
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on BR2_ARM_EABI
# Unsupported ARM cores
depends on !BR2_cortex_a12 && !BR2_cortex_a17 && !BR2_ARM_CPU_ARMV8
depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_INSTALL_LIBSTDCPP
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
help
Sourcery CodeBench toolchain for the ARM architecture, from
Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc
2.18 and gdb 7.7.50, kernel headers 3.13. It has support
for the following variants:
- ARMv5TE, little endian, soft-float, glibc
Select ARM926T, ARM10T, XScale or another ARMv5 core
Select BR2_SOFT_FLOAT
- ARMv4T, little endian, soft-float, glibc
Select ARM720T, ARM920T, ARM922T or another ARMv4 core
Select BR2_SOFT_FLOAT
- ARMv7-A, Thumb 2, little endian, soft-float, glibc
Select Cortex-A8, Cortex-A9 or another ARMv7-A core
Select BR2_SOFT_FLOAT
Set BR2_TARGET_OPTIMIZATION to -mthumb
comment "Sourcery CodeBench toolchains available for the EABI ABI"
depends on BR2_arm
depends on !BR2_ARM_EABI
depends on !BR2_STATIC_LIBS

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "arm-none-linux-gnueabi"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-codesourcery-arm"
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 39ee0e789034334ecc89af94e838e3a4815400ac5ff980f808f466b04778532e arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
sha256 e16a5b1e41d7ff1e74161f9405182001bc8d1360d89564e73911032e6966cc0d arm-2014.05-29-arm-none-linux-gnueabi.src.tar.bz2

View File

@@ -0,0 +1,13 @@
################################################################################
#
# toolchain-external-codesourcery-arm
#
################################################################################
TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION = 2014.05-29
TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SOURCE = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_ACTUAL_SOURCE_TARBALL = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,93 @@
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
bool "Sourcery CodeBench MIPS 2016.05"
depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
depends on BR2_MIPS_CPU_MIPS32R2 || BR2_MIPS_CPU_MIPS64R2
# Unsupported MIPS cores
depends on !BR2_mips_interaptiv
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on !BR2_MIPS_NABI32
depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_INSTALL_LIBSTDCPP
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
select BR2_TOOLCHAIN_GCC_AT_LEAST_5
help
Sourcery CodeBench toolchain for the MIPS architecture, from
Mentor Graphics. It uses gcc 5.3, binutils 2.25.51, glibc
2.23, uClibc 0.9.30 and gdb 7.10.50, kernel headers 4.4.1. It
has support for the following variants:
- MIPS32r2 - Big-Endian, 2008 NaN, O32
Select MIPS (big endian) core
Disable BR2_SOFT_FLOAT
Set BR2_TARGET_OPTIMIZATION to -mnan=2008
- MIPS32r2 - Big-Endian, O32
Select MIPS (big endian) core
Disable BR2_SOFT_FLOAT
- MIPS32r2 - Big-Endian, O32, MIPS16
Select MIPS (big endian) core
Disable BR2_SOFT_FLOAT
Set BR2_TARGET_OPTIMIZATION to -mips16
- MIPS32r2 - Big-Endian, Soft-Float, O32
Select MIPS (big endian) core
Select BR2_SOFT_FLOAT
- MIPS32r2 - Big-Endian, Soft-Float, O32, MIPS16
Select MIPS (big endian) core
Select BR2_SOFT_FLOAT
Set BR2_TARGET_OPTIMIZATION to -mips16
- MIPS32r2 - Little-Endian, 2008 NaN, O32
Select MIPS (little endian) core
Disable BR2_SOFT_FLOAT
Set BR2_TARGET_OPTIMIZATION to -mnan=2008
- MIPS32r2 - Little-Endian, O32
Select MIPS (little endian) core
Disable BR2_SOFT_FLOAT
- MIPS32r2 - Little-Endian, O32, MIPS16
Select MIPS (little endian) core
Disable BR2_SOFT_FLOAT
Set BR2_TARGET_OPTIMIZATION to -mips16
- MIPS32r2 - Little-Endian, Soft-Float, O32
Select MIPS (little endian) core
Select BR2_SOFT_FLOAT
- MIPS32r2 - Little-Endian, Soft-Float, O32, MIPS16
Select MIPS (little endian) core
Select BR2_SOFT_FLOAT
Set BR2_TARGET_OPTIMIZATION to -mips16
- MIPS32r2 - Little-Endian, Soft-Float, O32, microMIPS
Select MIPS (little endian) core
Select BR2_SOFT_FLOAT
Set BR2_TARGET_OPTIMIZATION to -mmicromips
- MIPS32r2 - uClibc, Big-Endian, 2008 NaN, O32
Not usable in Buildroot yet.
- MIPS32r2 - uClibc, Big-Endian, O32
Not usable in Buildroot yet.
- MIPS32r2 - uClibc, Big-Endian, Soft-Float, O32
Not usable in Buildroot yet.
- MIPS32r2 - uClibc, Little-Endian, 2008 NaN, O32
Not usable in Buildroot yet.
- MIPS32r2 - uClibc, Little-Endian, O32
Not usable in Buildroot yet.
- MIPS32r2 - uClibc, Little-Endian, Soft-Float, O32
Not usable in Buildroot yet.
- MIPS64r2 - Big-Endian, N64
Select MIPS64 (big endian) core
Select the n64 ABI
Disable BR2_SOFT_FLOAT
- MIPS64r2 - Big-Endian, Soft-Float, N64
Select MIPS64 (big endian) core
Select the n64 ABI
Select BR2_SOFT_FLOAT
- MIPS64r2 - Little-Endian, N64
Select MIPS64 (little endian) core
Select the n64 ABI
Disable BR2_SOFT_FLOAT
- MIPS64r2 - Little-Endian, Soft-Float, N64
Select MIPS64 (little endian) core
Select the n64 ABI
Select BR2_SOFT_FLOAT
comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64"
depends on BR2_MIPS_NABI32
depends on !BR2_STATIC_LIBS

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "mips-linux-gnu"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-codesourcery-mips"
endif

View File

@@ -0,0 +1,3 @@
# Locally computed
sha256 d354447c4c5160439dafd5464fa3a0266dd41e79f973477238e4f0215a6b5397 mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
sha256 2658e55d5b71bba25d6f77e868e18b200ea5f75c8add7ed3a9266e716d9adfff mips-2016.05-8-mips-linux-gnu.src.tar.bz2

View File

@@ -0,0 +1,13 @@
################################################################################
#
# toolchain-external-codesourcery-mips
#
################################################################################
TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION = 2016.05-8
TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SOURCE = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_ACTUAL_SOURCE_TARBALL = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,17 @@
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
bool "Sourcery CodeBench Nios-II 2016.11"
depends on BR2_nios2
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_INSTALL_LIBSTDCPP
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
select BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # based-on binutils-2.26
help
Sourcery CodeBench toolchain for the Nios-II architecture,
from Mentor Graphics. It uses gcc 6.2, binutils 2.26,
glibc 2.24, gdb 7.11 and kernel headers 4.7.

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "nios2-linux-gnu"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-codesourcery-niosII"
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 97e3b878c67e46430f2b9a42b11bc95b1ef9fef263e6b5ee9103d1239c9e847d sourceryg++-2016.11-32-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
sha256 ee2c4391137be8fee987411301bbf9f0e4a823400e37c9f8c1cae9900485cbca sourceryg++-2016.11-32-nios2-linux-gnu.src.tar.bz2

View File

@@ -0,0 +1,13 @@
################################################################################
#
# toolchain-external-codesourcery-niosII
#
################################################################################
TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION = 2016.11-32
TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SOURCE = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_ACTUAL_SOURCE_TARBALL = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,25 @@
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
bool "Sourcery CodeBench SH 2012.09"
depends on BR2_sh4a || BR2_sh4aeb
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_INSTALL_LIBSTDCPP
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
help
Sourcery CodeBench toolchain for the SuperH architecture,
from Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51,
glibc 2.16, uClibc 0.9.30, gdb 7.4.50 and kernel headers
3.5.4. It has support for the following variants:
- SH4A, glibc, little endian
Default.
- SH4A, glibc, big endian
Add -mb to BR2_TARGET_OPTIMIZATION
- SH4A, uClibc, little endian
Not usable in Buildroot yet.
- SH4A, uClibc, big endian
Not usable in Buildroot yet.

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "sh-linux-gnu"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-codesourcery-sh"
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802 renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
sha256 e2e58c10e52395d5d35157e35f85233f713c6f9223a652dfc56194cfd2eed004 renesas-2012.09-61-sh-linux-gnu.src.tar.bz2

View File

@@ -0,0 +1,13 @@
################################################################################
#
# toolchain-external-sourcery-sh
#
################################################################################
TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_VERSION = 2012.09-61
TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_SOURCE = renesas-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_ACTUAL_SOURCE_TARBALL = renesas-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,29 @@
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
bool "Sourcery CodeBench x86/x86_64 2012.09"
depends on BR2_i386 || BR2_x86_64
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on !BR2_STATIC_LIBS
depends on !BR2_x86_jaguar
depends on !BR2_x86_steamroller
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_INSTALL_LIBSTDCPP
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
help
Sourcery CodeBench toolchain for the x86/x86_64
architectures, from Mentor Graphics. It uses gcc 4.7.2,
binutils 2.23.51, glibc 2.16, gdb 7.4.50 and kernel headers
3.5.4. It has support for the following variants:
- Intel Pentium 4, glibc, 32 bits
Default for x86, nothing special to do.
- Intel Atom, glibc, 32 bits
Select an Atom core
- Intel Xeon, glibc, 64 bits
Default for x86_64, nothing special to do.
- Intel Core 2, glibc, 64 bits
Select a Core 2 core
Other architecture variants (beyond Pentium-4/Xeon) are
supported as well, but glibc is not optimised for it.

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "i686-pc-linux-gnu"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-codesourcery-x86"
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458 ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717 ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2

View File

@@ -0,0 +1,12 @@
################################################################################
#
# toolchain-external-codesourcery-x86
#
################################################################################
TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_VERSION = 2012.09-62
TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_SOURCE = ia32-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i386-linux.tar.bz2
TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_ACTUAL_SOURCE_TARBALL = ia32-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,5 @@
config BR2_TOOLCHAIN_EXTERNAL_CUSTOM
bool "Custom toolchain"
help
Use this option to use a custom toolchain pre-installed on
your system.

View File

@@ -0,0 +1,349 @@
if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-custom"
config BR2_TOOLCHAIN_EXTERNAL_URL
string "Toolchain URL"
depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
help
URL of the custom toolchain tarball to download and install.
config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
string "Toolchain prefix"
default "$(ARCH)-linux"
choice
bool "External toolchain gcc version"
default BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
help
Set to the gcc version that is used by your external
toolchain.
config BR2_TOOLCHAIN_EXTERNAL_GCC_6
bool "6.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
config BR2_TOOLCHAIN_EXTERNAL_GCC_5
bool "5.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_5
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9
bool "4.9.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8
bool "4.8.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7
bool "4.7.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6
bool "4.6.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5
bool "4.5.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4
bool "4.4.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
bool "4.3.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
config BR2_TOOLCHAIN_EXTERNAL_GCC_OLD
bool "older"
help
Use this option if your GCC version is older than any of the
above.
Note that the Buildroot community doesn't do any testing with
such old toolchains. Some packages may fail to build in
surprising ways, or the generated root filesystem may not
work at all. Use such old toolchains at your own risk.
endchoice
choice
bool "External toolchain kernel headers series"
default BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
help
Set to the kernel headers version that were used to build
this external toolchain.
This is used to hide/show some packages that have strict
requirements on the version of kernel headers.
If unsure what version your toolchain is using, you can look
at the value of LINUX_VERSION_CODE in linux/version.h in your
toolchain. The Linux version is M.m.p, with:
M = ( LINUX_VERSION_CODE >> 16 ) & 0xFF
m = ( LINUX_VERSION_CODE >> 8 ) & 0xFF
p = ( LINUX_VERSION_CODE >> 0 ) & 0xFF
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9
bool "4.9.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_8
bool "4.8.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_7
bool "4.7.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_6
bool "4.6.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_5
bool "4.5.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4
bool "4.4.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_3
bool "4.3.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_2
bool "4.2.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1
bool "4.1.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0
bool "4.0.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_19
bool "3.19.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_18
bool "3.18.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17
bool "3.17.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16
bool "3.16.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_15
bool "3.15.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14
bool "3.14.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13
bool "3.13.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12
bool "3.12.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_11
bool "3.11.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10
bool "3.10.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_9
bool "3.9.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_8
bool "3.8.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_7
bool "3.7.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_6
bool "3.6.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_5
bool "3.5.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4
bool "3.4.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_3
bool "3.3.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2
bool "3.2.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1
bool "3.1.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_0
bool "3.0.x"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
bool "2.6.x"
endchoice
choice
prompt "External toolchain C library"
default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
bool "uClibc/uClibc-ng"
select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
# For the time being, we assume that all custom external
# toolchains have shadow password support.
select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
help
Select this option if your external toolchain uses the
uClibc (available from http://www.uclibc.org/)
or uClibc-ng (available from http://www.uclibc-ng.org)
C library.
config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC
bool "glibc/eglibc"
depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
help
Select this option if your external toolchain uses the GNU C
library (available from https://www.gnu.org/software/libc/)
or its variant the eglibc library (http://www.eglibc.org/).
Note: eglibc is a variant of glibc that (among other things)
can be configured to exclude some of its features. Using a
toolchain with eglibc configured to exclude key features may
cause build failures to some packages.
comment "(e)glibc only available with shared lib support"
depends on BR2_STATIC_LIBS
config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL
bool "musl (experimental)"
select BR2_TOOLCHAIN_EXTERNAL_MUSL
help
Select this option if your external toolchain uses the
'musl' C library, available from http://www.musl-libc.org/.
endchoice
if BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
config BR2_TOOLCHAIN_EXTERNAL_WCHAR
bool "Toolchain has WCHAR support?"
select BR2_USE_WCHAR
help
Select this option if your external toolchain supports
WCHAR. If you don't know, leave the default value, Buildroot
will tell you if it's correct or not.
config BR2_TOOLCHAIN_EXTERNAL_LOCALE
bool "Toolchain has locale support?"
select BR2_TOOLCHAIN_EXTERNAL_WCHAR
select BR2_ENABLE_LOCALE
help
Select this option if your external toolchain has locale
support. If you don't know, leave the default value,
Buildroot will tell you if it's correct or not.
config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
bool "Toolchain has threads support?"
select BR2_TOOLCHAIN_HAS_THREADS
default y
help
Select this option if your external toolchain has thread
support. If you don't know, leave the default value,
Buildroot will tell you if it's correct or not.
if BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
bool "Toolchain has threads debugging support?"
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
default y
help
Select this option if your external toolchain has thread
debugging support. If you don't know, leave the default
value, Buildroot will tell you if it's correct or not.
config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL
bool "Toolchain has NPTL threads support?"
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
default y
help
Select this option if your external toolchain uses the NPTL
(Native Posix Thread Library) implementation of Posix
threads. If you don't know, leave the default value,
Buildroot will tell you if it's correct or not.
endif # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
bool "Toolchain has SSP support?"
select BR2_TOOLCHAIN_HAS_SSP
default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
default y if BR2_TOOLCHAIN_EXTERNAL_MUSL
help
Selection this option if your external toolchain has Stack
Smashing Protection support enabled. If you don't know,
leave the default value, Buildroot will tell you if it's
correct or not.
config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
bool "Toolchain has RPC support?"
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
depends on !BR2_TOOLCHAIN_EXTERNAL_MUSL
default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
help
Select this option if your external toolchain supports
RPC. If you don't know, leave the default value, Buildroot
will tell you if it's correct or not.
config BR2_TOOLCHAIN_EXTERNAL_CXX
bool "Toolchain has C++ support?"
select BR2_INSTALL_LIBSTDCPP
help
Select this option if your external toolchain has C++
support. If you don't know, leave the default value,
Buildroot will tell you if it's correct or not.
config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
string "Extra toolchain libraries to be copied to target"
help
If your external toolchain provides extra libraries that
need to be copied to the target filesystem, enter them
here, separated by spaces. They will be copied to the
target's /lib directory.
endif

View File

@@ -0,0 +1,15 @@
################################################################################
#
# toolchain-external-custom
#
################################################################################
TOOLCHAIN_EXTERNAL_CUSTOM_SITE = $(patsubst %/,%,$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))))
TOOLCHAIN_EXTERNAL_CUSTOM_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CUSTOM),y)
# We can't check hashes for custom downloaded toolchains
BR_NO_CHECK_HASH_FOR += $(TOOLCHAIN_EXTERNAL_SOURCE)
endif
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,15 @@
config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
bool "Linaro AArch64 2017.08"
depends on BR2_aarch64
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_INSTALL_LIBSTDCPP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
select BR2_TOOLCHAIN_HAS_FORTRAN
help
Toolchain for the AArch64 architecture, from
http://www.linaro.org/engineering/armv8/

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "aarch64-linux-gnu"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-linaro-aarch64"
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 6365480ab93e30185ffd33070b9332e0caa2c3c0813dd71bfbc83d300b76b4c9 gcc-linaro-6.4.1-2017.08-i686_aarch64-linux-gnu.tar.xz
sha256 f507d071c6969665e26c595d6d952d7b18eb11609a71cb6debbafb55d700522a gcc-linaro-6.4.1-2017.08-x86_64_aarch64-linux-gnu.tar.xz

View File

@@ -0,0 +1,16 @@
################################################################################
#
# toolchain-external-linaro-aarch64
#
################################################################################
TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION = 2017.08
TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SITE = https://releases.linaro.org/components/toolchain/binaries/6.4-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)/aarch64-linux-gnu
ifeq ($(HOSTARCH),x86)
TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-6.4.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)-i686_aarch64-linux-gnu.tar.xz
else
TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-6.4.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)-x86_64_aarch64-linux-gnu.tar.xz
endif
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,27 @@
comment "Linaro toolchains available for Cortex-A + EABIhf"
depends on BR2_arm
depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
depends on !BR2_STATIC_LIBS
config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
bool "Linaro ARM 2017.08"
depends on BR2_arm
depends on BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on BR2_ARM_EABIHF
depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_INSTALL_LIBSTDCPP
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
select BR2_TOOLCHAIN_HAS_FORTRAN
help
Linaro toolchain for the ARM architecture. It uses Linaro
GCC 2017.08 (based on gcc 6.4.1), Linaro GDB 2017.08 (based on
GDB 8.0), glibc 2.23, Binutils 2017.08 (based on 2.27). It
generates code that runs on all Cortex-A profile devices,
but tuned for the Cortex-A9. The code generated is Thumb 2,
with the hard floating point calling convention, and uses
the VFPv3-D16 FPU instructions.

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "arm-linux-gnueabihf"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-linaro-arm"
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 a99029dff3d17d28c89831f2cd2aa37752c2f85fe89fe38fdd17971c36a9f1dc gcc-linaro-6.4.1-2017.08-i686_arm-linux-gnueabihf.tar.xz
sha256 1c975a1936cc966099b3fcaff8f387d748caff27f43593214ae6d4601241ae40 gcc-linaro-6.4.1-2017.08-x86_64_arm-linux-gnueabihf.tar.xz

View File

@@ -0,0 +1,16 @@
################################################################################
#
# toolchain-external-linaro-arm
#
################################################################################
TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION = 2017.08
TOOLCHAIN_EXTERNAL_LINARO_ARM_SITE = https://releases.linaro.org/components/toolchain/binaries/6.4-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)/arm-linux-gnueabihf
ifeq ($(HOSTARCH),x86)
TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-6.4.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)-i686_arm-linux-gnueabihf.tar.xz
else
TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-6.4.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)-x86_64_arm-linux-gnueabihf.tar.xz
endif
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,26 @@
comment "Linaro toolchains available for Cortex-A + EABIhf"
depends on BR2_armeb
depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
depends on !BR2_STATIC_LIBS
config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
bool "Linaro armeb 2017.08"
depends on BR2_armeb
depends on BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
depends on BR2_ARM_EABIHF
depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_SSP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_INSTALL_LIBSTDCPP
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
help
Linaro toolchain for the ARM big endian architecture. It
uses Linaro GCC 2017.08 (based on gcc 6.4.1), Linaro GDB
2017.08 (based on GDB 8.0), glibc 2.23, Binutils 2017.08
(based on 2.27). It generates code that runs on all Cortex-A
profile devices, but tuned for the Cortex-A9. The code
generated is Thumb 2, with the hard floating point calling
convention, and uses the VFPv3-D16 FPU instructions.

View File

@@ -0,0 +1,9 @@
if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "armeb-linux-gnueabihf"
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-linaro-armeb"
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 7472ed65dd73945d4574e30fd2d26ef15d65b309dee83aaaf5a97df8fe3a94c7 gcc-linaro-6.4.1-2017.08-i686_armeb-linux-gnueabihf.tar.xz
sha256 97a0de6ce7a77a2df7398e907621242752e6e5f1787772d7b308c82a3a039fab gcc-linaro-6.4.1-2017.08-x86_64_armeb-linux-gnueabihf.tar.xz

View File

@@ -0,0 +1,16 @@
################################################################################
#
# toolchain-external-linaro-armeb
#
################################################################################
TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION = 2017.08
TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SITE = https://releases.linaro.org/components/toolchain/binaries/6.4-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)/armeb-linux-gnueabihf
ifeq ($(HOSTARCH),x86)
TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-6.4.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)-i686_armeb-linux-gnueabihf.tar.xz
else
TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-6.4.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)-x86_64_armeb-linux-gnueabihf.tar.xz
endif
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,18 @@
config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
bool "Synopsys ARC 2016.09 toolchain"
depends on BR2_arc
depends on BR2_HOSTARCH = "x86_64"
select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
select BR2_INSTALL_LIBSTDCPP
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_ENABLE_LOCALE
select BR2_USE_WCHAR
select BR2_TOOLCHAIN_HAS_THREADS
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
select BR2_TOOLCHAIN_HAS_SSP
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
help
Toolchain for the ARC cores, from
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases

View File

@@ -0,0 +1,10 @@
if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "arc-linux" if BR2_arcle
default "arceb-linux" if BR2_arceb
config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
default "toolchain-external-synopsys-arc"
endif

View File

@@ -0,0 +1,5 @@
# Locally calculated
sha256 9123e35510cc9105e5f9468d5154e0093770d7c11ed771c1a595ecf813692baf arc_gnu_2016.09_prebuilt_uclibc_le_arc700_linux_install.tar.gz
sha256 3140066cdbda2df7ed0fb60424bbd9db740fb25393928e733234b0bf65508df2 arc_gnu_2016.09_prebuilt_uclibc_be_arc700_linux_install.tar.gz
sha256 aa6edb2101b13df3ac59f8d8ccbcfba37a6f7882f0e03baa9d9883480dbed4e7 arc_gnu_2016.09_prebuilt_uclibc_le_archs_linux_install.tar.gz
sha256 4de227bf73536a87784d88e5f10085b91ede62c76ef8fedf53b4bf2e215054cf arc_gnu_2016.09_prebuilt_uclibc_be_archs_linux_install.tar.gz

View File

@@ -0,0 +1,24 @@
################################################################################
#
# toolchain-external-synopsys-arc
#
################################################################################
TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION = 2016.09
TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION)-release
ifeq ($(BR2_arc750d)$(BR2_arc770d),y)
TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE = arc700
else
TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE = archs
endif
ifeq ($(BR2_arcle),y)
TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS = le
else
TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS = be
endif
TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_SOURCE = arc_gnu_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION)_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE)_linux_install.tar.gz
$(eval $(toolchain-external-package))

View File

@@ -0,0 +1,28 @@
################################################################################
#
# toolchain-external
#
################################################################################
TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
# So, add the musl-compat-headers package that will install those files,
# into the staging directory:
# sys/queue.h: header from NetBSD
# sys/cdefs.h: minimalist header bundled in Buildroot
ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
endif
$(eval $(virtual-package))
# Ensure the external-toolchain package has a prefix defined.
# This comes after the virtual-package definition, which checks the provider.
ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
ifeq ($(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)),)
$(error No prefix selected for external toolchain package $(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL). Configuration error)
endif
endif
include $(sort $(wildcard toolchain/toolchain-external/*/*.mk))