All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] cross-canadian/libgcc: fix aarch64's multilib SDK
@ 2018-07-20  2:07 Lei Maohui
  2018-07-25  8:04 ` Robert Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Lei Maohui @ 2018-07-20  2:07 UTC (permalink / raw)
  To: openembedded-core

The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't,
this makes multilib sdk doesn't work, there will be error as following:

.../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld: cannot find crtbeginS.o: No such file or directo
.../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld: cannot find -lgcc
.../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld: cannot find -lgcc
collect2: error: ld returned 1 exit status

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
 meta/recipes-devtools/gcc/libgcc-common.inc | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index 848a476..a49fc98 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -145,11 +145,22 @@ fakeroot python do_extra_symlinks() {
     if bb.data.inherits_class('nativesdk', d):
         return
 
-    targetsys = d.getVar('BASETARGET_SYS')
+    base_targetsys = d.getVar('BASETARGET_SYS')
+    targetsys = d.getVar('TARGET_SYS')
+
+    if base_targetsys != targetsys:
+        dest = d.getVar('D') + d.getVar('libdir') + '/' + base_targetsys
+        dest_list = [dest]
+        # For multilib like aarch64 + arm, need 2 symlinks:
+        # 1) BASETARGET_SYS as usual
+        # 2) BASETARGET_SYS + "-gnueabi" for multilib
+        libce = d.getVar('LIBCEXTENSION')
+        abie = d.getVar('ABIEXTENSION')
+        if abie and libce and targetsys.endswith(libce + abie):
+            dest_list.append(dest + libce + abie)
+        src = targetsys
+        for dir in dest_list:
+            if not os.path.lexists(dir) and os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
+                os.symlink(src, dir)
 
-    if targetsys != d.getVar('TARGET_SYS'):
-        dest = d.getVar('D') + d.getVar('libdir') + '/' + targetsys
-        src = d.getVar('TARGET_SYS')
-        if not os.path.lexists(dest) and os.path.lexists(d.getVar('D') + d.getVar('libdir')):
-            os.symlink(src, dest)
 }
-- 
2.7.4





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] cross-canadian/libgcc: fix aarch64's multilib SDK
  2018-07-20  2:07 [PATCH v2] cross-canadian/libgcc: fix aarch64's multilib SDK Lei Maohui
@ 2018-07-25  8:04 ` Robert Yang
  2018-07-27  3:30   ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Yang @ 2018-07-25  8:04 UTC (permalink / raw)
  To: Lei Maohui, openembedded-core

Hi Maohui,

Thanks for sending it, I do think that oe-core needs this patch.

// Robert

