summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-5.1/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
blob: 873dca971686b2ac764d974396085c8a1bf17b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 3d870a184c05df1338db1870301c4144ba99fc3d Mon Sep 17 00:00:00 2001
From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
Date: Wed, 5 Feb 2014 16:52:31 +0200
Subject: [PATCH 30/35] Enable SPE & AltiVec generation on powepc*linux target

When is configured with --target=powerpc-linux, the resulting GCC will
not be able to generate code for SPE targets (e500v1/v2).
GCC configured with --target=powerpc-linuxspe will not be able to
generate AltiVec instructions (for e6500).
This patch modifies the configured file such that SPE or AltiVec code
can be generated when gcc is configured with --target=powerpc-linux.
The ABI and speciffic instructions can be selected through the
"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.

Upstream-Status: Inappropriate [configuration]

Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
---
 gcc/config.gcc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index b155744..0541b8a 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2337,7 +2337,14 @@ powerpc-*-rtems*)
 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
 	;;
 powerpc*-*-linux*)
-	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
+	case ${target} in
+	    powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
+		tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
+		;;
+	    *)
+		tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h"
+		;;
+	esac
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
 	extra_objs="$extra_objs rs6000-linux.o"
-- 
2.1.4