summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-01-25 15:18:36 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-05 15:13:48 +0100
commit825e432a0c8c341abb945b703644f69fbcc93d3f (patch)
tree0b61216b02637a3a0d491f733a8eb628add8ef5c
parentccf7f86a496ad255dbf2dcc9ac8d65d8fdbddd00 (diff)
downloadpoky-825e432a0c8c341abb945b703644f69fbcc93d3f.tar.gz
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] (From OE-Core rev: bfb9ea2604557804bd8c16adb57ccdd868a4020f) (From OE-Core rev: 44a5277d25da5ab76e4bf8ad3f534a8e9a7b30eb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/populate_sdk_base.bbclass1
-rw-r--r--meta/files/toolchain-shar-extract.sh8
2 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 9514de679a..1f47a7cc80 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -226,6 +226,7 @@ EOF
226 -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \ 226 -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \
227 -e '/@SDK_PRE_INSTALL_COMMAND@/d' \ 227 -e '/@SDK_PRE_INSTALL_COMMAND@/d' \
228 -e '/@SDK_POST_INSTALL_COMMAND@/d' \ 228 -e '/@SDK_POST_INSTALL_COMMAND@/d' \
229 -e 's#@SDK_GCC_VER@#${@oe.utils.host_gcc_version(d)}#g' \
229 ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh 230 ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
230 231
231 # add execution permission 232 # add execution permission
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/::/:/'`
11INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") 11INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
12SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") 12SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
13 13
14INST_GCC_VER=$(gcc --version | sed -ne 's/.* \([0-9]\+\.[0-9]\+\)\.[0-9]\+.*/\1/p')
15SDK_GCC_VER='@SDK_GCC_VER@'
16
14verlte () { 17verlte () {
15 [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ] 18 [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ]
16} 19}
@@ -112,6 +115,11 @@ fi
112# SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above 115# SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above
113if [ "$SDK_EXTENSIBLE" = "1" ]; then 116if [ "$SDK_EXTENSIBLE" = "1" ]; then
114 DEFAULT_INSTALL_DIR="@SDKEXTPATH@" 117 DEFAULT_INSTALL_DIR="@SDKEXTPATH@"
118 if [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '4.9' ] || [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '' ] || \
119 [ "$INST_GCC_VER" = '4.9' -a "$SDK_GCC_VER" = '' ]; then
120 echo "Error: Incompatible SDK installer! Your host gcc version is $INST_GCC_VER and this SDK was built by gcc higher version."
121 exit 1
122 fi
115fi 123fi
116 124
117if [ "$target_sdk_dir" = "" ]; then 125if [ "$target_sdk_dir" = "" ]; then