Bump buidlroot version to 2018.02.6
This commit is contained in:
@@ -11,6 +11,7 @@ config BR2_TOOLCHAIN_USES_GLIBC
|
||||
bool
|
||||
select BR2_USE_WCHAR
|
||||
select BR2_ENABLE_LOCALE
|
||||
select BR2_TOOLCHAIN_HAS_FULL_GETTEXT
|
||||
select BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
|
||||
select BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
@@ -42,10 +43,7 @@ choice
|
||||
config BR2_TOOLCHAIN_BUILDROOT
|
||||
bool "Buildroot toolchain"
|
||||
select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
|
||||
depends on !BR2_bf606
|
||||
depends on !BR2_bf607
|
||||
depends on !BR2_bf608
|
||||
depends on !BR2_bf609
|
||||
depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL
|
||||
bool "External toolchain"
|
||||
|
||||
@@ -6,31 +6,26 @@
|
||||
# toolchain logic, and the glibc package, so care must be taken when
|
||||
# changing this function.
|
||||
#
|
||||
# $1: library name
|
||||
# $1: library name pattern (can include glob wildcards)
|
||||
#
|
||||
copy_toolchain_lib_root = \
|
||||
LIB="$(strip $1)"; \
|
||||
\
|
||||
LIBPATHS=`find $(STAGING_DIR)/ -name "$${LIB}" 2>/dev/null` ; \
|
||||
LIBPATTERN="$(strip $1)"; \
|
||||
LIBPATHS=`find $(STAGING_DIR)/ -name "$${LIBPATTERN}" 2>/dev/null` ; \
|
||||
for LIBPATH in $${LIBPATHS} ; do \
|
||||
DESTDIR=`echo $${LIBPATH} | sed "s,^$(STAGING_DIR)/,," | xargs dirname` ; \
|
||||
mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
|
||||
while true ; do \
|
||||
LIBNAME=`basename $${LIBPATH}`; \
|
||||
LIBDIR=`dirname $${LIBPATH}` ; \
|
||||
LINKTARGET=`readlink $${LIBPATH}` ; \
|
||||
DESTDIR=`echo $${LIBPATH} | sed "s,^$(STAGING_DIR)/,," | xargs dirname` ; \
|
||||
mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
|
||||
rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
|
||||
if test -h $${LIBPATH} ; then \
|
||||
ln -sf `basename $${LINKTARGET}` $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME} ; \
|
||||
cp -d $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
|
||||
LIBPATH="`readlink -f $${LIBPATH}`"; \
|
||||
elif test -f $${LIBPATH}; then \
|
||||
$(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
|
||||
break ; \
|
||||
else \
|
||||
exit -1; \
|
||||
fi; \
|
||||
if test -z "$${LINKTARGET}" ; then \
|
||||
break ; \
|
||||
fi ; \
|
||||
LIBPATH="`readlink -f $${LIBPATH}`"; \
|
||||
done; \
|
||||
done
|
||||
|
||||
@@ -39,17 +34,38 @@ copy_toolchain_lib_root = \
|
||||
# dir. The operation of this function is rendered a little bit
|
||||
# complicated by the support for multilib toolchains.
|
||||
#
|
||||
# We start by copying etc, lib, sbin and usr from the sysroot of the
|
||||
# selected architecture variant (as pointed by ARCH_SYSROOT_DIR). This
|
||||
# allows to import into the staging directory the C library and
|
||||
# companion libraries for the correct architecture variant. We
|
||||
# explictly only copy etc, lib, sbin and usr since other directories
|
||||
# We start by copying etc, 'lib', sbin, usr and usr/'lib' from the
|
||||
# sysroot of the selected architecture variant (as pointed to by
|
||||
# ARCH_SYSROOT_DIR). This allows to import into the staging directory
|
||||
# the C library and companion libraries for the correct architecture
|
||||
# variant. 'lib' may not be literally 'lib' but could be something else,
|
||||
# e.g. lib32-fp (as determined by ARCH_LIB_DIR) and we only want to copy
|
||||
# that lib directory and no other. When copying usr, we therefore need
|
||||
# to be extra careful not to include usr/lib* but we _do_ want to
|
||||
# include usr/libexec.
|
||||
# We are selective in the directories we copy since other directories
|
||||
# might exist for other architecture variants (on Codesourcery
|
||||
# toolchain, the sysroot for the default architecture variant contains
|
||||
# the armv4t and thumb2 subdirectories, which are the sysroot for the
|
||||
# corresponding architecture variants), and we don't want to import
|
||||
# them.
|
||||
#
|
||||
# If ARCH_LIB_DIR is not a singular directory component, e.g.
|
||||
# 'lib32/octeon2', then symbolic links in ARCH_LIB_DIR and
|
||||
# usr/ARCH_LIB_DIR may be broken because Buildroot will flatten the
|
||||
# directory structure (e.g. lib32/octeon2/foo is actually stored in
|
||||
# lib/foo). This is only relevant for links that contain one or more ../
|
||||
# components, as links to the current directory are always fine.
|
||||
# We need to fix the broken links by removing the right amount of ../
|
||||
# dots from the link destination.
|
||||
# Once the link destination is valid again, it can be simplified to
|
||||
# remove the dependency on intermediate directory symlinks.
|
||||
#
|
||||
# It is possible that ARCH_LIB_DIR does not contain the dynamic loader
|
||||
# (ld*.so or similar) because it (or the main symlink to it) normally
|
||||
# resides in /lib while ARCH_LIB_DIR may be something else (e.g. lib64,
|
||||
# lib/<tuple>, ...). Therefore, copy the dynamic loader separately.
|
||||
#
|
||||
# Then, if the selected architecture variant is not the default one
|
||||
# (i.e, if SYSROOT_DIR != ARCH_SYSROOT_DIR), then we :
|
||||
#
|
||||
@@ -89,22 +105,47 @@ copy_toolchain_sysroot = \
|
||||
ARCH_LIB_DIR="$(strip $4)" ; \
|
||||
SUPPORT_LIB_DIR="$(strip $5)" ; \
|
||||
for i in etc $${ARCH_LIB_DIR} sbin usr usr/$${ARCH_LIB_DIR}; do \
|
||||
if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
|
||||
rsync -au --chmod=u=rwX,go=rX --exclude 'usr/lib/locale' \
|
||||
if [ ! -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
|
||||
continue ; \
|
||||
fi ; \
|
||||
if [ "$$i" = "usr" ]; then \
|
||||
rsync -au --chmod=u=rwX,go=rX --exclude 'locale/' \
|
||||
--include '/libexec*/' --exclude '/lib*/' \
|
||||
$${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \
|
||||
else \
|
||||
rsync -au --chmod=u=rwX,go=rX --exclude 'locale/' \
|
||||
$${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \
|
||||
fi ; \
|
||||
done ; \
|
||||
for link in $$(find $(STAGING_DIR) -type l); do \
|
||||
target=$$(readlink $${link}) ; \
|
||||
if [ "$${target}" == "$${target\#/}" ] ; then \
|
||||
continue ; \
|
||||
fi ; \
|
||||
relpath="$(call relpath_prefix,$${target\#/})" ; \
|
||||
echo "Fixing symlink $${link} from $${target} to $${relpath}$${target\#/}" ; \
|
||||
ln -sf $${relpath}$${target\#/} $${link} ; \
|
||||
done ; \
|
||||
relpath="$(call relpath_prefix,$${ARCH_LIB_DIR})" ; \
|
||||
if [ "$${relpath}" != "" ]; then \
|
||||
for i in $$(find -H $(STAGING_DIR)/$${ARCH_LIB_DIR} $(STAGING_DIR)/usr/$${ARCH_LIB_DIR} -type l -xtype l); do \
|
||||
LINKTARGET=`readlink $$i` ; \
|
||||
NEWLINKTARGET=$${LINKTARGET\#$$relpath} ; \
|
||||
ln -sf $${NEWLINKTARGET} $$i ; \
|
||||
$(call simplify_symlink,$$i,$(STAGING_DIR)) ; \
|
||||
done ; \
|
||||
fi ; \
|
||||
if [ ! -e $(STAGING_DIR)/lib/ld*.so.* ]; then \
|
||||
if [ -e $${ARCH_SYSROOT_DIR}/lib/ld*.so.* ]; then \
|
||||
cp -a $${ARCH_SYSROOT_DIR}/lib/ld*.so.* $(STAGING_DIR)/lib/ ; \
|
||||
fi ; \
|
||||
fi ; \
|
||||
if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
|
||||
if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
|
||||
cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \
|
||||
fi ; \
|
||||
mkdir -p `dirname $(STAGING_DIR)/$${ARCH_SUBDIR}` ; \
|
||||
relpath="./" ; \
|
||||
nbslashs=`printf $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \
|
||||
for slash in `seq 1 $${nbslashs}` ; do \
|
||||
relpath=$${relpath}"../" ; \
|
||||
done ; \
|
||||
relpath="$(call relpath_prefix,$${ARCH_SUBDIR})./" ; \
|
||||
ln -s $${relpath} $(STAGING_DIR)/$${ARCH_SUBDIR} ; \
|
||||
echo "Symlinking $(STAGING_DIR)/$${ARCH_SUBDIR} -> $${relpath}" ; \
|
||||
fi ; \
|
||||
@@ -186,7 +227,7 @@ check_glibc_rpc_feature = \
|
||||
#
|
||||
check_glibc = \
|
||||
SYSROOT_DIR="$(strip $1)"; \
|
||||
if test `find $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \
|
||||
if test `find -L $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \
|
||||
echo "Incorrect selection of the C library"; \
|
||||
exit -1; \
|
||||
fi; \
|
||||
@@ -196,13 +237,18 @@ check_glibc = \
|
||||
#
|
||||
# Check that the selected C library really is musl
|
||||
#
|
||||
# $1: sysroot directory
|
||||
# $1: cross-gcc path
|
||||
# $2: cross-readelf path
|
||||
check_musl = \
|
||||
SYSROOT_DIR="$(strip $1)"; \
|
||||
if test ! -f $${SYSROOT_DIR}/lib/libc.so -o -e $${SYSROOT_DIR}/lib/libm.so ; then \
|
||||
__CROSS_CC=$(strip $1) ; \
|
||||
__CROSS_READELF=$(strip $2) ; \
|
||||
echo 'void main(void) {}' | $${__CROSS_CC} -x c -o $(BUILD_DIR)/.br-toolchain-test.tmp - >/dev/null 2>&1; \
|
||||
if ! $${__CROSS_READELF} -l $(BUILD_DIR)/.br-toolchain-test.tmp 2> /dev/null | grep 'program interpreter: /lib/ld-musl' -q; then \
|
||||
rm -f $(BUILD_DIR)/.br-toolchain-test.tmp*; \
|
||||
echo "Incorrect selection of the C library" ; \
|
||||
exit -1; \
|
||||
fi
|
||||
fi ; \
|
||||
rm -f $(BUILD_DIR)/.br-toolchain-test.tmp*
|
||||
|
||||
#
|
||||
# Check the conformity of Buildroot configuration with regard to the
|
||||
@@ -271,7 +317,6 @@ check_uclibc = \
|
||||
#
|
||||
check_arm_abi = \
|
||||
__CROSS_CC=$(strip $1) ; \
|
||||
__CROSS_READELF=$(strip $2) ; \
|
||||
EXT_TOOLCHAIN_TARGET=`LANG=C $${__CROSS_CC} -v 2>&1 | grep ^Target | cut -f2 -d ' '` ; \
|
||||
if ! echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi(hf)?$$' ; then \
|
||||
echo "External toolchain uses the unsuported OABI" ; \
|
||||
@@ -376,7 +421,7 @@ check_unusable_toolchain = \
|
||||
#
|
||||
check_toolchain_ssp = \
|
||||
__CROSS_CC=$(strip $1) ; \
|
||||
__HAS_SSP=`echo 'void main(){}' | $${__CROSS_CC} -fstack-protector -x c - -o $(BUILD_DIR)/.br-toolchain-test.tmp >/dev/null 2>&1 && echo y` ; \
|
||||
__HAS_SSP=`echo 'void main(){}' | $${__CROSS_CC} -Werror -fstack-protector -x c - -o $(BUILD_DIR)/.br-toolchain-test.tmp >/dev/null 2>&1 && echo y` ; \
|
||||
if [ "$(BR2_TOOLCHAIN_HAS_SSP)" != "y" -a "$${__HAS_SSP}" = "y" ] ; then \
|
||||
echo "SSP support available in this toolchain, please enable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP" ; \
|
||||
exit 1 ; \
|
||||
@@ -393,3 +438,49 @@ check_toolchain_ssp = \
|
||||
gen_gdbinit_file = \
|
||||
mkdir -p $(STAGING_DIR)/usr/share/buildroot/ ; \
|
||||
echo "set sysroot $(STAGING_DIR)" > $(STAGING_DIR)/usr/share/buildroot/gdbinit
|
||||
|
||||
# Given a path, determine the relative prefix (../) needed to return to the
|
||||
# root level. Note that the last component is treated as a file component; use a
|
||||
# trailing slash to force treating it as a directory. Examples:
|
||||
# relpath_prefix(lib32) = ""
|
||||
# relpath_prefix(lib32/octeon2) = "../"
|
||||
# relpath_prefix(lib32/octeon2/) = "../../"
|
||||
#
|
||||
# $1: input path
|
||||
define relpath_prefix
|
||||
$$( \
|
||||
prefix="" ; \
|
||||
nbslashs=`printf $1 | sed 's%[^/]%%g' | wc -c` ; \
|
||||
for slash in `seq 1 $${nbslashs}` ; do \
|
||||
prefix=$${prefix}"../" ; \
|
||||
done ; \
|
||||
printf "$$prefix" ; \
|
||||
)
|
||||
endef
|
||||
|
||||
# Replace the destination of a symbolic link with a simpler version
|
||||
# For example,
|
||||
# usr/lib/libfoo.so -> ../../lib32/libfoo.so.1
|
||||
# becomes
|
||||
# usr/lib/libfoo.so -> ../../lib/libfoo.so.1
|
||||
# since 'lib32' is a symlink to 'lib'.
|
||||
#
|
||||
# Likewise,
|
||||
# usr/lib/octeon2/libbar.so -> ../../../lib32/octeon2/libbar.so.1
|
||||
# becomes
|
||||
# usr/lib/octeon2/libbar.so -> ../../lib/libbar.so.1
|
||||
# assuming lib32->lib and lib/octeon2->lib.
|
||||
#
|
||||
# $1: symlink
|
||||
# $2: base path
|
||||
define simplify_symlink
|
||||
( \
|
||||
FULL_SRC="$$(readlink -f $$(dirname $1))/$$(basename $1)" ; \
|
||||
FULL_DEST="$$(readlink -f $1)" ; \
|
||||
FULL_BASE="$$(readlink -f $2)" ; \
|
||||
REL_SRC="$${FULL_SRC#$${FULL_BASE}/}" ; \
|
||||
REL_DEST="$${FULL_DEST#$${FULL_BASE}/}" ; \
|
||||
DOTS="$(call relpath_prefix,$${REL_SRC})" ; \
|
||||
ln -sf "$${DOTS}$${REL_DEST}" "$${FULL_SRC}" ; \
|
||||
)
|
||||
endef
|
||||
|
||||
@@ -22,7 +22,7 @@ config BR2_TOOLCHAIN_BUILDROOT_VENDOR
|
||||
|
||||
choice
|
||||
prompt "C library"
|
||||
default BR2_TOOLCHAIN_UCLIBC
|
||||
default BR2_TOOLCHAIN_BUILDROOT_UCLIBC
|
||||
default BR2_TOOLCHAIN_BUILDROOT_GLIBC if BR2_powerpc64
|
||||
|
||||
config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
|
||||
@@ -47,9 +47,12 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
|
||||
BR2_mipsel || BR2_mips64 || BR2_mips64el|| \
|
||||
BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
|
||||
BR2_sh || BR2_sparc64 || BR2_x86_64 || \
|
||||
BR2_microblaze || BR2_nios2
|
||||
BR2_microblaze || BR2_nios2 || BR2_archs38
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 || !BR2_powerpc64le
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008
|
||||
depends on !BR2_powerpc_SPE
|
||||
select BR2_TOOLCHAIN_USES_GLIBC
|
||||
# our glibc.mk enables RPC support
|
||||
@@ -60,16 +63,26 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
|
||||
|
||||
http://www.gnu.org/software/libc/
|
||||
|
||||
comment "glibc only available with shared lib support"
|
||||
comment "glibc needs a toolchain w/ dynamic library, kernel headers >= 3.2"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_STATIC_LIBS
|
||||
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
|
||||
|
||||
# glibc >= 2.26 require kernel headers >= 3.10 on powerpc64le.
|
||||
comment "glibc on powerpc64le needs a toolchain w/ headers >= 3.10"
|
||||
depends on BR2_powerpc64le
|
||||
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
|
||||
|
||||
# Support for MIPS NAN2008 needs headers >= 4.5
|
||||
comment "glibc on MIPS w/ NAN2008 needs a toolchain w/ headers >= 4.5"
|
||||
depends on BR2_MIPS_NAN_2008
|
||||
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
|
||||
|
||||
config BR2_TOOLCHAIN_BUILDROOT_MUSL
|
||||
bool "musl"
|
||||
depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \
|
||||
BR2_microblaze || BR2_mips || BR2_mipsel || BR2_mips64 || \
|
||||
BR2_mips64el || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
|
||||
BR2_sh || BR2_x86_64
|
||||
depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \
|
||||
BR2_microblaze || BR2_mips || BR2_mipsel || BR2_mips64 || \
|
||||
BR2_mips64el || BR2_or1k || BR2_powerpc || BR2_powerpc64 || \
|
||||
BR2_powerpc64le || BR2_sh || BR2_x86_64
|
||||
depends on !BR2_powerpc_SPE # not supported, build breaks
|
||||
# sh2 nommu is supported by musl, but we don't have support
|
||||
# for it in Buildroot.
|
||||
|
||||
@@ -22,10 +22,8 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
default y if BR2_ARM_CPU_ARMV4
|
||||
default y if BR2_ARM_CPU_ARMV5
|
||||
default y if BR2_sparc_v8
|
||||
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=19405
|
||||
config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
|
||||
bool
|
||||
default y if BR2_m68k_cf5208
|
||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
|
||||
config BR2_TOOLCHAIN_HAS_NATIVE_RPC
|
||||
bool
|
||||
@@ -82,19 +80,11 @@ config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
|
||||
|
||||
Note: the full set of gconv libs are ~8MiB (on ARM).
|
||||
|
||||
# glibc and eglibc directly include gettext, so a separatly compiled
|
||||
# gettext isn't needed and shouldn't be built to avoid conflicts. Some
|
||||
# packages always need gettext, other packages only need gettext when
|
||||
# locale support is enabled. See the documentation for how packages
|
||||
# should rely on the following two options.
|
||||
|
||||
config BR2_NEEDS_GETTEXT
|
||||
# This boolean is true if the toolchain provides a built-in full
|
||||
# featured gettext implementation (glibc), and false if only a stub
|
||||
# gettext implementation is provided (uclibc, musl)
|
||||
config BR2_TOOLCHAIN_HAS_FULL_GETTEXT
|
||||
bool
|
||||
default y if BR2_TOOLCHAIN_USES_UCLIBC
|
||||
|
||||
config BR2_NEEDS_GETTEXT_IF_LOCALE
|
||||
bool
|
||||
default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
|
||||
|
||||
config BR2_USE_MMU
|
||||
bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL
|
||||
@@ -248,10 +238,40 @@ config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
|
||||
bool
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
|
||||
|
||||
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
|
||||
bool
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
|
||||
|
||||
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
|
||||
bool
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
|
||||
|
||||
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
|
||||
bool
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
|
||||
|
||||
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
|
||||
bool
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
|
||||
|
||||
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
|
||||
bool
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
|
||||
|
||||
config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
|
||||
bool
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
|
||||
|
||||
# This order guarantees that the highest version is set, as kconfig
|
||||
# stops affecting a value on the first matching default.
|
||||
config BR2_TOOLCHAIN_HEADERS_AT_LEAST
|
||||
string
|
||||
default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
|
||||
default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
|
||||
default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
|
||||
default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
|
||||
default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
|
||||
default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
|
||||
default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
|
||||
default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
|
||||
default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
|
||||
@@ -319,10 +339,15 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
bool
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
config BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
bool
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
|
||||
# This order guarantees that the highest version is set, as kconfig
|
||||
# stops affecting a value on the first matching default.
|
||||
config BR2_TOOLCHAIN_GCC_AT_LEAST
|
||||
string
|
||||
default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
@@ -333,6 +358,10 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST
|
||||
default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
|
||||
default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
|
||||
|
||||
config BR2_TOOLCHAIN_HAS_MNAN_OPTION
|
||||
bool
|
||||
default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
|
||||
config BR2_TOOLCHAIN_HAS_SYNC_1
|
||||
bool
|
||||
default y
|
||||
|
||||
@@ -33,12 +33,8 @@ source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Confi
|
||||
# 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)
|
||||
# x86_64
|
||||
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
|
||||
@@ -71,10 +67,14 @@ endchoice
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_PATH
|
||||
string "Toolchain path"
|
||||
default "/path/to/toolchain/usr"
|
||||
default ""
|
||||
depends on BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED
|
||||
help
|
||||
Path to where the external toolchain is installed.
|
||||
Path to where the external toolchain is installed. The
|
||||
compiler itself is expected to be in the "bin" subdirectory
|
||||
of this path.
|
||||
|
||||
If empty, the compiler will be searched in $PATH.
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GLIBC
|
||||
bool
|
||||
@@ -127,12 +127,8 @@ source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Confi
|
||||
# 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
|
||||
# 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"
|
||||
|
||||
@@ -13,10 +13,9 @@
|
||||
# * 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
|
||||
# MIPS, PowerPC, 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
|
||||
@@ -55,7 +54,7 @@
|
||||
# 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
|
||||
# $(HOST_DIR)/bin like for the internal toolchains, and the rest
|
||||
# of Buildroot is handled identical for the 2 toolchain types.
|
||||
################################################################################
|
||||
|
||||
@@ -75,10 +74,10 @@ 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))
|
||||
TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc))
|
||||
endif
|
||||
else
|
||||
TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin
|
||||
TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin
|
||||
endif
|
||||
|
||||
# If this is a buildroot toolchain, it already has a wrapper which we want to
|
||||
@@ -91,7 +90,7 @@ 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)
|
||||
TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf
|
||||
|
||||
# Normal handling of downloaded toolchain tarball extraction.
|
||||
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
|
||||
@@ -108,13 +107,11 @@ endif
|
||||
#
|
||||
# Definitions of the list of libraries that should be copied to the target.
|
||||
#
|
||||
|
||||
TOOLCHAIN_EXTERNAL_LIBS += ld*.so* libgcc_s.so.* libatomic.so.*
|
||||
|
||||
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
|
||||
TOOLCHAIN_EXTERNAL_LIBS += libc.so.* libcrypt.so.* libdl.so.* libm.so.* libnsl.so.* libresolv.so.* librt.so.* libutil.so.*
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||
TOOLCHAIN_EXTERNAL_LIBS += libpthread.so.*
|
||||
ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),)
|
||||
@@ -128,7 +125,7 @@ TOOLCHAIN_EXTERNAL_LIBS += libnss_files.so.* libnss_dns.so.* libmvec.so.* libanl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
|
||||
TOOLCHAIN_EXTERNAL_LIBS += libc.so libgcc_s.so.*
|
||||
TOOLCHAIN_EXTERNAL_LIBS += libc.so
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
|
||||
@@ -157,6 +154,8 @@ CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVIS
|
||||
endif
|
||||
CC_TARGET_ARCH_ := $(call qstrip,$(BR2_GCC_TARGET_ARCH))
|
||||
CC_TARGET_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_ABI))
|
||||
CC_TARGET_NAN_ := $(call qstrip,$(BR2_GCC_TARGET_NAN))
|
||||
CC_TARGET_FP32_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_FP32_MODE))
|
||||
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))
|
||||
@@ -179,6 +178,16 @@ ifneq ($(CC_TARGET_ABI_),)
|
||||
TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
|
||||
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
|
||||
endif
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_MNAN_OPTION),y)
|
||||
ifneq ($(CC_TARGET_NAN_),)
|
||||
TOOLCHAIN_EXTERNAL_CFLAGS += -mnan=$(CC_TARGET_NAN_)
|
||||
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_NAN='"$(CC_TARGET_NAN_)"'
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CC_TARGET_FP32_MODE_),)
|
||||
TOOLCHAIN_EXTERNAL_CFLAGS += -mfp$(CC_TARGET_FP32_MODE_)
|
||||
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FP32_MODE='"$(CC_TARGET_FP32_MODE_)"'
|
||||
endif
|
||||
ifneq ($(CC_TARGET_FPU_),)
|
||||
TOOLCHAIN_EXTERNAL_CFLAGS += -mfpu=$(CC_TARGET_FPU_)
|
||||
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FPU='"$(CC_TARGET_FPU_)"'
|
||||
@@ -231,13 +240,13 @@ endif
|
||||
|
||||
#
|
||||
# The following functions creates the symbolic links needed to get the
|
||||
# cross-compilation tools visible in $(HOST_DIR)/usr/bin. Some of
|
||||
# cross-compilation tools visible in $(HOST_DIR)/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.
|
||||
# gdb's in $(HOST_DIR)/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
|
||||
@@ -246,23 +255,23 @@ endif
|
||||
# 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; \
|
||||
$(Q)cd $(HOST_DIR)/bin; \
|
||||
for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
|
||||
base=$${i##*/}; \
|
||||
case "$$base" in \
|
||||
*-ar|*-ranlib|*-nm) \
|
||||
ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
|
||||
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)%../..%') .; \
|
||||
ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \
|
||||
fi \
|
||||
;; \
|
||||
*) \
|
||||
ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
|
||||
ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \
|
||||
;; \
|
||||
esac; \
|
||||
done
|
||||
@@ -332,7 +341,7 @@ 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:')
|
||||
$$(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
|
||||
@@ -387,8 +396,8 @@ endef
|
||||
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); \
|
||||
$(Q)for libpattern in $(TOOLCHAIN_EXTERNAL_LIBS); do \
|
||||
$(call copy_toolchain_lib_root,$$libpattern); \
|
||||
done
|
||||
endef
|
||||
endif
|
||||
@@ -445,19 +454,20 @@ endef
|
||||
#
|
||||
# $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
|
||||
$(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 \
|
||||
relpath="$(call relpath_prefix,$${ARCH_LIB_DIR})" ; \
|
||||
ln -snf $${relpath}lib "$${DESTDIR}/$${ARCH_LIB_DIR}" ; \
|
||||
ln -snf $${relpath}lib "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ; \
|
||||
fi
|
||||
|
||||
define TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK
|
||||
$(call create_lib_symlinks,$(STAGING_DIR))
|
||||
$(call create_lib_symlinks,$(STAGING_DIR))
|
||||
endef
|
||||
|
||||
define TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK
|
||||
$(call create_lib_symlinks,$(TARGET_DIR))
|
||||
$(call create_lib_symlinks,$(TARGET_DIR))
|
||||
endef
|
||||
|
||||
#
|
||||
@@ -470,30 +480,6 @@ define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT
|
||||
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,
|
||||
@@ -555,8 +541,7 @@ define $(2)_CONFIGURE_CMDS
|
||||
$$(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)) ; \
|
||||
"$$(TOOLCHAIN_EXTERNAL_CC) $$(TOOLCHAIN_EXTERNAL_CFLAGS)") ; \
|
||||
fi ; \
|
||||
if test "$$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
|
||||
$$(call check_cplusplus,$$(TOOLCHAIN_EXTERNAL_CXX)) ; \
|
||||
@@ -567,7 +552,9 @@ define $(2)_CONFIGURE_CMDS
|
||||
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}) ; \
|
||||
$$(call check_musl,\
|
||||
"$$(TOOLCHAIN_EXTERNAL_CC) $$(TOOLCHAIN_EXTERNAL_CFLAGS)",\
|
||||
$$(TOOLCHAIN_EXTERNAL_READELF)) ; \
|
||||
else \
|
||||
$$(call check_glibc,$$$${SYSROOT_DIR}) ; \
|
||||
fi
|
||||
@@ -586,10 +573,6 @@ define $(2)_INSTALL_STAGING_CMDS
|
||||
$$(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.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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_ARCH_NEEDS_GCC_AT_LEAST_5
|
||||
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
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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_ARCH_NEEDS_GCC_AT_LEAST_5
|
||||
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)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
|
||||
bool "CodeSourcery AArch64 2014.11"
|
||||
depends on BR2_aarch64
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_5
|
||||
# a57/a53 and a72/a53 appeared in gcc-6 or were broken before
|
||||
depends on !BR2_cortex_a57_a53 && !BR2_cortex_a72_a53
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
|
||||
|
||||
@@ -9,14 +9,4 @@ 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))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
|
||||
bool "Sourcery CodeBench AMD64 2016.11"
|
||||
depends on BR2_x86_64
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_7
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_x86_jaguar || BR2_x86_steamroller
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
|
||||
bool "Sourcery CodeBench ARM 2014.05"
|
||||
depends on BR2_arm
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9
|
||||
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_cortex_a12 && !BR2_cortex_a17 && !BR2_ARM_CPU_ARMV8A
|
||||
depends on !BR2_STATIC_LIBS
|
||||
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
|
||||
select BR2_TOOLCHAIN_HAS_SSP
|
||||
@@ -31,5 +32,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
|
||||
|
||||
comment "Sourcery CodeBench toolchains available for the EABI ABI"
|
||||
depends on BR2_arm
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9
|
||||
depends on !BR2_ARM_EABI
|
||||
depends on !BR2_STATIC_LIBS
|
||||
|
||||
@@ -2,6 +2,7 @@ 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
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_6
|
||||
# Unsupported MIPS cores
|
||||
depends on !BR2_mips_interaptiv
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
@@ -89,5 +90,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
|
||||
Select BR2_SOFT_FLOAT
|
||||
|
||||
comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_6
|
||||
depends on BR2_MIPS_NABI32
|
||||
depends on !BR2_STATIC_LIBS
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
|
||||
bool "Sourcery CodeBench Nios-II 2016.11"
|
||||
bool "Sourcery CodeBench Nios-II 2017.05"
|
||||
depends on BR2_nios2
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_7
|
||||
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.
|
||||
from Mentor Graphics. It uses gcc 6.3, binutils 2.26,
|
||||
glibc 2.25, gdb 7.11 and kernel headers 4.7.
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# From https://sourcery.mentor.com/GNUToolchain/release3302
|
||||
md5 54b7f7056c2159f3a9ddeca8ca775ed1 sourceryg++-2017.05-4-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
|
||||
md5 529a7fecf33d0d113a446413b9d1e173 sourceryg++-2017.05-4-nios2-linux-gnu.src.tar.bz2
|
||||
# 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
|
||||
sha256 3f0307da3c0770b7cc3ed4a845038e6e438d3e3a96ce880f9a86b3d35f948a07 sourceryg++-2017.05-4-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
|
||||
sha256 6e65878d0453708ee19098d3d68985bda244938d35999f3859915a2f5574fa08 sourceryg++-2017.05-4-nios2-linux-gnu.src.tar.bz2
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION = 2016.11-32
|
||||
TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION = 2017.05-4
|
||||
|
||||
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
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
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.
|
||||
@@ -1,9 +0,0 @@
|
||||
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
|
||||
@@ -1,3 +0,0 @@
|
||||
# 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
|
||||
@@ -1,13 +0,0 @@
|
||||
################################################################################
|
||||
#
|
||||
# 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))
|
||||
@@ -1,29 +0,0 @@
|
||||
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.
|
||||
@@ -1,9 +0,0 @@
|
||||
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
|
||||
@@ -1,3 +0,0 @@
|
||||
# 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
|
||||
@@ -1,12 +0,0 @@
|
||||
################################################################################
|
||||
#
|
||||
# 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))
|
||||
@@ -18,49 +18,68 @@ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
|
||||
|
||||
choice
|
||||
bool "External toolchain gcc version"
|
||||
default BR2_TOOLCHAIN_EXTERNAL_GCC_7 if BR2_ARCH_NEEDS_GCC_AT_LEAST_7
|
||||
default BR2_TOOLCHAIN_EXTERNAL_GCC_6 if BR2_ARCH_NEEDS_GCC_AT_LEAST_6
|
||||
default BR2_TOOLCHAIN_EXTERNAL_GCC_5 if BR2_ARCH_NEEDS_GCC_AT_LEAST_5
|
||||
default BR2_TOOLCHAIN_EXTERNAL_GCC_4_9 if BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9
|
||||
default BR2_TOOLCHAIN_EXTERNAL_GCC_4_8 if BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
|
||||
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_7
|
||||
bool "7.x"
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_6
|
||||
bool "6.x"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_7
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_5
|
||||
bool "5.x"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_6
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9
|
||||
bool "4.9.x"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_5
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8
|
||||
bool "4.8.x"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7
|
||||
bool "4.7.x"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6
|
||||
bool "4.6.x"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5
|
||||
bool "4.5.x"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4
|
||||
bool "4.4.x"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
|
||||
bool "4.3.x"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_GCC_OLD
|
||||
bool "older"
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
|
||||
help
|
||||
Use this option if your GCC version is older than any of the
|
||||
above.
|
||||
@@ -89,6 +108,30 @@ choice
|
||||
m = ( LINUX_VERSION_CODE >> 8 ) & 0xFF
|
||||
p = ( LINUX_VERSION_CODE >> 0 ) & 0xFF
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_15
|
||||
bool "4.15.x"
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14
|
||||
bool "4.14.x"
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_13
|
||||
bool "4.13.x"
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_12
|
||||
bool "4.12.x"
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_11
|
||||
bool "4.11.x"
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_10
|
||||
bool "4.10.x"
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9
|
||||
bool "4.9.x"
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
|
||||
bool "Linaro AArch64 2017.08"
|
||||
bool "Linaro AArch64 2017.11"
|
||||
depends on BR2_aarch64
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
@@ -7,8 +7,8 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
|
||||
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_HEADERS_AT_LEAST_4_10
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
select BR2_TOOLCHAIN_HAS_FORTRAN
|
||||
help
|
||||
Toolchain for the AArch64 architecture, from
|
||||
|
||||
@@ -1,3 +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
|
||||
sha256 3130033eaf18d7f7d775aa8ade1c7044683b0db6f332cae29cab7d1caaee97ed gcc-linaro-7.2.1-2017.11-i686_aarch64-linux-gnu.tar.xz
|
||||
sha256 20181f828e1075f1a493947ff91e82dd578ce9f8638fbdfc39e24b62857d8f8d gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
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
|
||||
TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION = 2017.11
|
||||
TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SITE = https://releases.linaro.org/components/toolchain/binaries/7.2-$(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
|
||||
TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-7.2.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
|
||||
TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-7.2.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)-x86_64_aarch64-linux-gnu.tar.xz
|
||||
endif
|
||||
|
||||
$(eval $(toolchain-external-package))
|
||||
|
||||
@@ -4,9 +4,9 @@ comment "Linaro toolchains available for Cortex-A + EABIhf"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
|
||||
bool "Linaro ARM 2017.08"
|
||||
bool "Linaro ARM 2017.11"
|
||||
depends on BR2_arm
|
||||
depends on BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8
|
||||
depends on BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8A
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
depends on BR2_ARM_EABIHF
|
||||
depends on !BR2_STATIC_LIBS
|
||||
@@ -14,13 +14,13 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
|
||||
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_HEADERS_AT_LEAST_4_10
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
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
|
||||
GCC 2017.11 (based on gcc 7.2.1), Linaro GDB 2017.11 (based on
|
||||
GDB 8.0), glibc 2.25, Binutils 2017.11 (based on 2.28). 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
|
||||
|
||||
@@ -1,3 +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
|
||||
sha256 72919a3a99d4e28309bc8b0e615f44c65824ef012de50db3ffe9a34776e6f510 gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabihf.tar.xz
|
||||
sha256 cee0087b1f1205b73996651b99acd3a926d136e71047048f1758ffcec69b1ca2 gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
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
|
||||
TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION = 2017.11
|
||||
TOOLCHAIN_EXTERNAL_LINARO_ARM_SITE = https://releases.linaro.org/components/toolchain/binaries/7.2-$(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
|
||||
TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-7.2.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
|
||||
TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-7.2.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)-x86_64_arm-linux-gnueabihf.tar.xz
|
||||
endif
|
||||
|
||||
$(eval $(toolchain-external-package))
|
||||
|
||||
@@ -4,9 +4,9 @@ comment "Linaro toolchains available for Cortex-A + EABIhf"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
|
||||
bool "Linaro armeb 2017.08"
|
||||
bool "Linaro armeb 2017.11"
|
||||
depends on BR2_armeb
|
||||
depends on BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8
|
||||
depends on BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8A
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
depends on BR2_ARM_EABIHF
|
||||
depends on !BR2_STATIC_LIBS
|
||||
@@ -14,13 +14,13 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
|
||||
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_HEADERS_AT_LEAST_4_10
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
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
|
||||
uses Linaro GCC 2017.11 (based on gcc 7.2.1), Linaro GDB
|
||||
2017.11 (based on GDB 8.0), glibc 2.25, Binutils 2017.11
|
||||
(based on 2.28). 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.
|
||||
|
||||
@@ -1,3 +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
|
||||
sha256 1337734b61fa246ab20a371d2802d09ad80d7b17eb62327b3b69b9edfb6bc4a1 gcc-linaro-7.2.1-2017.11-i686_armeb-linux-gnueabihf.tar.xz
|
||||
sha256 c313149b6ea14e31f643aeee39e1460ae4245b75c75befd042ff4b63a07971c0 gcc-linaro-7.2.1-2017.11-x86_64_armeb-linux-gnueabihf.tar.xz
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
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
|
||||
TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION = 2017.11
|
||||
|
||||
TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SITE = https://releases.linaro.org/components/toolchain/binaries/7.2-$(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
|
||||
TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-7.2.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
|
||||
TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-7.2.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)-x86_64_armeb-linux-gnueabihf.tar.xz
|
||||
endif
|
||||
|
||||
$(eval $(toolchain-external-package))
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
|
||||
bool "Synopsys ARC 2016.09 toolchain"
|
||||
bool "Synopsys ARC 2017.09 toolchain"
|
||||
depends on BR2_arc
|
||||
depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_7
|
||||
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
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
|
||||
select BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
help
|
||||
Toolchain for the ARC cores, from
|
||||
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
|
||||
|
||||
@@ -1,5 +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
|
||||
# From https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2017.09-release
|
||||
sha256 ef74a7567a7341bc5e5d7bf6bcff64c2515be175d08a7def52df847583080ac2 arc_gnu_2017.09_prebuilt_uclibc_le_arc700_linux_install.tar.gz
|
||||
sha256 8a7620dd7500641de40adb2ae490d90d53fcad01d13f77ba305fc00df32a26e3 arc_gnu_2017.09_prebuilt_uclibc_be_arc700_linux_install.tar.gz
|
||||
sha256 ef7afba0da38cc08d863850f4987ebd16c71c8920c51990f490ad79389f102c1 arc_gnu_2017.09_prebuilt_uclibc_le_archs_linux_install.tar.gz
|
||||
sha256 eab1d4872298008bd141104368ec0b7873af600a09704827f767ae57b067c874 arc_gnu_2017.09_prebuilt_uclibc_be_archs_linux_install.tar.gz
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION = 2016.09
|
||||
TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION = 2017.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)
|
||||
|
||||
@@ -22,12 +22,19 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef BR_CCACHE
|
||||
static char ccache_path[PATH_MAX];
|
||||
#endif
|
||||
static char path[PATH_MAX];
|
||||
static char sysroot[PATH_MAX];
|
||||
/* As would be defined by gcc:
|
||||
* https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
|
||||
* sizeof() on string literals includes the terminating \0. */
|
||||
static char _time_[sizeof("-D__TIME__=\"HH:MM:SS\"")];
|
||||
static char _date_[sizeof("-D__DATE__=\"MMM DD YYYY\"")];
|
||||
|
||||
/**
|
||||
* GCC errors out with certain combinations of arguments (examples are
|
||||
@@ -35,12 +42,15 @@ static char sysroot[PATH_MAX];
|
||||
* that we only pass the predefined one to the real compiler if the inverse
|
||||
* option isn't in the argument list.
|
||||
* This specifies the worst case number of extra arguments we might pass
|
||||
* Currently, we have:
|
||||
* Currently, we may have:
|
||||
* -mfloat-abi=
|
||||
* -march=
|
||||
* -mcpu=
|
||||
* -D__TIME__=
|
||||
* -D__DATE__=
|
||||
* -Wno-builtin-macro-redefined
|
||||
*/
|
||||
#define EXCLUSIVE_ARGS 3
|
||||
#define EXCLUSIVE_ARGS 6
|
||||
|
||||
static char *predef_args[] = {
|
||||
#ifdef BR_CCACHE
|
||||
@@ -51,6 +61,9 @@ static char *predef_args[] = {
|
||||
#ifdef BR_ABI
|
||||
"-mabi=" BR_ABI,
|
||||
#endif
|
||||
#ifdef BR_NAN
|
||||
"-mnan=" BR_NAN,
|
||||
#endif
|
||||
#ifdef BR_FPU
|
||||
"-mfpu=" BR_FPU,
|
||||
#endif
|
||||
@@ -69,6 +82,9 @@ static char *predef_args[] = {
|
||||
#ifdef BR_NO_FUSED_MADD
|
||||
"-mno-fused-madd",
|
||||
#endif
|
||||
#ifdef BR_FP_CONTRACT_OFF
|
||||
"-ffp-contract=off",
|
||||
#endif
|
||||
#ifdef BR_BINFMT_FLAT
|
||||
"-Wl,-elf2flt",
|
||||
#endif
|
||||
@@ -157,6 +173,60 @@ static void check_unsafe_path(const char *arg,
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns false if SOURCE_DATE_EPOCH was not defined in the environment.
|
||||
*
|
||||
* Returns true if SOURCE_DATE_EPOCH is in the environment and represent
|
||||
* a valid timestamp, in which case the timestamp is formatted into the
|
||||
* global variables _date_ and _time_.
|
||||
*
|
||||
* Aborts if SOURCE_DATE_EPOCH was set in the environment but did not
|
||||
* contain a valid timestamp.
|
||||
*
|
||||
* Valid values are defined in the spec:
|
||||
* https://reproducible-builds.org/specs/source-date-epoch/
|
||||
* but we further restrict them to be positive or null.
|
||||
*/
|
||||
bool parse_source_date_epoch_from_env(void)
|
||||
{
|
||||
char *epoch_env, *endptr;
|
||||
time_t epoch;
|
||||
struct tm epoch_tm;
|
||||
|
||||
if ((epoch_env = getenv("SOURCE_DATE_EPOCH")) == NULL)
|
||||
return false;
|
||||
errno = 0;
|
||||
epoch = (time_t) strtoll(epoch_env, &endptr, 10);
|
||||
/* We just need to test if it is incorrect, but we do not
|
||||
* care why it is incorrect.
|
||||
*/
|
||||
if ((errno != 0) || !*epoch_env || *endptr || (epoch < 0)) {
|
||||
fprintf(stderr, "%s: invalid SOURCE_DATE_EPOCH='%s'\n",
|
||||
program_invocation_short_name,
|
||||
epoch_env);
|
||||
exit(1);
|
||||
}
|
||||
tzset(); /* For localtime_r(), below. */
|
||||
if (localtime_r(&epoch, &epoch_tm) == NULL) {
|
||||
fprintf(stderr, "%s: cannot parse SOURCE_DATE_EPOCH=%s\n",
|
||||
program_invocation_short_name,
|
||||
getenv("SOURCE_DATE_EPOCH"));
|
||||
exit(1);
|
||||
}
|
||||
if (!strftime(_time_, sizeof(_time_), "-D__TIME__=\"%T\"", &epoch_tm)) {
|
||||
fprintf(stderr, "%s: cannot set time from SOURCE_DATE_EPOCH=%s\n",
|
||||
program_invocation_short_name,
|
||||
getenv("SOURCE_DATE_EPOCH"));
|
||||
exit(1);
|
||||
}
|
||||
if (!strftime(_date_, sizeof(_date_), "-D__DATE__=\"%b %e %Y\"", &epoch_tm)) {
|
||||
fprintf(stderr, "%s: cannot set date from SOURCE_DATE_EPOCH=%s\n",
|
||||
program_invocation_short_name,
|
||||
getenv("SOURCE_DATE_EPOCH"));
|
||||
exit(1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char **args, **cur, **exec_args;
|
||||
@@ -178,7 +248,7 @@ int main(int argc, char **argv)
|
||||
perror(__FILE__ ": malloc");
|
||||
return 2;
|
||||
}
|
||||
sprintf(relbasedir, "%s/../..", argv[0]);
|
||||
sprintf(relbasedir, "%s/..", argv[0]);
|
||||
absbasedir = realpath(relbasedir, NULL);
|
||||
} else {
|
||||
basename = progpath;
|
||||
@@ -192,7 +262,7 @@ int main(int argc, char **argv)
|
||||
for (i = ret; i > 0; i--) {
|
||||
if (absbasedir[i] == '/') {
|
||||
absbasedir[i] = '\0';
|
||||
if (++count == 3)
|
||||
if (++count == 2)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -208,14 +278,14 @@ int main(int argc, char **argv)
|
||||
#elif defined(BR_CROSS_PATH_ABS)
|
||||
ret = snprintf(path, sizeof(path), BR_CROSS_PATH_ABS "/%s" BR_CROSS_PATH_SUFFIX, basename);
|
||||
#else
|
||||
ret = snprintf(path, sizeof(path), "%s/usr/bin/%s" BR_CROSS_PATH_SUFFIX, absbasedir, basename);
|
||||
ret = snprintf(path, sizeof(path), "%s/bin/%s" BR_CROSS_PATH_SUFFIX, absbasedir, basename);
|
||||
#endif
|
||||
if (ret >= sizeof(path)) {
|
||||
perror(__FILE__ ": overflow");
|
||||
return 3;
|
||||
}
|
||||
#ifdef BR_CCACHE
|
||||
ret = snprintf(ccache_path, sizeof(ccache_path), "%s/usr/bin/ccache", absbasedir);
|
||||
ret = snprintf(ccache_path, sizeof(ccache_path), "%s/bin/ccache", absbasedir);
|
||||
if (ret >= sizeof(ccache_path)) {
|
||||
perror(__FILE__ ": overflow");
|
||||
return 3;
|
||||
@@ -251,6 +321,20 @@ int main(int argc, char **argv)
|
||||
*cur++ = "-mfloat-abi=" BR_FLOAT_ABI;
|
||||
#endif
|
||||
|
||||
#ifdef BR_FP32_MODE
|
||||
/* add fp32 mode if soft-float is not args or hard-float overrides soft-float */
|
||||
int add_fp32_mode = 1;
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (!strcmp(argv[i], "-msoft-float"))
|
||||
add_fp32_mode = 0;
|
||||
else if (!strcmp(argv[i], "-mhard-float"))
|
||||
add_fp32_mode = 1;
|
||||
}
|
||||
|
||||
if (add_fp32_mode == 1)
|
||||
*cur++ = "-mfp" BR_FP32_MODE;
|
||||
#endif
|
||||
|
||||
#if defined(BR_ARCH) || \
|
||||
defined(BR_CPU)
|
||||
/* Add our -march/cpu flags, but only if none of
|
||||
@@ -272,6 +356,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
#endif /* ARCH || CPU */
|
||||
|
||||
if (parse_source_date_epoch_from_env()) {
|
||||
*cur++ = _time_;
|
||||
*cur++ = _date_;
|
||||
/* This has existed since gcc-4.4.0. */
|
||||
*cur++ = "-Wno-builtin-macro-redefined";
|
||||
}
|
||||
|
||||
paranoid_wrapper = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH");
|
||||
if (paranoid_wrapper && strlen(paranoid_wrapper) > 0)
|
||||
paranoid = 1;
|
||||
|
||||
@@ -28,8 +28,14 @@ endif
|
||||
|
||||
# Avoid FPU bug on XBurst CPUs
|
||||
ifeq ($(BR2_mips_xburst),y)
|
||||
# Before gcc 4.6, -mno-fused-madd was needed, after -ffp-contract is
|
||||
# needed
|
||||
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_6),y)
|
||||
TOOLCHAIN_WRAPPER_ARGS += -DBR_FP_CONTRACT_OFF
|
||||
else
|
||||
TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
|
||||
TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"'
|
||||
@@ -44,5 +50,5 @@ endef
|
||||
|
||||
define TOOLCHAIN_WRAPPER_INSTALL
|
||||
$(INSTALL) -D -m 0755 $(@D)/toolchain-wrapper \
|
||||
$(HOST_DIR)/usr/bin/toolchain-wrapper
|
||||
$(HOST_DIR)/bin/toolchain-wrapper
|
||||
endef
|
||||
|
||||
@@ -13,18 +13,18 @@ endif
|
||||
TOOLCHAIN_ADD_TOOLCHAIN_DEPENDENCY = NO
|
||||
|
||||
# Apply a hack that Rick Felker suggested[1] to avoid conflicts between libc
|
||||
# headers and kernel headers. This is a temporary measure until musl finds a
|
||||
# better solution.
|
||||
# headers and kernel headers. This is needed for kernel headers older than
|
||||
# 4.15. Kernel headers 4.15 and newer don't require __GLIBC__ to be defined.
|
||||
#
|
||||
# Augment the original suggestion with __USE_MISC since recent kernels
|
||||
# require this glibc internal macro. Also, as musl defines IFF_LOWER_UP,
|
||||
# IFF_DORMANT and IFF_ECHO, add another macro to suppress them in the
|
||||
# kernel header, and avoid macro/enum conflict.
|
||||
# (older than 4.15) require this glibc internal macro. Also, as musl defines
|
||||
# IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO, add another macro to suppress
|
||||
# them in the kernel header, and avoid macro/enum conflict.
|
||||
#
|
||||
# Kernel version 3.12 introduced the libc-compat.h header.
|
||||
#
|
||||
# [1] http://www.openwall.com/lists/musl/2015/10/08/2
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_MUSL)$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12),yy)
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_MUSL)$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15),yy:)
|
||||
define TOOLCHAIN_MUSL_KERNEL_HEADERS_COMPATIBILITY_HACK
|
||||
$(SED) 's/^#if defined(__GLIBC__)$$/#if 1/' \
|
||||
$(STAGING_DIR)/usr/include/linux/libc-compat.h
|
||||
@@ -39,4 +39,5 @@ endif
|
||||
|
||||
$(eval $(virtual-package))
|
||||
|
||||
toolchain: $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake
|
||||
toolchain: $(HOST_DIR)/share/buildroot/toolchainfile.cmake
|
||||
toolchain: $(HOST_DIR)/share/buildroot/Platform/Buildroot.cmake
|
||||
|
||||
Reference in New Issue
Block a user