summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorAlexandru-Cezar Sardan <alexandru.sardan@freescale.com>2014-02-27 14:17:35 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-28 14:01:14 +0000
commit83b20f850881580660b74d571edf2f2586a7d473 (patch)
tree158e2b9eedd5d18b615555f1e05bb0f9f8d8d3ac /meta/recipes-devtools
parent9744e0fb0adc25d5a2c7c376ebfbf42abbe9e9ad (diff)
downloadpoky-83b20f850881580660b74d571edf2f2586a7d473.tar.gz
gcc: Enable SPE & AltiVec generation on powepc*linux target.
[ADT bug #5761] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=5761 Also this patch adds symlinks to libgcc such that a GCC configured by passing the target parameter without LIBCEXTENSION and ABIEXTENSION specifiers to find the correct startup files from a libgcc configured with these variables. (From OE-Core rev: 97f2a81d6796ddaf7bbaab86c2ab9039673c732c) Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.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')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch42
-rw-r--r--meta/recipes-devtools/gcc/libgcc.inc24
3 files changed, 66 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index fdd0c12ae0..f5e583d766 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -69,6 +69,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
69 file://0046-libatomic-deptracking.patch \ 69 file://0046-libatomic-deptracking.patch \
70 file://0047-repomembug.patch \ 70 file://0047-repomembug.patch \
71 file://0048-PR58854_fix_arm_apcs_epilogue.patch \ 71 file://0048-PR58854_fix_arm_apcs_epilogue.patch \
72 file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
72 " 73 "
73SRC_URI[md5sum] = "a3d7d63b9cb6b6ea049469a0c4a43c9d" 74SRC_URI[md5sum] = "a3d7d63b9cb6b6ea049469a0c4a43c9d"
74SRC_URI[sha256sum] = "09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8" 75SRC_URI[sha256sum] = "09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8"
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/meta/recipes-devtools/gcc/gcc-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
new file mode 100644
index 0000000000..b98f8ff01d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
@@ -0,0 +1,42 @@
1From 9e0e19eac2562f73858602fe26e2044eb8b20c47 Mon Sep 17 00:00:00 2001
2From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
3Date: Wed, 5 Feb 2014 16:52:31 +0200
4Subject: [PATCH] Enable SPE & AltiVec generation on powepc*linux target
5
6When is configured with --target=powerpc-linux, the resulting GCC will
7not be able to generate code for SPE targets (e500v1/v2).
8GCC configured with --target=powerpc-linuxspe will not be able to
9generate AltiVec instructions (for e6500).
10This patch modifies the configured file such that SPE or AltiVec code
11can be generated when gcc is configured with --target=powerpc-linux.
12The ABI and speciffic instructions can be selected through the
13"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
14
15Upstream-Status: Inappropriate [configuration]
16
17Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
18---
19 gcc/config.gcc | 7 ++++++-
20 1 file changed, 6 insertions(+), 1 deletion(-)
21
22diff --git a/gcc/config.gcc b/gcc/config.gcc
23index cb7a94e..d392c2b 100644
24--- a/gcc/config.gcc
25+++ b/gcc/config.gcc
26@@ -2068,7 +2068,12 @@ powerpc-*-rtems*)
27 tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm"
28 ;;
29 powerpc*-*-linux*)
30- tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
31+ case ${target} in
32+ powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
33+ tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" ;;
34+ *)
35+ tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h" ;;
36+ esac
37 extra_options="${extra_options} rs6000/sysv4.opt"
38 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
39 case ${target} in
40--
411.7.9.5
42
diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index fe98238677..b185660ffd 100644
--- a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -17,7 +17,8 @@ FILES_${PN}-dev = " \
17 ${libdir}/${TARGET_SYS}/${BINV}/32 \ 17 ${libdir}/${TARGET_SYS}/${BINV}/32 \
18 ${libdir}/${TARGET_SYS}/${BINV}/x32 \ 18 ${libdir}/${TARGET_SYS}/${BINV}/x32 \
19 ${libdir}/${TARGET_SYS}/${BINV}/n32 \ 19 ${libdir}/${TARGET_SYS}/${BINV}/n32 \
20 ${libdir}/${TARGET_SYS}/${BINV}/libgcc*" 20 ${libdir}/${TARGET_SYS}/${BINV}/libgcc* \
21 ${@base_conditional('TARGET_SYS_NO_EXTENSION', '${TARGET_SYS}', '', '${libdir}/${TARGET_SYS_NO_EXTENSION}', d)}"
21FILES_libgcov-dev = " \ 22FILES_libgcov-dev = " \
22 ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \ 23 ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
23 " 24 "
@@ -141,3 +142,24 @@ python do_multilib_install() {
141 os.unlink(dest) 142 os.unlink(dest)
142 os.symlink(src, dest) 143 os.symlink(src, dest)
143} 144}
145
146addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
147python do_extra_symlinks() {
148 targetsysnoext = d.getVar('TARGET_SYS_NO_EXTENSION', True)
149
150 if targetsysnoext != d.getVar('TARGET_SYS', True):
151 dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + targetsysnoext
152 src = d.getVar('TARGET_SYS', True)
153 if not os.path.lexists(dest):
154 os.symlink(src, dest)
155}
156
157python () {
158 targetsysnoext = d.getVar('TARGET_SYS', True)
159
160 for suffix in [d.getVar('ABIEXTENSION', True), d.getVar('LIBCEXTENSION', True)]:
161 if suffix and targetsysnoext.endswith(suffix):
162 targetsysnoext = targetsysnoext[:-len(suffix)]
163
164 d.setVar('TARGET_SYS_NO_EXTENSION', targetsysnoext)
165}