All of lore.kernel.org
 help / color / mirror / Atom feed
* [for-krogoth] Backport for libc != glibc
@ 2016-06-18 13:27 Otavio Salvador
  2016-06-20 16:04 ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Otavio Salvador @ 2016-06-18 13:27 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

Hello,

At O.S. Systems we are involved in some projects which uses musl as
libC. For those, we are doing the SDK for faster development and found
that it is currently broken on Krogoth.

Master branch has the need fixes. The fixes needed are
OE-Core:2b9ae0ab and OE-Core:fcaaabb4

commit 2b9ae0ab056e62290f2328aa0d4dd70e6f138759
Author: Khem Raj <raj.khem@gmail.com>
Date:   Wed May 11 10:35:40 2016 -0700

    musl: Create symlinks for stub libraries

    Some libraries e.g. libm.so are needed to be
    created so that SDKs built with distros which
    disable static librararies can have the stubs
    and since default linker script requires -lm
    this helps in compiling applications with SDK

    there are .a equivalents for these libraries
    but they do not land in SDKs when static libs
    are disabled distrowide

    Signed-off-by: Khem Raj <raj.khem@gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

commit fcaaabb401fffcda4db9a7d1f927a2a404e4776d
Author: Khem Raj <raj.khem@gmail.com>
Date:   Wed May 11 10:35:45 2016 -0700

   gcc-runtime, libgcc: Symlink c++ header and startup files in
target_triplet for SDK use

   We build SDKs such that gcc-cross-candian is built for only one
   target *-*-linux and then use -muclibc or -mmusl to let it compile
   code for other libc variants. This works fine when libc = glibc
   however it does not work for c++ programs when libc != glibc since
   there are c++ headers installed under ${includedir}/c++/${BINV}/${TARGET_SYS}
   which is fine when gcc-runtime and gcc-cross-candian uses same
--target options
   gxx includedir searches in right triplet, but it fails with musl/uclibc
   since gcc will look for glibc based triplet but gcc-runtime will install
   them under musl/uclibc triplet.

   This patch symlinks the musl/uclibc triplet to glibc triplet when
libc != glibc

   This fixes SDKs for musl/uclibc

   Signed-off-by: Khem Raj <raj.khem@gmail.com>
   Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Backporting those, on top of current Krogoth branch, fixes the SDK
issues we had at the moment.

Could those be reviewed and queued for the next backport?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [for-krogoth] Backport for libc != glibc
  2016-06-18 13:27 [for-krogoth] Backport for libc != glibc Otavio Salvador
@ 2016-06-20 16:04 ` Khem Raj
  2016-06-20 16:08   ` Otavio Salvador
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2016-06-20 16:04 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Sat, Jun 18, 2016 at 6:27 AM, Otavio Salvador
<otavio.salvador@ossystems.com.br> wrote:
> Hello,
>
> At O.S. Systems we are involved in some projects which uses musl as
> libC. For those, we are doing the SDK for faster development and found
> that it is currently broken on Krogoth.
>
> Master branch has the need fixes. The fixes needed are
> OE-Core:2b9ae0ab and OE-Core:fcaaabb4
>
> commit 2b9ae0ab056e62290f2328aa0d4dd70e6f138759
> Author: Khem Raj <raj.khem@gmail.com>
> Date:   Wed May 11 10:35:40 2016 -0700
>
>     musl: Create symlinks for stub libraries
>
>     Some libraries e.g. libm.so are needed to be
>     created so that SDKs built with distros which
>     disable static librararies can have the stubs
>     and since default linker script requires -lm
>     this helps in compiling applications with SDK
>
>     there are .a equivalents for these libraries
>     but they do not land in SDKs when static libs
>     are disabled distrowide
>
>     Signed-off-by: Khem Raj <raj.khem@gmail.com>
>     Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> commit fcaaabb401fffcda4db9a7d1f927a2a404e4776d
> Author: Khem Raj <raj.khem@gmail.com>
> Date:   Wed May 11 10:35:45 2016 -0700
>
>    gcc-runtime, libgcc: Symlink c++ header and startup files in
> target_triplet for SDK use
>
>    We build SDKs such that gcc-cross-candian is built for only one
>    target *-*-linux and then use -muclibc or -mmusl to let it compile
>    code for other libc variants. This works fine when libc = glibc
>    however it does not work for c++ programs when libc != glibc since
>    there are c++ headers installed under ${includedir}/c++/${BINV}/${TARGET_SYS}
>    which is fine when gcc-runtime and gcc-cross-candian uses same
> --target options
>    gxx includedir searches in right triplet, but it fails with musl/uclibc
>    since gcc will look for glibc based triplet but gcc-runtime will install
>    them under musl/uclibc triplet.
>
>    This patch symlinks the musl/uclibc triplet to glibc triplet when
> libc != glibc
>
>    This fixes SDKs for musl/uclibc
>
>    Signed-off-by: Khem Raj <raj.khem@gmail.com>
>    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> Backporting those, on top of current Krogoth branch, fixes the SDK
> issues we had at the moment.
>
> Could those be reviewed and queued for the next backport?

They look fine for backport to krogoth. Please submit pull requests

>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [for-krogoth] Backport for libc != glibc
  2016-06-20 16:04 ` Khem Raj
@ 2016-06-20 16:08   ` Otavio Salvador
  2016-06-21  3:10     ` akuster808
  0 siblings, 1 reply; 4+ messages in thread
From: Otavio Salvador @ 2016-06-20 16:08 UTC (permalink / raw)
  To: Khem Raj, Armin Kuster; +Cc: Patches and discussions about the oe-core layer

On Mon, Jun 20, 2016 at 1:04 PM, Khem Raj <raj.khem@gmail.com> wrote:
...
>> Could those be reviewed and queued for the next backport?
>
> They look fine for backport to krogoth. Please submit pull requests

Armin can easily pick them; I gave the OE-Core hashes.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [for-krogoth] Backport for libc != glibc
  2016-06-20 16:08   ` Otavio Salvador
@ 2016-06-21  3:10     ` akuster808
  0 siblings, 0 replies; 4+ messages in thread
From: akuster808 @ 2016-06-21  3:10 UTC (permalink / raw)
  To: Otavio Salvador, Khem Raj; +Cc: Patches and discussions about the oe-core layer



On 06/20/2016 09:08 AM, Otavio Salvador wrote:
> On Mon, Jun 20, 2016 at 1:04 PM, Khem Raj <raj.khem@gmail.com> wrote:
> ...
>>> Could those be reviewed and queued for the next backport?
>>
>> They look fine for backport to krogoth. Please submit pull requests
> 
> Armin can easily pick them; I gave the OE-Core hashes.

Ok got them. running test builds.

- armin
> 


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

end of thread, other threads:[~2016-06-21  3:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-18 13:27 [for-krogoth] Backport for libc != glibc Otavio Salvador
2016-06-20 16:04 ` Khem Raj
2016-06-20 16:08   ` Otavio Salvador
2016-06-21  3:10     ` akuster808

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.