On 06/26/2018 06:27 AM, Lei Maohui wrote:
> The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't,
> this makes multilib sdk doesn't work, there will be error as following:
> 
> .../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld: cannot find crtbeginS.o: No such file or directo
> .../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld: cannot find -lgcc
> .../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld: cannot find -lgcc
> collect2: error: ld returned 1 exit status
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
> ---
>   meta/recipes-devtools/gcc/libgcc-common.inc | 23 +++++++++++++++++------
>   1 file changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
> index 848a476..a49fc98 100644
> --- a/meta/recipes-devtools/gcc/libgcc-common.inc
> +++ b/meta/recipes-devtools/gcc/libgcc-common.inc
> @@ -145,11 +145,22 @@ fakeroot python do_extra_symlinks() {
>       if bb.data.inherits_class('nativesdk', d):
>           return
>   
> -    targetsys = d.getVar('BASETARGET_SYS')
> +    base_targetsys = d.getVar('BASETARGET_SYS')
> +    targetsys = d.getVar('TARGET_SYS')
> +
> +    if base_targetsys != targetsys:
> +        dest = d.getVar('D') + d.getVar('libdir') + '/' + base_targetsys
> +        dest_list = [dest]
> +        # For multilib like aarch64 + arm, need 2 symlinks:
> +        # 1) BASETARGET_SYS as usual
> +        # 2) BASETARGET_SYS + "-gnueabi" for multilib
> +        libce = d.getVar('LIBCEXTENSION')
> +        abie = d.getVar('ABIEXTENSION')
> +        if abie and libce and targetsys.endswith(libce + abie):
> +            dest_list.append(dest + libce + abie)
> +        src = targetsys
> +        for dir in dest_list:
> +            if not os.path.lexists(dir) and os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
> +                os.symlink(src, dir)
>   
> -    if targetsys != d.getVar('TARGET_SYS'):
> -        dest = d.getVar('D') + d.getVar('libdir') + '/' + targetsys
> -        src = d.getVar('TARGET_SYS')
> -        if not os.path.lexists(dest) and os.path.lexists(d.getVar('D') + d.getVar('libdir')):
> -            os.symlink(src, dest)
>   }
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] cross-canadian/libgcc: fix aarch64's multilib SDK
  2018-07-25  8:04 ` Robert Yang
@ 2018-07-27  3:30   ` Khem Raj
  2018-07-31  7:29     ` Lei, Maohui
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2018-07-27  3:30 UTC (permalink / raw)
  To: Robert Yang, Lei Maohui, openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 2871 bytes --]



On 7/25/18 1:04 AM, Robert Yang wrote:
> Hi Maohui,
> 
> Thanks for sending it, I do think that oe-core needs this patch.
> 
> // Robert
> 
> On 06/26/2018 06:27 AM, Lei Maohui wrote:
>> The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't,
>> this makes multilib sdk doesn't work, there will be error as following:
>>
>> .../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld:
>> cannot find crtbeginS.o: No such file or directo
>> .../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld:
>> cannot find -lgcc
>> .../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld:
>> cannot find -lgcc
>> collect2: error: ld returned 1 exit status
>>

Please test this patch with musl target preferably arm/aarch64
and also ppc/glibc by generating SDKs

>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
>> ---
>>   meta/recipes-devtools/gcc/libgcc-common.inc | 23
>> +++++++++++++++++------
>>   1 file changed, 17 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc
>> b/meta/recipes-devtools/gcc/libgcc-common.inc
>> index 848a476..a49fc98 100644
>> --- a/meta/recipes-devtools/gcc/libgcc-common.inc
>> +++ b/meta/recipes-devtools/gcc/libgcc-common.inc
>> @@ -145,11 +145,22 @@ fakeroot python do_extra_symlinks() {
>>       if bb.data.inherits_class('nativesdk', d):
>>           return
>>   -    targetsys = d.getVar('BASETARGET_SYS')
>> +    base_targetsys = d.getVar('BASETARGET_SYS')
>> +    targetsys = d.getVar('TARGET_SYS')
>> +
>> +    if base_targetsys != targetsys:
>> +        dest = d.getVar('D') + d.getVar('libdir') + '/' + base_targetsys
>> +        dest_list = [dest]
>> +        # For multilib like aarch64 + arm, need 2 symlinks:
>> +        # 1) BASETARGET_SYS as usual
>> +        # 2) BASETARGET_SYS + "-gnueabi" for multilib
>> +        libce = d.getVar('LIBCEXTENSION')
>> +        abie = d.getVar('ABIEXTENSION')
>> +        if abie and libce and targetsys.endswith(libce + abie):
>> +            dest_list.append(dest + libce + abie)
>> +        src = targetsys
>> +        for dir in dest_list:
>> +            if not os.path.lexists(dir) and
>> os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
>> +                os.symlink(src, dir)
>>   -    if targetsys != d.getVar('TARGET_SYS'):
>> -        dest = d.getVar('D') + d.getVar('libdir') + '/' + targetsys
>> -        src = d.getVar('TARGET_SYS')
>> -        if not os.path.lexists(dest) and
>> os.path.lexists(d.getVar('D') + d.getVar('libdir')):
>> -            os.symlink(src, dest)
>>   }
>>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] cross-canadian/libgcc: fix aarch64's multilib SDK
  2018-07-27  3:30   ` Khem Raj
