Patchwork [1/1] gcc-cross-intermediate: revise the 64bithack.patch for multilib case

login
register
mail settings
Submitter Yu Ke
Date Aug. 14, 2011, 1:32 p.m.
Message ID <fdc4b5810c9adedea19d41a7856612201615e99c.1313328487.git.ke.yu@intel.com>
Download mbox | patch
Permalink /patch/9801/
State New, archived
Headers show

Comments

Yu Ke - Aug. 14, 2011, 1:32 p.m.
current gcc-cross-intermediate has build failure in qemux86-64 lib64
multilib case. the reason is that it still use lib instead of lib64
while do_install use the libdir i.e. lib64

so this patch fix this issue by making gcc honour the libdir.

CC: Kumar Gala <galak@kernel.crashing.org>
CC: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 meta/recipes-devtools/gcc/gcc-4.6.inc             |    2 +-
 meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch |   16 +++++++++-------
 2 files changed, 10 insertions(+), 8 deletions(-)
Khem Raj - Aug. 14, 2011, 3:18 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/14/2011 06:32 AM, Yu Ke wrote:
> current gcc-cross-intermediate has build failure in qemux86-64 lib64 
> multilib case. the reason is that it still use lib instead of lib64 
> while do_install use the libdir i.e. lib64
> 
> so this patch fix this issue by making gcc honour the libdir.

I think similar patch should be done to ppc and mips as well.

