summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.7
diff options
context:
space:
mode:
authorConstantin Musca <constantinx.musca@intel.com>2012-12-17 13:46:20 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-01 15:54:31 +0000
commit703b70c98a86771a891b46382f3ee20c4ef93f39 (patch)
treeb4a64935644ce22b6f58d47e3dea56c0ee38af90 /meta/recipes-devtools/gcc/gcc-4.7
parent62285873e2a6b9375a96a3de7a500205aeb18fb3 (diff)
downloadpoky-703b70c98a86771a891b46382f3ee20c4ef93f39.tar.gz
gcc: enable multilib for target gcc
- add a task to setup multilib configuration for target gcc - this commit adapts Nitin Kamble's work to gcc 4.7 - use a hash for storing arch-dependent multilib options - patch gcc in order to use the multilib config files from the build directory Tests: root@qemux86-64:~# gcc -m64 t.c -o t root@qemux86-64:~# file t t: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped root@qemux86-64:~# ./t Hello World ! root@qemux86-64:~# gcc -m32 t.c -o t root@qemux86-64:~# file t t: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped root@qemux86-64:~# ./t Hello World ! [YOCTO #1369] (From OE-Core rev: b26819c85881e82ee1b5c68840011e78c321f18e) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.7')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.7/use-ml-conf-files-from-B.patch87
1 files changed, 87 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/use-ml-conf-files-from-B.patch b/meta/recipes-devtools/gcc/gcc-4.7/use-ml-conf-files-from-B.patch
new file mode 100644
index 0000000000..4d229247a4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.7/use-ml-conf-files-from-B.patch
@@ -0,0 +1,87 @@
1Use the multilib config files from ${B} instead of using the ones from ${S}
2so that the source can be shared between gcc-cross-initial,
3gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
4
5Upstream-Status: Inappropriate [configuration]
6Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
7
8Index: gcc-4.7.2/gcc/configure
9===================================================================
10--- gcc-4.7.2.orig/gcc/configure
11+++ gcc-4.7.2/gcc/configure
12@@ -11717,10 +11717,20 @@ done
13 tmake_file_=
14 for f in ${tmake_file}
15 do
16- if test -f ${srcdir}/config/$f
17- then
18- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
19- fi
20+ case $f in
21+ */t-linux64 )
22+ if test -f ./config/$f
23+ then
24+ tmake_file_="${tmake_file_} ./config/$f"
25+ fi
26+ ;;
27+ * )
28+ if test -f ${srcdir}/config/$f
29+ then
30+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
31+ fi
32+ ;;
33+ esac
34 done
35 tmake_file="${tmake_file_}"
36
37@@ -11731,6 +11741,10 @@ tm_file_list="options.h"
38 tm_include_list="options.h insn-constants.h"
39 for f in $tm_file; do
40 case $f in
41+ */linux64.h )
42+ tm_file_list="${tm_file_list} ./config/$f"
43+ tm_include_list="${tm_include_list} ./config/$f"
44+ ;;
45 ./* )
46 f=`echo $f | sed 's/^..//'`
47 tm_file_list="${tm_file_list} $f"
48Index: gcc-4.7.2/gcc/configure.ac
49===================================================================
50--- gcc-4.7.2.orig/gcc/configure.ac
51+++ gcc-4.7.2/gcc/configure.ac
52@@ -1701,10 +1701,20 @@ done
53 tmake_file_=
54 for f in ${tmake_file}
55 do
56- if test -f ${srcdir}/config/$f
57- then
58- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
59- fi
60+ case $f in
61+ */t-linux64 )
62+ if test -f ./config/$f
63+ then
64+ tmake_file_="${tmake_file_} ./config/$f"
65+ fi
66+ ;;
67+ * )
68+ if test -f ${srcdir}/config/$f
69+ then
70+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
71+ fi
72+ ;;
73+ esac
74 done
75 tmake_file="${tmake_file_}"
76
77@@ -1715,6 +1725,10 @@ tm_file_list="options.h"
78 tm_include_list="options.h insn-constants.h"
79 for f in $tm_file; do
80 case $f in
81+ */linux64.h )
82+ tm_file_list="${tm_file_list} ./config/$f"
83+ tm_include_list="${tm_include_list} ./config/$f"
84+ ;;
85 ./* )
86 f=`echo $f | sed 's/^..//'`
87 tm_file_list="${tm_file_list} $f"