]> code.ossystems Code Review - openembedded-core.git/commitdiff
populate_sdk_ext: Ensure buildtools doesn't corrupt OECORE_NATIVE_SYSROOT
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 7 Aug 2020 20:13:35 +0000 (21:13 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Aug 2020 08:17:35 +0000 (09:17 +0100)
buildtools is built as a nativesdk which needs to use OECORE_NATIVE_SYSROOT
for its own purposes and can reset it. Save and restore the value
within the eSDK so the two don't clash.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/populate_sdk_ext.bbclass

index fd0da16e7ea2b73051b70800380fbd34598d5d1c..44d99cfb972f801c6f7f1842fdffa36ac3b6808f 100644 (file)
@@ -653,7 +653,10 @@ sdk_ext_postinst() {
 
                # Make sure when the user sets up the environment, they also get
                # the buildtools-tarball tools in their path.
+               echo "# Save and reset OECORE_NATIVE_SYSROOT as buildtools may change it" >> $env_setup_script
+               echo "SAVED=\"\$OECORE_NATIVE_SYSROOT\"" >> $env_setup_script
                echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script
+               echo "OECORE_NATIVE_SYSROOT=\"\$SAVED\"" >> $env_setup_script
        fi
 
        # Allow bitbake environment setup to be ran as part of this sdk.