> 
> CC: Kumar Gala <galak@kernel.crashing.org> CC: Richard Purdie
> <richard.purdie@linuxfoundation.org>
> 
> Signed-off-by: Yu Ke <ke.yu@intel.com> --- 
> meta/recipes-devtools/gcc/gcc-4.6.inc             |    2 +- 
> meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch |   16
> +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc
> b/meta/recipes-devtools/gcc/gcc-4.6.inc index 0a148b4..ff8ca24
> 100644 --- a/meta/recipes-devtools/gcc/gcc-4.6.inc +++
> b/meta/recipes-devtools/gcc/gcc-4.6.inc @@ -1,6 +1,6 @@ require
> gcc-common.inc
> 
> -PR = "r7" +PR = "r8"
> 
> # Third digit in PV should be incremented after a minor release #
> 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
> 4b846bb..c1129ca 100644 ---
> a/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch +++
> b/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch @@ -5,18 +5,20 @@
> By default gcc places 64 bit libs in a lib64 directory. This makes it
> use
> 
> RP 25/7/10
> 
> +revise it to honour base_libdir + +Yu Ke <ke.yu@intel.com> Aug 13,
> 2011 + Index: gcc-4.6.0/gcc/config/i386/t-linux64 
> =================================================================== 
> --- gcc-4.6.0.orig/gcc/config/i386/t-linux64 +++
> gcc-4.6.0/gcc/config/i386/t-linux64 -@@ -24,8 +24,8 @@ - #
> MULTILIB_OSDIRNAMES according to what is found on the target. - +@@
> -25,7 +25,7 @@ + MULTILIB_OPTIONS = m64/m32 --MULTILIB_DIRNAMES = 64
> 32 + MULTILIB_DIRNAMES = 64 32 -MULTILIB_OSDIRNAMES = ../lib64 $(if
> $(wildcard $(shell echo
> $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) 
> -+MULTILIB_DIRNAMES = . 32 -+MULTILIB_OSDIRNAMES = . $(if $(wildcard
> $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) 
> - ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) $(if
> $(wildcard $(shell echo
> $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) + LIBGCC =
> stmp-multilib INSTALL_LIBGCC = install-multilib

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk5H51YACgkQuwUzVZGdMxQ8jgCfXo7MQSziJZqLCMjxgsakiac4
2UoAn3BoazvtV+hlGkGhMCBk9sOGuvYg
=emFC
-----END PGP SIGNATURE-----
Koen Kooi - Aug. 14, 2011, 5:31 p.m.
Op 14 aug. 2011, om 15:32 heeft Yu Ke het volgende geschreven:

> current gcc-cross-intermediate has build failure in qemux86-64 lib64
> multilib case. the reason is that it still use lib instead of lib64
> while do_install use the libdir i.e. lib64
> 
> so this patch fix this issue by making gcc honour the libdir.
> 
> CC: Kumar Gala <galak@kernel.crashing.org>
> CC: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> Signed-off-by: Yu Ke <ke.yu@intel.com>
> ---
> meta/recipes-devtools/gcc/gcc-4.6.inc             |    2 +-
> meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch |   16 +++++++++-------

wouldn't gcc 4.5 need a similar change?
Yu Ke - Aug. 15, 2011, 12:41 p.m.
On 2011/8/14 23:18, Khem Raj wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 08/14/2011 06:32 AM, Yu Ke wrote:
>> current gcc-cross-intermediate has build failure in qemux86-64 lib64
>> multilib case. the reason is that it still use lib instead of lib64
>> while do_install use the libdir i.e. lib64
>>
>> so this patch fix this issue by making gcc honour the libdir.
>
> I think similar patch should be done to ppc and mips as well.

According to Kumar, current ppc works just fine in multilib 64bit case. 
so ppc may not need this kind of patch. I am not sure how is mips. Since 
i am not familar with mips, i'd like to leave it to other mips expert.

Regards
Ke
Yu Ke - Aug. 15, 2011, 12:48 p.m.
On 2011/8/15 1:31, Koen Kooi wrote:
>
> Op 14 aug. 2011, om 15:32 heeft Yu Ke het volgende geschreven:
>
>> current gcc-cross-intermediate has build failure in qemux86-64 lib64
>> multilib case. the reason is that it still use lib instead of lib64
>> while do_install use the libdir i.e. lib64
>>
>> so this patch fix this issue by making gcc honour the libdir.
>>
>> CC: Kumar Gala<galak@kernel.crashing.org>
>> CC: Richard Purdie<richard.purdie@linuxfoundation.org>
>>
>> Signed-off-by: Yu Ke<ke.yu@intel.com>
>> ---
>> meta/recipes-devtools/gcc/gcc-4.6.inc             |    2 +-
>> meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch |   16 +++++++++-------
>
> wouldn't gcc 4.5 need a similar change?

yes, gcc 4.5 should also has this change. I will sent out another patch 
for this.

just curious question, what is gcc 4.5 for, since gcc 4.6 is already there?

Regards
Ke
Richard Purdie - Aug. 15, 2011, 1:16 p.m.
On Mon, 2011-08-15 at 20:48 +0800, Yu Ke wrote:
> On 2011/8/15 1:31, Koen Kooi wrote:
> >
> > Op 14 aug. 2011, om 15:32 heeft Yu Ke het volgende geschreven:
> >
> >> current gcc-cross-intermediate has build failure in qemux86-64 lib64
> >> multilib case. the reason is that it still use lib instead of lib64
> >> while do_install use the libdir i.e. lib64
> >>
> >> so this patch fix this issue by making gcc honour the libdir.
> >>
> >> CC: Kumar Gala<galak@kernel.crashing.org>
> >> CC: Richard Purdie<richard.purdie@linuxfoundation.org>
> >>
> >> Signed-off-by: Yu Ke<ke.yu@intel.com>
> >> ---
> >> meta/recipes-devtools/gcc/gcc-4.6.inc             |    2 +-
> >> meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch |   16 +++++++++-------
> >
> > wouldn't gcc 4.5 need a similar change?
> 
> yes, gcc 4.5 should also has this change. I will sent out another patch 
> for this.

Please take a look at:

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/ml4&id=4de8e0e9c286ff64f1b7fd2e695fe2d62fdadfbd

I've updated the patch header and ensured that whichever compiler
options are used, the compiler works as expected and also applied this
to mips and pcc.

Could you also please open a bug about target gcc multilib as mentioned
in the patch header (targeted at post 1.1).

> just curious question, what is gcc 4.5 for, since gcc 4.6 is already there?

Some people are still using gcc 4.5 for various reasons. It is getting
to the point we should probably move that to meta-oe though?

Cheers,

Richard
Yu Ke - Aug. 15, 2011, 2:24 p.m.
On 2011/8/15 21:16, Richard Purdie wrote:
> On Mon, 2011-08-15 at 20:48 +0800, Yu Ke wrote:
>> On 2011/8/15 1:31, Koen Kooi wrote:
>>>
>>> Op 14 aug. 2011, om 15:32 heeft Yu Ke het volgende geschreven:
>>>
>>>> current gcc-cross-intermediate has build failure in qemux86-64 lib64
>>>> multilib case. the reason is that it still use lib instead of lib64
>>>> while do_install use the libdir i.e. lib64
>>>>
>>>> so this patch fix this issue by making gcc honour the libdir.
>>>>
>>>> CC: Kumar Gala<galak@kernel.crashing.org>
>>>> CC: Richard Purdie<richard.purdie@linuxfoundation.org>
>>>>
>>>> Signed-off-by: Yu Ke<ke.yu@intel.com>
>>>> ---
>>>> meta/recipes-devtools/gcc/gcc-4.6.inc             |    2 +-
>>>> meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch |   16 +++++++++-------
>>>
>>> wouldn't gcc 4.5 need a similar change?
>>
>> yes, gcc 4.5 should also has this change. I will sent out another patch
>> for this.
>
> Please take a look at:
>
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/ml4&id=4de8e0e9c286ff64f1b7fd2e695fe2d62fdadfbd

Thanks. it is more comprehensive. just a small issue, the parentheses 
looks mismatching in

++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir) ../$(shell 
basename $(base_libdir)

>
> I've updated the patch header and ensured that whichever compiler
> options are used, the compiler works as expected and also applied this
> to mips and pcc.
>
> Could you also please open a bug about target gcc multilib as mentioned
> in the patch header (targeted at post 1.1).

done. http://bugzilla.yoctoproject.org/show_bug.cgi?id=1369

>
>> just curious question, what is gcc 4.5 for, since gcc 4.6 is already there?
>
> Some people are still using gcc 4.5 for various reasons. It is getting
> to the point we should probably move that to meta-oe though?
>
> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Khem Raj - Aug. 15, 2011, 3:49 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/15/2011 05:41 AM, Yu Ke wrote:
> On 2011/8/14 23:18, Khem Raj wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> On 08/14/2011 06:32 AM, Yu Ke wrote:
>>> current gcc-cross-intermediate has build failure in qemux86-64
>>> lib64 multilib case. the reason is that it still use lib instead
>>> of lib64 while do_install use the libdir i.e. lib64
>>> 
>>> so this patch fix this issue by making gcc honour the libdir.
>> 
>> I think similar patch should be done to ppc and mips as well.
> 
> According to Kumar, current ppc works just fine in multilib 64bit
> case. so ppc may not need this kind of patch. I am not sure how is
> mips. Since i am not familar with mips, i'd like to leave it to other
> mips expert.
> 

I guess since mips multilib is not yet there and /lib  is used by o32
abi even in multilib case things would be simple for mips.
Would using gcc defaults for x86_64 work ? It might break backward
compatibility in non multilib case

> Regards Ke

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEUEARECAAYFAk5JQCAACgkQuwUzVZGdMxQdLwCY1ijPd8bFknmc8OLI9/OUVTZf
FACfToqH6QXmIRNIuZkIAkYHSSiFaro=
=pfvK
-----END PGP SIGNATURE-----
Richard Purdie - Aug. 15, 2011, 4:21 p.m.
On Mon, 2011-08-15 at 22:24 +0800, Yu Ke wrote:
> On 2011/8/15 21:16, Richard Purdie wrote:
> > On Mon, 2011-08-15 at 20:48 +0800, Yu Ke wrote:
> >> On 2011/8/15 1:31, Koen Kooi wrote:
> >>>
> >>> Op 14 aug. 2011, om 15:32 heeft Yu Ke het volgende geschreven:
> >>>
> >>>> current gcc-cross-intermediate has build failure in qemux86-64 lib64
> >>>> multilib case. the reason is that it still use lib instead of lib64
> >>>> while do_install use the libdir i.e. lib64
> >>>>
> >>>> so this patch fix this issue by making gcc honour the libdir.
> >>>>
> >>>> CC: Kumar Gala<galak@kernel.crashing.org>
> >>>> CC: Richard Purdie<richard.purdie@linuxfoundation.org>
> >>>>
> >>>> Signed-off-by: Yu Ke<ke.yu@intel.com>
> >>>> ---
> >>>> meta/recipes-devtools/gcc/gcc-4.6.inc             |    2 +-
> >>>> meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch |   16 +++++++++-------
> >>>
> >>> wouldn't gcc 4.5 need a similar change?
> >>
> >> yes, gcc 4.5 should also has this change. I will sent out another patch
> >> for this.
> >
> > Please take a look at:
> >
> > http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/ml4&id=4de8e0e9c286ff64f1b7fd2e695fe2d62fdadfbd
> 
> Thanks. it is more comprehensive. just a small issue, the parentheses 
> looks mismatching in
> 
> ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir) ../$(shell 
> basename $(base_libdir)

Right, I've just noticed my test build was failing and that is likely
why :)

> > I've updated the patch header and ensured that whichever compiler
> > options are used, the compiler works as expected and also applied this
> > to mips and pcc.
> >
> > Could you also please open a bug about target gcc multilib as mentioned
> > in the patch header (targeted at post 1.1).
> 
> done. http://bugzilla.yoctoproject.org/show_bug.cgi?id=1369

Great, thanks.

Cheers,

Richard
Khem Raj - Aug. 16, 2011, 10:50 p.m.
On Mon, Aug 15, 2011 at 6:16 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>> just curious question, what is gcc 4.5 for, since gcc 4.6 is already there?
>
> Some people are still using gcc 4.5 for various reasons. It is getting
> to the point we should probably move that to meta-oe though?
>
>
meta-oe already has recipes for gcc 4.5 so may be removing them from
oe-core and letting people who want to use 4.5
use meta-oe

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
index 0a148b4..ff8ca24 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
@@ -1,6 +1,6 @@ 
 require gcc-common.inc
 
-PR = "r7"
+PR = "r8"
 
 # Third digit in PV should be incremented after a minor release
 # 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 4b846bb..c1129ca 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch
@@ -5,18 +5,20 @@  By default gcc places 64 bit libs in a lib64 directory. This makes it use
 
 RP 25/7/10
 
+revise it to honour base_libdir
+
+Yu Ke <ke.yu@intel.com> Aug 13, 2011
+
 Index: gcc-4.6.0/gcc/config/i386/t-linux64
 ===================================================================
 --- gcc-4.6.0.orig/gcc/config/i386/t-linux64
 +++ gcc-4.6.0/gcc/config/i386/t-linux64
-@@ -24,8 +24,8 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
- 
+@@ -25,7 +25,7 @@
+
  MULTILIB_OPTIONS = m64/m32
--MULTILIB_DIRNAMES = 64 32 
+ MULTILIB_DIRNAMES = 64 32 
 -MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
-+MULTILIB_DIRNAMES = . 32
-+MULTILIB_OSDIRNAMES = . $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
- 
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+
  LIBGCC = stmp-multilib
  INSTALL_LIBGCC = install-multilib