mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -119,12 +119,12 @@ copy_toolchain_sysroot = \
|
||||
done ; \
|
||||
for link in $$(find $(STAGING_DIR) -type l); do \
|
||||
target=$$(readlink $${link}) ; \
|
||||
if [ "$${target}" == "$${target\#/}" ] ; then \
|
||||
if [ "$${target}" == "$${target$(SHARP_SIGN)/}" ] ; then \
|
||||
continue ; \
|
||||
fi ; \
|
||||
relpath="$(call relpath_prefix,$${target\#/})" ; \
|
||||
echo "Fixing symlink $${link} from $${target} to $${relpath}$${target\#/}" ; \
|
||||
ln -sf $${relpath}$${target\#/} $${link} ; \
|
||||
relpath="$(call relpath_prefix,$${target$(SHARP_SIGN)/})" ; \
|
||||
echo "Fixing symlink $${link} from $${target} to $${relpath}$${target$(SHARP_SIGN)/}" ; \
|
||||
ln -sf $${relpath}$${target$(SHARP_SIGN)/} $${link} ; \
|
||||
done ; \
|
||||
relpath="$(call relpath_prefix,$${ARCH_LIB_DIR})" ; \
|
||||
if [ "$${relpath}" != "" ]; then \
|
||||
@@ -158,11 +158,16 @@ copy_toolchain_sysroot = \
|
||||
# Check the specified kernel headers version actually matches the
|
||||
# version in the toolchain.
|
||||
#
|
||||
# $1: sysroot directory
|
||||
# $2: kernel version string, in the form: X.Y
|
||||
# $1: build directory
|
||||
# $2: sysroot directory
|
||||
# $3: kernel version string, in the form: X.Y
|
||||
# $4: test to do for the latest kernel version, 'strict' or 'loose'
|
||||
# always 'strict' if this is not the latest version.
|
||||
#
|
||||
check_kernel_headers_version = \
|
||||
if ! support/scripts/check-kernel-headers.sh $(1) $(2); then \
|
||||
if ! support/scripts/check-kernel-headers.sh $(1) $(2) $(3) \
|
||||
$(if $(BR2_TOOLCHAIN_HEADERS_LATEST),$(4),strict); \
|
||||
then \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
@@ -179,7 +184,7 @@ check_gcc_version = \
|
||||
exit 0 ; \
|
||||
fi; \
|
||||
real_version=`$(1) -dumpversion` ; \
|
||||
if [[ ! "$${real_version}" =~ ^$${expected_version}\. ]] ; then \
|
||||
if [[ ! "$${real_version}." =~ ^$${expected_version}\. ]] ; then \
|
||||
printf "Incorrect selection of gcc version: expected %s.x, got %s\n" \
|
||||
"$${expected_version}" "$${real_version}" ; \
|
||||
exit 1 ; \
|
||||
@@ -341,6 +346,24 @@ check_cplusplus = \
|
||||
exit 1 ; \
|
||||
fi
|
||||
|
||||
#
|
||||
#
|
||||
# Check that the external toolchain supports D language
|
||||
#
|
||||
# $1: cross-gdc path
|
||||
#
|
||||
check_dlang = \
|
||||
__CROSS_GDC=$(strip $1) ; \
|
||||
__o=$(BUILD_DIR)/.br-toolchain-test-dlang.tmp ; \
|
||||
printf 'import std.stdio;\nvoid main() { writeln("Hello World!"); }\n' | \
|
||||
$${__CROSS_GDC} -x d -o $${__o} - ; \
|
||||
if test $$? -ne 0 ; then \
|
||||
rm -f $${__o}* ; \
|
||||
echo "D language support is selected but is not available in external toolchain" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
rm -f $${__o}* \
|
||||
|
||||
#
|
||||
#
|
||||
# Check that the external toolchain supports Fortran
|
||||
|
||||
Reference in New Issue
Block a user