summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2013-03-01 17:58:31 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-01 13:03:29 +0000
commitaeb53bd78991af9fbb60d64176ec864cfc2ddbb9 (patch)
treeb4483574dd49f1077b6a78c535657d5325e8dd66 /meta
parent298dabb985a40de8974f597c1e9fb51c37e7c545 (diff)
downloadpoky-aeb53bd78991af9fbb60d64176ec864cfc2ddbb9.tar.gz
populate_sdk_base.bbclass:fix toolchain relocation issues
When run "autoreconf" in toolchain, there is an error if the host's perl's version is not the same as the one in the SDK, the error says that the executable perl mismatches the perl lib's version. This is because most of the autotools' scripts use the "#!/usr/bin/perl -w" which is host perl, but the gnu-configize uses "#! /usr/bin/env perl" which invokes the perl wrapper in the SDK, and the wrapper will set the PERL5LIB to the SDK which causes the mismatch. We can make all the perl scripts to use the host perl or the SDK perl to fix this problem. [YOCTO #3338] (From OE-Core rev: 365aa1412a3d31128cb3df02959acdc7df5f2ebc) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/populate_sdk_base.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index b99dc75fd1..88de1e48ac 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -274,6 +274,13 @@ fi
274# replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc 274# replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc
275$SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" 275$SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
276 276
277# find out all perl scripts in $native_sysroot and modify them replacing the
278# host perl with SDK perl.
279for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do
280 $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
281 "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
282done
283
277# change all symlinks pointing to ${SDKPATH} 284# change all symlinks pointing to ${SDKPATH}
278for l in $($SUDO_EXEC find $native_sysroot -type l); do 285for l in $($SUDO_EXEC find $native_sysroot -type l); do
279 $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l 286 $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l