summaryrefslogtreecommitdiffstats
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 18:07:26 +0100
commit596a1973d9ed42149758aecadc72bcaca8a85072 (patch)
tree22024fbbc88e006e1d01b3ac2f5bf8b40882b771 /meta/recipes-devtools/icecc-create-env
parent99dd3c0b2c0a3b116baa5bbd5e390768d699865b (diff)
downloadpoky-596a1973d9ed42149758aecadc72bcaca8a85072.tar.gz
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. (From OE-Core rev: 49d25ab464e0e02bb910a75791077b1393d22b6e) 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 0000000000..b396261d69
--- /dev/null
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-lto-update.patch
@@ -0,0 +1,103 @@
1--- a/icecc-create-env 2006-12-14 09:50:46.000000000 +0300
2+++ b/icecc-create-env 2011-08-31 17:52:45.000000000 +0400
3@@ -27,9 +27,6 @@
4 # readlink is not portable enough.
5 path=`ls -H $path`
6 toadd="$name=$path"
7- if test "$name" = "$path"; then
8- toadd=$path
9- fi
10 is_contained "$toadd" && return
11 if test -z "$silent"; then
12 echo "adding file $toadd"
13@@ -117,6 +114,14 @@
14 add_file "$specfile"
15 fi
16
17+ltofile=`$added_gcc -print-prog-name=lto1`
18+pluginfile="${ltofile%lto1}liblto_plugin.so"
19+if test -r "$pluginfile"
20+then
21+ add_file $pluginfile ${pluginfile#*usr}
22+ add_file $pluginfile /usr${pluginfile#*usr}
23+fi
24+
25 tempdir=`mktemp -d /tmp/iceccenvXXXXXX`
26 new_target_files=
27 for i in $target_files; do
28@@ -140,49 +147,44 @@
29 done
30
31 #sort the files
32- target_files=`for i in $new_target_files; do echo $i; done | sort`
33+target_files=`for i in $new_target_files; do echo $i; done | sort`
34
35 #test if an archive name was supplied
36 #if not use the md5 of all files as the archive name
37 if test -z "$archive_name"; then
38-md5sum=NONE
39-for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
40- if test -x $file; then
41- md5sum=$file
42- break
43- fi
44-done
45+ md5sum=NONE
46+ for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
47+ if test -x $file; then
48+ md5sum=$file
49+ break
50+ fi
51+ done
52
53-#calculate md5 and use it as the archive name
54-archive_name=`for i in $target_files; do $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'` || {
55- if test -z "$silent"; then
56- echo "Couldn't compute MD5 sum."
57+ #calculate md5 and use it as the archive name
58+ 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 || {
59+ if test -z "$silent"; then
60+ echo "Couldn't compute MD5 sum."
61+ fi
62+ exit 2
63+ }
64+ mydir=`pwd`
65+else
66+ mydir="`dirname "$archive_name"`"
67+
68+ #check if we have a full path or only a filename
69+ if test "$mydir" = "." ; then
70+ mydir=`pwd`
71+ else
72+ mydir=""
73 fi
74- exit 2
75-}
76-
77 fi
78
79 if test -z "$silent"; then
80-echo "creating $archive_name.tar.gz"
81+echo "creating $archive_name"
82 fi
83
84-if test -z "$archive_name"; then
85- mydir=`pwd`
86-else
87-# mydir=dirname ${archive_name}
88- mydir=${archive_name%/*}
89-
90-#check if we have a full path or only a filename
91- if test -z "$mydir"; then
92- mydir=`pwd`
93- else
94- mydir=""
95- fi
96-
97-fi
98 cd $tempdir
99-tar -czhf "$mydir/$archive_name".tar.gz $target_files || {
100+tar -czhf "$mydir/$archive_name" $target_files || {
101 if test -z "$silent"; then
102 echo "Couldn't create archive"
103 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 0000000000..9a440baccf
--- /dev/null
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
@@ -0,0 +1,29 @@
1DESCRIPTION = "This is a modified version of the icecc-create-env script in order to\
2make it work with OE."
3SECTION = "base"
4PRIORITY = "optional"
5# source file has just a "GPL" word, but upstream is GPLv2+.
6# most probably just GPL would be a mistake
7LICENSE = "GPLv2+"
8LIC_FILES_CHKSUM = "file://icecc-create-env;beginline=2;endline=5;md5=ae1df3d6a058bfda40b66094c5f6065f"
9
10PR = "r1"
11
12DEPENDS = ""
13INHIBIT_DEFAULT_DEPS = "1"
14
15inherit native
16
17PATCHTOOL = "patch"
18SRC_URI = "http://www.digital-opsis.com/openembedded/icecc-create-env-${PV}.tar.gz \
19 file://icecc-lto-update.patch "
20
21S = "${WORKDIR}"
22
23do_install() {
24 install -d ${D}/${bindir}
25 install -m 0755 ${WORKDIR}/icecc-create-env ${D}/${bindir}
26}
27
28SRC_URI[md5sum] = "641ec45fe377529c7fd914f77b11b44f"
29SRC_URI[sha256sum] = "9ff8360375432a7a5c476cc6d55b3fdea9d6f3edc080d295a60421d8f47b1834"