diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-01-25 15:18:36 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-31 14:40:17 +0000 |
commit | bfb9ea2604557804bd8c16adb57ccdd868a4020f (patch) | |
tree | b44ba613afb3af4918083dfcdf32dc41dce3a599 /meta/files | |
parent | 3985eed70c194c3d9d0c6e94a65e2edfa3f29a8e (diff) | |
download | openembedded-core-bfb9ea2604557804bd8c16adb57ccdd868a4020f.tar.gz openembedded-core-bfb9ea2604557804bd8c16adb57ccdd868a4020f.tar.bz2 openembedded-core-bfb9ea2604557804bd8c16adb57ccdd868a4020f.zip |
toolchain-shar-extract: compare SDK and host gcc versions
If ext sdk is built by gcc version higher than host gcc version
and host gcc version is 4.8 or 4.9 the installation is known to
fail due to the way uninative sstate package is built.
It's a known issue and we don't have a way to fix it for above
mentioned combinations of build and host gcc versions.
Detected non-installable combinations of gcc versions and
print an installation error.
[YOCTO #10881]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/files')
-rw-r--r-- | meta/files/toolchain-shar-extract.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh index 9295ddc869..3f54c96cc0 100644 --- a/meta/files/toolchain-shar-extract.sh +++ b/meta/files/toolchain-shar-extract.sh @@ -11,6 +11,9 @@ export PATH=`echo "$PATH" | sed -e 's/:\.//' -e 's/::/:/'` INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") +INST_GCC_VER=$(gcc --version | sed -ne 's/.* \([0-9]\+\.[0-9]\+\)\.[0-9]\+.*/\1/p') +SDK_GCC_VER='@SDK_GCC_VER@' + verlte () { [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ] } @@ -112,6 +115,11 @@ fi # SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above if [ "$SDK_EXTENSIBLE" = "1" ]; then DEFAULT_INSTALL_DIR="@SDKEXTPATH@" + if [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '4.9' ] || [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '' ] || \ + [ "$INST_GCC_VER" = '4.9' -a "$SDK_GCC_VER" = '' ]; then + echo "Error: Incompatible SDK installer! Your host gcc version is $INST_GCC_VER and this SDK was built by gcc higher version." + exit 1 + fi fi if [ "$target_sdk_dir" = "" ]; then |