summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/gcc/gcc-4.5
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-09-23 02:51:31 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2011-09-22 23:42:28 +0200
commitadc2571887279bc80c2c4739f68fe4f5675cdeeb (patch)
tree72beaed6d2dfe0ec87d7521ac3611d1fa91e2905 /meta-oe/recipes-devtools/gcc/gcc-4.5
parentd8de37e032322202fa1e0b49f90b43a3d4cc0aff (diff)
downloadmeta-openembedded-adc2571887279bc80c2c4739f68fe4f5675cdeeb.tar.gz
gcc-4.5: Fix cross-gcc build for 64 bit targets
Building gcc-cross-intermediate for x86_64 failed since the notion of multlib has changed in oe-core. So we needed to sync 64bit hack patch from oe-core/gcc-4.6 into meta-oe 4.5 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-devtools/gcc/gcc-4.5')
-rw-r--r--meta-oe/recipes-devtools/gcc/gcc-4.5/64bithack.patch64
1 files changed, 56 insertions, 8 deletions
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/64bithack.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/64bithack.patch
index b5ba8a4b5..70330145e 100644
--- a/meta-oe/recipes-devtools/gcc/gcc-4.5/64bithack.patch
+++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/64bithack.patch
@@ -1,20 +1,68 @@
1By default gcc places 64 bit libs in a lib64 directory. This makes it use 1Upstream-Status: Inappropriate [embedded specific]
2"lib" instead.
3 2
4RP 25/7/10 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.
5 6
6Index: gcc-4.5.0/gcc/config/i386/t-linux64 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_5-branch/gcc/config/i386/t-linux64
7=================================================================== 22===================================================================
8--- gcc-4.5.0.orig/gcc/config/i386/t-linux64 2010-08-10 15:47:42.000000000 +0100 23--- gcc-4_5-branch.orig/gcc/config/i386/t-linux64 2011-09-22 11:37:51.188913390 -0700
9+++ gcc-4.5.0/gcc/config/i386/t-linux64 2010-08-10 15:47:47.000000000 +0100 24+++ gcc-4_5-branch/gcc/config/i386/t-linux64 2011-09-22 11:37:56.818913303 -0700
10@@ -24,8 +24,8 @@ 25@@ -24,8 +24,8 @@
11 # MULTILIB_OSDIRNAMES according to what is found on the target. 26 # MULTILIB_OSDIRNAMES according to what is found on the target.
12 27
13 MULTILIB_OPTIONS = m64/m32 28 MULTILIB_OPTIONS = m64/m32
14-MULTILIB_DIRNAMES = 64 32 29-MULTILIB_DIRNAMES = 64 32
15-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) 30-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
16+MULTILIB_DIRNAMES = . 32 31+MULTILIB_DIRNAMES = . .
17+MULTILIB_OSDIRNAMES = . $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) 32+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
18 33
19 LIBGCC = stmp-multilib 34 LIBGCC = stmp-multilib
20 INSTALL_LIBGCC = install-multilib 35 INSTALL_LIBGCC = install-multilib
36Index: gcc-4_5-branch/gcc/config/mips/t-linux64
37===================================================================
38--- gcc-4_5-branch.orig/gcc/config/mips/t-linux64 2011-06-16 17:59:02.000000000 -0700
39+++ gcc-4_5-branch/gcc/config/mips/t-linux64 2011-09-22 11:37:56.838913302 -0700
40@@ -17,8 +17,8 @@
41 # <http://www.gnu.org/licenses/>.
42
43 MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
44-MULTILIB_DIRNAMES = n32 32 64
45-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
46+MULTILIB_DIRNAMES = . . .
47+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
48
49 EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
50
51Index: gcc-4_5-branch/gcc/config/rs6000/t-linux64
52===================================================================
53--- gcc-4_5-branch.orig/gcc/config/rs6000/t-linux64 2011-06-16 17:58:58.000000000 -0700
54+++ gcc-4_5-branch/gcc/config/rs6000/t-linux64 2011-09-22 11:37:56.838913302 -0700
55@@ -32,11 +32,11 @@ TARGET_LIBGCC2_CFLAGS += -mno-minimal-to
56 # MULTILIB_OSDIRNAMES according to what is found on the target.
57
58 MULTILIB_OPTIONS = m64/m32 msoft-float
59-MULTILIB_DIRNAMES = 64 32 nof
60+MULTILIB_DIRNAMES = . . .
61 MULTILIB_EXTRA_OPTS = fPIC mstrict-align
62 MULTILIB_EXCEPTIONS = m64/msoft-float
63 MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
64-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
65+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
66 MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
67
68 softfp_wrap_start := '\#ifndef __powerpc64__'