Building shared lib for ARM

Jeff Johnston jjohnstn@redhat.com
Tue Apr 7 13:50:00 GMT 2015


Looking into it, the problem is that libtool.m4 requires AC_PROG_CC which tries to
verify that the compiler works by building an executable.  In newlib, we replace
AC_PROG_CC with our own LIB_AC_PROG_CC_GNU macro.

As mentioned, it is not supported so you are in new territory.  I would
suggest the following.

Try editing libtool.m4 and replace AC_PROG_CC with newlib's LIB_AC_PROG_CC_GNU macro
or your own copy of it.  You can find the newlib macro in newlib/acinclude.m4.  If you can get that working, then
we just need to have our own version of libtool.m4 inside newlib.

-- Jeff J.

----- Original Message -----
> From: "Darpan KA" <darpanrulz@gmail.com>
> To: "Jeff Johnston" <jjohnstn@redhat.com>
> Cc: newlib@sourceware.org
> Sent: Wednesday, April 1, 2015 11:56:35 PM
> Subject: Re: Building shared lib for ARM
> 
> Dear Jeff,
> I have already tried that option and it does not work. Build fails with
> error "C compiler cannot create executables".
> Please help me what are the changes to be made in configure.host and other
> files to build shared library for arm.
> 
> Best Regards,
> Darpan
> 
> On Thursday, April 2, 2015, Jeff Johnston <jjohnstn@redhat.com> wrote:
> > Hi Darpan,
> >
> > This is not currently supported by the build.  There is an old comment
> about libtool trying to perform
> > an executable test which is an issue when building (i.e. library
> > doesn't exist yet), but I don't know if that comment is still valid.
> >
> > Assuming libtool support for arm works, you could try adding a target to
> configure.host
> > that would identify an arm shared target or perhaps add a check for a
> configuration variable
> > and add code to the normal arm configuration such that it would set:
> >
> > use_libtool=yes
> > a_ext=la
> > o_ext=lo
> > lpfx=
> >
> > Then, try your build.  You might require some other tweaks.
> >
> > -- Jeff J.
> >
> > ----- Original Message -----
> > From: "Darpan KA" <darpanrulz@gmail.com>
> > To: jjohnstn@redhat.com
> > Cc: newlib@sourceware.org
> > Sent: Wednesday, April 1, 2015 5:28:37 AM
> > Subject: Building shared lib for ARM
> >
> > Dear Jeff,
> > Please could you provide the steps to be followed to build shared newlib
> > for ARM.
> > I am abke to build only static library for ARM. Shared library builds ony
> > for i386.
> >
> > Best Regards,
> > Darpan
> >
> 



More information about the Newlib mailing list