Re: Shared Libraries for Newlib

Jeff Johnston <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAOox84tJaDPrfPFe3HTyEDRNqC+4-=SDGp1s=f+J4JFJM+pscQ@mail.gmail.com>
Hi Joel,

The shared library support for newlib was for host newlib builds (primarily
x86-linux but perhaps cygwin support as well?).  Anyway, that support has
been stripped out since linux was dropped and the build system rewritten.
It involved a number of things including libtool support via the top-level
libtool.m4.  There were special checks for USE_LIBTOOL in various
Makefile.am files and we had a separate oext variable for the object
extension (.lo instead of .o) and library (.la vs .a).

case "${host}" in
  i[34567]86-pc-linux-*)
    use_libtool=yes
    have_sys_mach_dir=yes
    stdio64_dir=stdio64
    oext=lo
    lpfx=
    aext=la ;;
  *) ;; #shared library not supported for ${host}
esac

If you want to look at what was there, take a look at newlib 3.1.0.

-- Jeff J.

On Thu, Sep 5, 2024 at 7:51 PM Joel Sherrill <[email protected]> wrote:

> Hi
>
> I am looking at porting RTEMS to a virtualized environment where the
> hypervisor can manage shared libraries for the clients. I would like to
> build gcc+newlib to produce both static and dynamic libraries. I tried
> adding --enable-shared to configure but didn't get any .so files.
>
> Is there some magic I am missing to configure an *-rtems* target to also
> produce .so libraries?
>
> Thanks.
>
> --joel
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.