<div dir="ltr">On Wed, Dec 4, 2013 at 9:43 AM, Martin Jansa <span dir="ltr"><<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Dec 04, 2013 at 09:07:54AM -0800, Iyad Qumei wrote:<br>
> The original icecc script does not handle toolchain content<br>
> properly, resulting in build failures, such as<br>
><br>
> gxx: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found<br>
><br>
> This patch brings in the latest script form the icecream source, and<br>
> modifies it for use in the OE build environment. The change was tested<br>
> with OE-Core built toolchain, and external toolchain.<br>
><br>
> Signed-off-by: Iyad Qumei <<a href="mailto:iyadkq@gmail.com">iyadkq@gmail.com</a>><br>
> ---<br>
> .../icecc-create-env-native/icecc-create-env | 266 +++++++++++++++-----<br>
> ...<a href="http://ive_0.1.bb" target="_blank">ive_0.1.bb</a> => <a href="http://icecc-create-env-native_1.0.1.bb" target="_blank">icecc-create-env-native_1.0.1.bb</a>} | 5 +-<br>
> 2 files changed, 209 insertions(+), 62 deletions(-)<br>
> rename meta/recipes-devtools/icecc-create-env/{<a href="http://icecc-create-env-native_0.1.bb" target="_blank">icecc-create-env-native_0.1.bb</a> => <a href="http://icecc-create-env-native_1.0.1.bb" target="_blank">icecc-create-env-native_1.0.1.bb</a>} (89%)<br>
<br>
</div>NACK<br>
<div class="im"><br></div></blockquote><div>What are you trying to say?<br></div><div>This patch was created per instructions on how submit patches.<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
><br>
> diff --git a/meta/recipes-devtools/icecc-create-env/icecc-create-env-native/icecc-create-env b/meta/recipes-devtools/icecc-create-env/icecc-create-env-native/icecc-create-env<br>
> index 7e4dbc4..0eb2217 100755<br>
> --- a/meta/recipes-devtools/icecc-create-env/icecc-create-env-native/icecc-create-env<br>
> +++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env-native/icecc-create-env<br>
> @@ -24,12 +24,12 @@ add_file ()<br>
> fi<br>
> test -z "$name" && return<br>
> # ls -H isn't really the same as readlink, but<br>
> - # readlink is not portable enough.<br>
> + # readlink is not portable enough.<br>
<br>
</div>Don't introduce trailing whitespaces<br></blockquote><div><br></div><div>There is no space problems here, I checked it in vi, and indentation looks consistent in the context.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5"><br>
> path=`ls -H $path`<br>
> toadd="$name=$path"<br>
> is_contained "$toadd" && return<br>
> if test -z "$silent"; then<br>
> - echo "adding file $toadd"<br>
> + echo "adding file $toadd"<br>
> fi<br>
> target_files="$target_files $toadd"<br>
> if test -x "$path"; then<br>
> @@ -43,19 +43,81 @@ add_file ()<br>
> # libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)<br>
> # /lib/ld-linux.so.2 (0xb7fe8000)<br>
> # covering both situations ( with => and without )<br>
> - for lib in `ldd "$path" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`; do<br>
> - test -f "$lib" || continue<br>
> - # Check wether the same library also exists in the parent directory,<br>
> - # and prefer that on the assumption that it is a more generic one.<br>
> - local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`<br>
> - test -f "$baselib" && lib=$baselib<br>
> - add_file "$lib"<br>
> - done<br>
> - fi<br>
> + for lib in `ldd "$path" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`; do<br>
> + test -f "$lib" || continue<br>
> + # Check wether the same library also exists in the parent directory,<br>
> + # and prefer that on the assumption that it is a more generic one.<br>
> + local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`<br>
> + test -f "$baselib" && lib=$baselib<br>
> + add_file "$lib"<br>
> + done<br>
> + fi<br>
<br>
</div></div>Don't mix tabs and spaces.<br>
<div><div class="h5"><br></div></div></blockquote><div>fixed.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
> fi<br>
> fi<br>
> }<br>
><br>
> +# returns abs path to filedir<br>
> +abs_path()<br>
> +{<br>
> + local path=$1<br>
> + if test -f "$path"; then<br>
> + pushd $(dirname $path) > /dev/null 2>&1<br>
> + dir_path=`pwd -P`<br>
> + path=$dir_path/$(basename $path)<br>
> + popd > /dev/null 2>&1<br>
> + elif test -d "$path"; then<br>
> + pushd $path > /dev/null 2>&1<br>
> + path=`pwd -P`<br>
> + popd > /dev/null 2>&1<br>
> + fi<br>
> + echo $path<br>
> +}<br>
> +<br>
> +# Search and add file to the tarball file.<br>
> +search_addfile()<br>
> +{<br>
> + local compiler=$1<br>
> + local file_name=$2<br>
> + local file_installdir=$3<br>
> + local file=""<br>
> +<br>
> + file=$($compiler -print-prog-name=$file_name)<br>
> +<br>
> + if test -z "$file" || test "$file" = "$file_name" || ! test -e "$file"; then<br>
> + file=`$compiler -print-file-name=$file_name`<br>
> + fi<br>
> +<br>
> + if ! test -e "$file"; then<br>
> + return 1<br>
> + fi<br>
> +<br>
> + if test -z "$file_installdir"; then<br>
> + # The file is going to be added to the tarball<br>
> + # in the same path where the compiler found it.<br>
> +<br>
> + file_installdir=$(dirname $file)<br>
> + abs_installdir=$(abs_path $file_installdir)<br>
> +<br>
> + if test "$file_installdir" != "$abs_installdir"; then<br>
> + # The path where the compiler found the file is relative!<br>
> + # If the path where the compiler found the file is relative<br>
> + # to compiler's path, we must change it to be relative to<br>
> + # /usr/bin path where the compiler is going to be installed<br>
> + # in the tarball file.<br>
> + # Replacing relative path by abs path because the tar command<br>
> + # used to create the tarball file doesn't work well with<br>
> + # relative path as installdir.<br>
> +<br>
> + compiler_basedir=$(abs_path ${compiler%/*/*})<br>
> + file_installdir=${abs_installdir/$compiler_basedir/"/usr"}<br>
> + fi<br>
> + fi<br>
> +<br>
> + add_file "$file" "$file_installdir/$file_name"<br>
> +<br>
> + return 0<br>
> +}<br>
> +<br>
> # backward compat<br>
> if test "$1" = "--respect-path"; then<br>
> shift<br>
> @@ -67,64 +129,151 @@ if test "$1" = "--silent"; then<br>
> shift<br>
> fi<br>
><br>
> -<br>
> -added_gcc=$1<br>
> -shift<br>
> -added_gxx=$1<br>
> -shift<br>
> -added_as=$1<br>
> -shift<br>
> -archive_name=$1<br>
> -<br>
> -if test -z "$added_gcc" || test -z "$added_gxx" ; then<br>
> - echo "usage: $0 <gcc_path> <g++_path>"<br>
> - exit 1<br>
> +if test "$1" != "--gcc" -a "$1" != "--clang"; then<br>
> + # backward compat<br>
> + added_gcc=$1<br>
> + shift<br>
> + added_gxx=$1<br>
> + shift<br>
> + added_as=$1<br>
> + shift<br>
> + archive_name=$1<br>
> + shift<br>
> + gcc=1<br>
> +else<br>
> + if test "$1" = "--gcc"; then<br>
> + shift<br>
> + added_gcc=$1<br>
> + shift<br>
> + added_gxx=$1<br>
> + shift<br>
> + added_as=$1<br>
> + shift<br>
> + archive_name=$1<br>
> + shift<br>
> + gcc=1<br>
> + elif test "$1" = "--clang"; then<br>
> + shift<br>
> + added_clang=$1<br>
> + shift<br>
> + added_compilerwrapper=$1<br>
> + shift<br>
> + clang=1<br>
> + else<br>
> + usage<br>
> + exit 1<br>
> + fi<br>
> fi<br>
><br>
> -if ! test -x "$added_gcc" ; then<br>
> - echo "'$added_gcc' is no executable."<br>
> - exit 1<br>
> +if test -n "$gcc"; then<br>
> + if test -z "$added_gcc" || test -z "$added_gxx"; then<br>
> + usage<br>
> + exit 1<br>
> + fi<br>
> + if ! test -x "$added_gcc" ; then<br>
> + echo "'$added_gcc' is no executable."<br>
> + exit 1<br>
> + fi<br>
> + if ! test -x "$added_gxx" ; then<br>
> + echo "'$added_gxx' is no executable."<br>
> + exit 1<br>
> + fi<br>
> + if test -z "$added_as" ; then<br>
> + add_file /usr/bin/as /usr/bin/as<br>
> + else<br>
> + if ! test -x "$added_as" ; then<br>
> + echo "'$added_as' is no executable."<br>
> + exit 1<br>
> + fi<br>
> + add_file $added_as /usr/bin/as<br>
> + fi<br>
> fi<br>
><br>
> -if ! test -x "$added_gxx" ; then<br>
> - echo "'$added_gcc' is no executable."<br>
> - exit 1<br>
> +if test -n "$clang"; then<br>
> + if ! test -x "$added_clang" ; then<br>
> + echo "'$added_clang' is no executable."<br>
> + exit 1<br>
> + fi<br>
> + if ! test -x "$added_compilerwrapper" ; then<br>
> + echo "'$added_compilerwrapper' is no executable."<br>
> + exit 1<br>
> + fi<br>
> fi<br>
><br>
> +extrafiles=<br>
> +while test "x$1" = "x--addfile"; do<br>
> + shift<br>
> + extrafiles="$extrafiles $1"<br>
> + shift<br>
> +done<br>
><br>
> +tempdir=`mktemp -d /tmp/iceccenvXXXXXX`<br>
><br>
> -add_file $added_gcc /usr/bin/gcc<br>
> -add_file $added_gxx /usr/bin/g++<br>
> +# for testing the environment is usable at all<br>
> +add_file /bin/true<br>
><br>
> -if test -z "$added_as" ; then<br>
> - add_file /usr/bin/as /usr/bin/as<br>
> -else<br>
> - if ! test -x "$added_as" ; then<br>
> - echo "'$added_as' is no executable."<br>
> - exit 1<br>
> - fi<br>
> +if test -n "$gcc"; then<br>
> + # getting compilers abs path<br>
> + added_gcc=$(abs_path $added_gcc)<br>
> + added_gxx=$(abs_path $added_gxx)<br>
><br>
> - add_file $added_as /usr/bin/as<br>
> -fi<br>
> + if test -z "$clang"; then<br>
> + add_file $added_gcc /usr/bin/gcc<br>
> + add_file $added_gxx /usr/bin/g++<br>
> + else<br>
> + # HACK: The clang case below will add a wrapper in place of gcc, so add the real<br>
> + # gcc under a different name that the wrapper will call.<br>
> + add_file $added_gcc /usr/bin/gcc.bin<br>
> + add_file $added_gxx /usr/bin/g++.bin<br>
> + fi<br>
> + add_file `$added_gcc -print-prog-name=cc1` /usr/bin/cc1<br>
> + add_file `$added_gxx -print-prog-name=cc1plus` /usr/bin/cc1plus<br>
> +<br>
> + gcc_as=$($added_gcc -print-prog-name=as)<br>
> + if test "$gcc_as" = "as"; then<br>
> + add_file /usr/bin/as<br>
> + else<br>
> + add_file "$gcc_as" /usr/bin/as<br>
> + fi<br>
><br>
> -add_file `$added_gcc -print-prog-name=cc1` /usr/bin/cc1<br>
> -add_file `$added_gxx -print-prog-name=cc1plus` /usr/bin/cc1plus<br>
> -specfile=`$added_gcc -print-file-name=specs`<br>
> -if test -n "$specfile" && test -e "$specfile"; then<br>
> - add_file "$specfile"<br>
> + search_addfile $added_gcc specs<br>
> + search_addfile $added_gcc liblto_plugin.so<br>
> fi<br>
><br>
> -ltofile=`$added_gcc -print-prog-name=lto1`<br>
> -pluginfile="${ltofile%lto1}liblto_plugin.so"<br>
> -if test -r "$pluginfile"<br>
> -then<br>
> - add_file $pluginfile ${pluginfile#*usr}<br>
> - add_file $pluginfile /usr${pluginfile#*usr}<br>
> +if test -n "$clang"; then<br>
> + add_file $added_clang /usr/bin/clang<br>
> + # HACK: Older icecream remotes have /usr/bin/{gcc|g++} hardcoded and wouldn't<br>
> + # call /usr/bin/clang at all. So include a wrapper binary that will call gcc or clang<br>
> + # depending on an extra argument added by icecream.<br>
> + add_file $added_compilerwrapper /usr/bin/gcc<br>
> + add_file $added_compilerwrapper /usr/bin/g++<br>
> +<br>
> + add_file $($added_clang -print-prog-name=as) /usr/bin/as<br>
> +<br>
> + # clang always uses its internal .h files<br>
> + clangincludes=$(dirname $($added_clang -print-file-name=include/limits.h))<br>
> + clangprefix=$(dirname $(dirname $added_clang))<br>
> + for file in $(find $clangincludes -type f); do<br>
> + # get path without ..<br>
> + destfile=$(readlink -e $file)<br>
> + # and convert from <prefix> to /usr if needed<br>
> + destfile=$(echo $destfile | sed "s#$clangprefix#/usr#" )<br>
> + add_file "$file" "$destfile"<br>
> + done<br>
> fi<br>
><br>
> -tempdir=`mktemp -d /tmp/iceccenvXXXXXX`<br>
> +for extrafile in $extrafiles; do<br>
> + add_file $extrafile<br>
> +done<br>
> +<br>
> +# IKLQ ?<br>
> +# special case for weird multilib setups<br>
> +for dir in /lib /lib64 /usr/lib /usr/lib64; do<br>
> + test -L $dir && cp -p $dir $tempdir$dir<br>
> +done<br>
> +<br>
> new_target_files=<br>
> -for i in $target_files; do<br>
> +for i in $target_files; do<br>
<br>
</div></div>Don't introduce trailing whitespaces<br></blockquote><div><br></div><div>fixed<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> case $i in<br>
> *=/*)<br>
> target=`echo $i | cut -d= -f1`<br>
> @@ -151,11 +300,11 @@ target_files=`for i in $new_target_files; do echo $i; done | sort`<br>
> #if not use the md5 of all files as the archive name<br>
> if test -z "$archive_name"; then<br>
> md5sum=NONE<br>
> - for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do<br>
> - if test -x $file; then<br>
> - md5sum=$file<br>
> - break<br>
> - fi<br>
> + for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5 /sbin/md5; do<br>
> + if test -x $file; then<br>
> + md5sum=$file<br>
> + break<br>
> + fi<br>
<br>
</div>Don't introduce wrong indenntation.<br></blockquote><div><br></div><div>Checked indentation in vi, looks consistent with context.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> done<br>
><br>
> #calculate md5 and use it as the archive name<br>
> @@ -190,3 +339,4 @@ tar -czhf "$mydir/$archive_name" $target_files || {<br>
> }<br>
> cd ..<br>
> rm -rf $tempdir<br>
> +<br>
> diff --git a/meta/recipes-devtools/icecc-create-env/<a href="http://icecc-create-env-native_0.1.bb" target="_blank">icecc-create-env-native_0.1.bb</a> b/meta/recipes-devtools/icecc-create-env/<a href="http://icecc-create-env-native_1.0.1.bb" target="_blank">icecc-create-env-native_1.0.1.bb</a><br>
> similarity index 89%<br>
> rename from meta/recipes-devtools/icecc-create-env/<a href="http://icecc-create-env-native_0.1.bb" target="_blank">icecc-create-env-native_0.1.bb</a><br>
> rename to meta/recipes-devtools/icecc-create-env/<a href="http://icecc-create-env-native_1.0.1.bb" target="_blank">icecc-create-env-native_1.0.1.bb</a><br>
> index b04474e..c03cf5a 100644<br>
> --- a/meta/recipes-devtools/icecc-create-env/<a href="http://icecc-create-env-native_0.1.bb" target="_blank">icecc-create-env-native_0.1.bb</a><br>
> +++ b/meta/recipes-devtools/icecc-create-env/<a href="http://icecc-create-env-native_1.0.1.bb" target="_blank">icecc-create-env-native_1.0.1.bb</a><br>
> @@ -6,16 +6,13 @@ SECTION = "base"<br>
> LICENSE = "GPLv2+"<br>
> LIC_FILES_CHKSUM = "file://icecc-create-env;beginline=2;endline=5;md5=ae1df3d6a058bfda40b66094c5f6065f"<br>
><br>
> -PR = "r2"<br>
> +PR = "r0"<br>
<br>
</div>drop<br></blockquote><div><br></div><div>why, this new recipe for version 1.0.1. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> DEPENDS = ""<br>
> INHIBIT_DEFAULT_DEPS = "1"<br>
><br>
> -FILESPATH = "${FILE_DIRNAME}/${PN}/"<br>
> -<br>
<br>
</div>You cannot drop it without moving file to BPN (see<br>
<a href="http://lists.openembedded.org/pipermail/openembedded-core/2013-December/087239.html" target="_blank">http://lists.openembedded.org/pipermail/openembedded-core/2013-December/087239.html</a><br></blockquote><div><br>
</div><div>You are actually referring us to a patch you just submitted after my message. This comment must be a joke!<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">)<br>
> inherit native<br>
><br>
> -PATCHTOOL = "patch"<br>
<br>
</div>You cannot drop it without causing dependency loop (see<br>
<a href="http://lists.openembedded.org/pipermail/openembedded-core/2013-December/087239.html" target="_blank">http://lists.openembedded.org/pipermail/openembedded-core/2013-December/087239.html</a><br></blockquote><div><br>
</div><div>ditto.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
)<br>
<div class="im"><br>
> SRC_URI = "file://icecc-create-env"<br>
><br>
> S = "${WORKDIR}"<br>
> --<br>
> 1.7.10.4<br>
><br>
</div>> _______________________________________________<br>
> Openembedded-core mailing list<br>
> <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Martin 'JaMa' Jansa jabber: <a href="mailto:Martin.Jansa@gmail.com">Martin.Jansa@gmail.com</a><br>
</font></span></blockquote></div><br></div></div>