@ 2018-07-31  7:29     ` Lei, Maohui
  0 siblings, 0 replies; 4+ messages in thread
From: Lei, Maohui @ 2018-07-31  7:29 UTC (permalink / raw)
  To: openembedded-core

> Please test this patch with musl target preferably arm/aarch64 and also
> ppc/glibc by generating SDKs

Ok, I'll test it.

Best regards.
Lei

> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Friday, July 27, 2018 11:31 AM
> To: Robert Yang; Lei, Maohui; openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH v2] cross-canadian/libgcc: fix aarch64's multilib
> SDK
> 
> 
> 
> On 7/25/18 1:04 AM, Robert Yang wrote:
> > Hi Maohui,
> >
> > Thanks for sending it, I do think that oe-core needs this patch.
> >
> > // Robert
> >
> > On 06/26/2018 06:27 AM, Lei Maohui wrote:
> >> The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't, this
> >> makes multilib sdk doesn't work, there will be error as following:
> >>
> >> .../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld:
> >> cannot find crtbeginS.o: No such file or directo
> >> .../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld:
> >> cannot find -lgcc
> >> .../usr/libexec/armeb-poky-linux-gux-linux-gnueabi/7.3.0/real-ld:
> >> cannot find -lgcc
> >> collect2: error: ld returned 1 exit status
> >>
> 
> Please test this patch with musl target preferably arm/aarch64 and also
> ppc/glibc by generating SDKs
> 
> >> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> >> Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
> >> ---
> >>   meta/recipes-devtools/gcc/libgcc-common.inc | 23
> >> +++++++++++++++++------
> >>   1 file changed, 17 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc
> >> b/meta/recipes-devtools/gcc/libgcc-common.inc
> >> index 848a476..a49fc98 100644
> >> --- a/meta/recipes-devtools/gcc/libgcc-common.inc
> >> +++ b/meta/recipes-devtools/gcc/libgcc-common.inc
> >> @@ -145,11 +145,22 @@ fakeroot python do_extra_symlinks() {
> >>       if bb.data.inherits_class('nativesdk', d):
> >>           return
> >>   -    targetsys = d.getVar('BASETARGET_SYS')
> >> +    base_targetsys = d.getVar('BASETARGET_SYS')
> >> +    targetsys = d.getVar('TARGET_SYS')
> >> +
> >> +    if base_targetsys != targetsys:
> >> +        dest = d.getVar('D') + d.getVar('libdir') + '/' +
> >> +base_targetsys
> >> +        dest_list = [dest]
> >> +        # For multilib like aarch64 + arm, need 2 symlinks:
> >> +        # 1) BASETARGET_SYS as usual
> >> +        # 2) BASETARGET_SYS + "-gnueabi" for multilib
> >> +        libce = d.getVar('LIBCEXTENSION')
> >> +        abie = d.getVar('ABIEXTENSION')
> >> +        if abie and libce and targetsys.endswith(libce + abie):
> >> +            dest_list.append(dest + libce + abie)
> >> +        src = targetsys
> >> +        for dir in dest_list:
> >> +            if not os.path.lexists(dir) and
> >> os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
> >> +                os.symlink(src, dir)
> >>   -    if targetsys != d.getVar('TARGET_SYS'):
> >> -        dest = d.getVar('D') + d.getVar('libdir') + '/' + targetsys
> >> -        src = d.getVar('TARGET_SYS')
> >> -        if not os.path.lexists(dest) and
> >> os.path.lexists(d.getVar('D') + d.getVar('libdir')):
> >> -            os.symlink(src, dest)
> >>   }
> >>




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-31  7:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20  2:07 [PATCH v2] cross-canadian/libgcc: fix aarch64's multilib SDK Lei Maohui
2018-07-25  8:04 ` Robert Yang
2018-07-27  3:30   ` Khem Raj
2018-07-31  7:29     ` Lei, Maohui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.