summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.8/64bithack.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-03-26 19:14:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-22 14:45:04 +0100
commitc3cc4bfc83e53acdb2e7ef6ac139598a5ebd8a7f (patch)
tree2a3505dad8eb2a27605ee31906ed4c483d8528c3 /meta/recipes-devtools/gcc/gcc-4.8/64bithack.patch
parent7195096f5754245f2b495a1629c6eb5ae6427afe (diff)
downloadpoky-c3cc4bfc83e53acdb2e7ef6ac139598a5ebd8a7f.tar.gz
gcc-4.8: Add recipes
(From OE-Core rev: c850415a1bdbb9268114d90fd0fc4cb3479de9c5) Signed-off-by: Khem Raj <raj.khem@gmail.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.8/64bithack.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/64bithack.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/64bithack.patch b/meta/recipes-devtools/gcc/gcc-4.8/64bithack.patch
new file mode 100644
index 0000000000..f10df4ae37
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/64bithack.patch
@@ -0,0 +1,66 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3GCC has internal multilib handling code but it assumes a very specific rigid directory
4layout. The build system implementation of multilib layout is very generic and allows
5complete customisation of the library directories.
6
7This patch is a partial solution to allow any custom directories to be passed into gcc
8and handled correctly. It forces gcc to use the base_libdir (which is the current
9directory, "."). We need to do this for each multilib that is configured as we don't
10know which compiler options may be being passed into the compiler. Since we have a compiler
11per mulitlib at this point that isn't an issue.
12
13The one problem is the target compiler is only going to work for the default multlilib at
14this point. Ideally we'd figure out which multilibs were being enabled with which paths
15and be able to patch these entries with a complete set of correct paths but this we
16don't have such code at this point. This is something the target gcc recipe should do
17and override these platform defaults in its build config.
18
19RP 15/8/11
20
21Index: gcc-4.8.0/gcc/config/i386/t-linux64
22===================================================================
23--- gcc-4.8.0.orig/gcc/config/i386/t-linux64 2013-01-10 12:38:27.000000000 -0800
24+++ gcc-4.8.0/gcc/config/i386/t-linux64 2013-03-26 11:59:28.381766975 -0700
25@@ -32,7 +32,5 @@
26 #
27 comma=,
28 MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
29-MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
30-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
31-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
32-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
33+MULTILIB_DIRNAMES = . .
34+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
35Index: gcc-4.8.0/gcc/config/mips/t-linux64
36===================================================================
37--- gcc-4.8.0.orig/gcc/config/mips/t-linux64 2013-01-10 12:38:27.000000000 -0800
38+++ gcc-4.8.0/gcc/config/mips/t-linux64 2013-03-26 12:00:56.973768645 -0700
39@@ -17,10 +17,6 @@
40 # <http://www.gnu.org/licenses/>.
41
42 MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
43-MULTILIB_DIRNAMES = n32 32 64
44-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
45-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
46-MULTILIB_OSDIRNAMES = \
47- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
48- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
49- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
50+MULTILIB_DIRNAMES = . . .
51+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
52+
53Index: gcc-4.8.0/gcc/config/rs6000/t-linux64
54===================================================================
55--- gcc-4.8.0.orig/gcc/config/rs6000/t-linux64 2013-01-10 12:38:27.000000000 -0800
56+++ gcc-4.8.0/gcc/config/rs6000/t-linux64 2013-03-26 12:04:10.885772283 -0700
57@@ -26,7 +26,6 @@
58 # MULTILIB_OSDIRNAMES according to what is found on the target.
59
60 MULTILIB_OPTIONS = m64/m32
61-MULTILIB_DIRNAMES = 64 32
62+MULTILIB_DIRNAMES = . .
63 MULTILIB_EXTRA_OPTS = fPIC
64-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:powerpc64-linux-gnu)
65-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
66+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))