diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-15 14:05:21 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-02 18:25:11 +0100 |
commit | c04ae9bf71920c6ea2315dc87b9250bb2f6560b3 (patch) | |
tree | fea20cd32f61b254842ffe0d73a752f212752fa4 /meta/recipes-devtools/gcc | |
parent | f9c3639238c2a9f1072e39ba26d0e521c5951b95 (diff) | |
download | poky-c04ae9bf71920c6ea2315dc87b9250bb2f6560b3.tar.gz |
gcc: Fix multilib baselib confusion
Commit 35fa8dc5f7da90fdd40091a3c3600d3fcd232922 changed the gcc recipes to use
baselib for the compiler location. This is fine as long as baselib happens to
match the platform multilib definition which is enabled at the time.
This patch fixes things so that gcc will honour whatever ${base_libdir} is
set to re-allowing suitable customisation of the system layout.
[YOCTO #1362]
(From OE-Core rev: bc5f293b151b9ba0d6660814d88ee5041efce318)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | 62 |
2 files changed, 55 insertions, 9 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc index 290d8f289c..380f9f7dae 100644 --- a/meta/recipes-devtools/gcc/gcc-4.6.inc +++ b/meta/recipes-devtools/gcc/gcc-4.6.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | require gcc-common.inc | 1 | require gcc-common.inc |
2 | 2 | ||
3 | PR = "r8" | 3 | PR = "r9" |
4 | 4 | ||
5 | # Third digit in PV should be incremented after a minor release | 5 | # Third digit in PV should be incremented after a minor release |
6 | # happens from this branch on gcc e.g. currently its 4.6.0 | 6 | # happens from this branch on gcc e.g. currently its 4.6.0 |
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch b/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch index 4b846bbf3a..d35753a06b 100644 --- a/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch +++ b/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | |||
@@ -1,22 +1,68 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | 1 | Upstream-Status: Inappropriate [embedded specific] |
2 | 2 | ||
3 | By default gcc places 64 bit libs in a lib64 directory. This makes it use | 3 | GCC has internal multilib handling code but it assumes a very specific rigid directory |
4 | "lib" instead. | 4 | layout. The build system implementation of multilib layout is very generic and allows |
5 | complete customisation of the library directories. | ||
5 | 6 | ||
6 | RP 25/7/10 | 7 | This patch is a partial solution to allow any custom directories to be passed into gcc |
8 | and handled correctly. It forces gcc to use the base_libdir (which is the current | ||
9 | directory, "."). We need to do this for each multilib that is configured as we don't | ||
10 | know which compiler options may be being passed into the compiler. Since we have a compiler | ||
11 | per mulitlib at this point that isn't an issue. | ||
7 | 12 | ||
8 | Index: gcc-4.6.0/gcc/config/i386/t-linux64 | 13 | The one problem is the target compiler is only going to work for the default multlilib at |
14 | this point. Ideally we'd figure out which multilibs were being enabled with which paths | ||
15 | and be able to patch these entries with a complete set of correct paths but this we | ||
16 | don't have such code at this point. This is something the target gcc recipe should do | ||
17 | and override these platform defaults in its build config. | ||
18 | |||
19 | RP 15/8/11 | ||
20 | |||
21 | Index: gcc-4_6-branch/gcc/config/i386/t-linux64 | ||
9 | =================================================================== | 22 | =================================================================== |
10 | --- gcc-4.6.0.orig/gcc/config/i386/t-linux64 | 23 | --- gcc-4_6-branch.orig/gcc/config/i386/t-linux64 2011-06-23 15:15:29.000000000 +0100 |
11 | +++ gcc-4.6.0/gcc/config/i386/t-linux64 | 24 | +++ gcc-4_6-branch/gcc/config/i386/t-linux64 2011-08-15 13:09:03.772415848 +0100 |
12 | @@ -24,8 +24,8 @@ | 25 | @@ -24,8 +24,8 @@ |
13 | # MULTILIB_OSDIRNAMES according to what is found on the target. | 26 | # MULTILIB_OSDIRNAMES according to what is found on the target. |
14 | 27 | ||
15 | MULTILIB_OPTIONS = m64/m32 | 28 | MULTILIB_OPTIONS = m64/m32 |
16 | -MULTILIB_DIRNAMES = 64 32 | 29 | -MULTILIB_DIRNAMES = 64 32 |
17 | -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) |
18 | +MULTILIB_DIRNAMES = . 32 | 31 | +MULTILIB_DIRNAMES = . . |
19 | +MULTILIB_OSDIRNAMES = . $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) | 32 | +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) |
20 | 33 | ||
21 | LIBGCC = stmp-multilib | 34 | LIBGCC = stmp-multilib |
22 | INSTALL_LIBGCC = install-multilib | 35 | INSTALL_LIBGCC = install-multilib |
36 | Index: gcc-4_6-branch/gcc/config/mips/t-linux64 | ||
37 | =================================================================== | ||
38 | --- gcc-4_6-branch.orig/gcc/config/mips/t-linux64 2011-08-15 13:06:13.732415763 +0100 | ||
39 | +++ gcc-4_6-branch/gcc/config/mips/t-linux64 2011-08-15 13:09:11.452419446 +0100 | ||
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 | |||
51 | Index: gcc-4_6-branch/gcc/config/rs6000/t-linux64 | ||
52 | =================================================================== | ||
53 | --- gcc-4_6-branch.orig/gcc/config/rs6000/t-linux64 2011-08-15 13:06:25.272415822 +0100 | ||
54 | +++ gcc-4_6-branch/gcc/config/rs6000/t-linux64 2011-08-15 13:09:21.062415878 +0100 | ||
55 | @@ -32,11 +32,11 @@ | ||
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__' | ||