diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2013-06-26 12:38:47 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-09 10:53:56 +0100 |
commit | 73cdce8936d80b4115b7dac203cacaf3f99b6bbf (patch) | |
tree | 48213e9ba589a93841ff4877897f5d8f7ae66c2c /meta | |
parent | 271808b682d0b18912cf5b7cb19372fecdc7fde8 (diff) | |
download | poky-73cdce8936d80b4115b7dac203cacaf3f99b6bbf.tar.gz |
adt_installer_internal:fix perl lib version mismatch
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 #4758]
(From OE-Core master rev: 487d1fa7b79e89518494986461c157bace842613)
(From OE-Core rev: 82fea7bd0e9ba54ba0c4da2d8cb9734fa4f46f17)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rwxr-xr-x | meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal index 25c955a5cb..16677e71f1 100755 --- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal +++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal | |||
@@ -220,6 +220,13 @@ for l in $(find $NATIVE_INSTALL_DIR -type l); do | |||
220 | $SUDO ln -sfn $(readlink $l|sed -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:") $l | 220 | $SUDO ln -sfn $(readlink $l|sed -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:") $l |
221 | done | 221 | done |
222 | 222 | ||
223 | # find out all perl scripts in $OECORE_NATIVE_SYSROOT and modify them | ||
224 | # replacing the host perl with SDK perl. | ||
225 | for perl_script in $($SUDO grep -m 1 "^#!.*perl" -rl $OECORE_NATIVE_SYSROOT); do | ||
226 | $SUDO sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \ | ||
227 | "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script | ||
228 | done | ||
229 | |||
223 | echo_info "\nSuccessfully installed selected native ADT!" | 230 | echo_info "\nSuccessfully installed selected native ADT!" |
224 | } | 231 | } |
225 | 232 | ||