summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/icecc-create-env
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2011-09-16 10:55:15 +0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-16 17:36:27 +0100
commit49d25ab464e0e02bb910a75791077b1393d22b6e (patch)
tree9f4f53de8ec832e4c877515b63cd2db1e3757459 /meta/recipes-devtools/icecc-create-env
parent66f9045e17c39f5c64a0699b72ea460a0701717a (diff)
downloadopenembedded-core-49d25ab464e0e02bb910a75791077b1393d22b6e.tar.gz
openembedded-core-49d25ab464e0e02bb910a75791077b1393d22b6e.tar.bz2
openembedded-core-49d25ab464e0e02bb910a75791077b1393d22b6e.tar.xz
openembedded-core-49d25ab464e0e02bb910a75791077b1393d22b6e.zip
icecc-create-env: a tool to create icecc toolchain tarballs
IceCC needs tarballs with toolchains to work correctly. This is a version largely based on one from org.openembedded.dev, plus a patch to support recent compilers, LTO, etc. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/icecc-create-env')
-rw-r--r--meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-lto-update.patch103
-rw-r--r--meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb29
2 files changed, 132 insertions, 0 deletions
diff --git a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-lto-update.patch b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-lto-update.patch
new file mode 100644
index 000000000..b396261d6
--- /dev/null
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-lto-update.patch
@@ -0,0 +1,103 @@
+--- a/icecc-create-env 2006-12-14 09:50:46.000000000 +0300
++++ b/icecc-create-env 2011-08-31 17:52:45.000000000 +0400
+@@ -27,9 +27,6 @@
+ # readlink is not portable enough.
+ path=`ls -H $path`
+ toadd="$name=$path"
+- if test "$name" = "$path"; then
+- toadd=$path
+- fi
+ is_contained "$toadd" && return
+ if test -z "$silent"; then
+ echo "adding file $toadd"
+@@ -117,6 +114,14 @@
+ add_file "$specfile"
+ fi
+
++ltofile=`$added_gcc -print-prog-name=lto1`
++pluginfile="${ltofile%lto1}liblto_plugin.so"
++if test -r "$pluginfile"
++then
++ add_file $pluginfile ${pluginfile#*usr}
++ add_file $pluginfile /usr${pluginfile#*usr}
++fi
++
+ tempdir=`mktemp -d /tmp/iceccenvXXXXXX`
+ new_target_files=
+ for i in $target_files; do
+@@ -140,49 +147,44 @@
+ done
+
+ #sort the files
+- target_files=`for i in $new_target_files; do echo $i; done | sort`
++target_files=`for i in $new_target_files; do echo $i; done | sort`
+
+ #test if an archive name was supplied
+ #if not use the md5 of all files as the archive name
+ if test -z "$archive_name"; then
+-md5sum=NONE
+-for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
+- if test -x $file; then
+- md5sum=$file
+- break
+- fi
+-done
++ md5sum=NONE
++ for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
++ if test -x $file; then
++ md5sum=$file
++ break
++ fi
++ done
+
+-#calculate md5 and use it as the archive name
+-archive_name=`for i in $target_files; do $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'` || {
+- if test -z "$silent"; then
+- echo "Couldn't compute MD5 sum."
++ #calculate md5 and use it as the archive name
++ archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
++ if test -z "$silent"; then
++ echo "Couldn't compute MD5 sum."
++ fi
++ exit 2
++ }
++ mydir=`pwd`
++else
++ mydir="`dirname "$archive_name"`"
++
++ #check if we have a full path or only a filename
++ if test "$mydir" = "." ; then
++ mydir=`pwd`
++ else
++ mydir=""
+ fi
+- exit 2
+-}
+-
+ fi
+
+ if test -z "$silent"; then
+-echo "creating $archive_name.tar.gz"
++echo "creating $archive_name"
+ fi
+
+-if test -z "$archive_name"; then
+- mydir=`pwd`
+-else
+-# mydir=dirname ${archive_name}
+- mydir=${archive_name%/*}
+-
+-#check if we have a full path or only a filename
+- if test -z "$mydir"; then
+- mydir=`pwd`
+- else
+- mydir=""
+- fi
+-
+-fi
+ cd $tempdir
+-tar -czhf "$mydir/$archive_name".tar.gz $target_files || {
++tar -czhf "$mydir/$archive_name" $target_files || {
+ if test -z "$silent"; then
+ echo "Couldn't create archive"
+ fi
diff --git a/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb b/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
new file mode 100644
index 000000000..9a440bacc
--- /dev/null
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "This is a modified version of the icecc-create-env script in order to\
+make it work with OE."
+SECTION = "base"
+PRIORITY = "optional"
+# source file has just a "GPL" word, but upstream is GPLv2+.
+# most probably just GPL would be a mistake
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://icecc-create-env;beginline=2;endline=5;md5=ae1df3d6a058bfda40b66094c5f6065f"
+
+PR = "r1"
+
+DEPENDS = ""
+INHIBIT_DEFAULT_DEPS = "1"
+
+inherit native
+
+PATCHTOOL = "patch"
+SRC_URI = "http://www.digital-opsis.com/openembedded/icecc-create-env-${PV}.tar.gz \
+ file://icecc-lto-update.patch "
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/${bindir}
+ install -m 0755 ${WORKDIR}/icecc-create-env ${D}/${bindir}
+}
+
+SRC_URI[md5sum] = "641ec45fe377529c7fd914f77b11b44f"
+SRC_URI[sha256sum] = "9ff8360375432a7a5c476cc6d55b3fdea9d6f3edc080d295a60421d8f47b1834"