This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building shared lib for ARM


What's wrong with Darpan's original messages?  They are CCed to
newlib@sourceware.org but neither do I get them as subscriber forward,
nor do they show up in the ML archives.  And they don't look like
HTML.


Corinna


On Apr  7 18:05, Jeff Johnston wrote:
> ----- Original Message -----
> > From: "Darpan KA" <darpanrulz@gmail.com>
> > To: "Jeff Johnston" <jjohnstn@redhat.com>
> > Cc: newlib@sourceware.org
> > Sent: Friday, April 3, 2015 12:49:13 AM
> > Subject: Re: Building shared lib for ARM
> > 
> > Dear Jeff,
> > I made the changes as below.
> > 1) configure.host file
> >    case "${host}" in
> >   i[34567]86-pc-linux-*)
> >     use_libtool=yes
> >     have_sys_mach_dir=yes
> >     stdio64_dir=stdio64
> >     oext=lo
> >     lpfx=
> >     aext=la
> >     ;;
> >  arm*)
> >     use_libtool=yes
> >     oext=lo
> >     lpfx=
> >     aext=la
> >     ;;
> >   *) ;; #shared library not supported for ${host}
> > esac
> > 
> > 2) libtool.m4
> > 
> > I replaced all the occurance of  AC_PROG_CC with LIB_AC_PROG_CC_GNU
> 
> Please attach your changes and send to me.
> 
> > 
> > I am still not able to build for arm.
> 
> You'll have to detail the errors you see for me to help you.  Are you building natively on an arm machine?
> You will have to specify --with-newlib on your configure so that the configuration doesn't disable the newlib build (it will be
> expecting a glibc library instead).
> 
> > Please may i know the reason why shared library supported only for i386 and
> > not arm & other platforms.
> > Is there any specific reason for it.
> >
> 
> The reason it is not supported is that it has never been worked on and requires changes
> to the build.  Originally, newlib was created to support embedded platforms (using a
> cross-compiler and static libraries) and users were expected to use glibc for native OSes such as Linux.  The Cygwin folks
> added support for building newlib into a dll while a newlib user submitted
> a Linux port for x86 that supported shared libraries when built natively under x86-linux.  It does not build
> via a cross-compiler because it expects to use various include files from the native system.
> 
> -- Jeff J.
>  
> > Best Regards,
> > Darpan
> > 
> > On Thu, Apr 2, 2015 at 10:21 PM, Jeff Johnston <jjohnstn@redhat.com> wrote:
> > 
> > > 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
> > > > >
> > > >
> > >
> > 

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: pgpCfBNyu8W2z.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]