public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Can I compile newlib as a shared library on x86_64 linux-gnu?
@ 2016-11-18 13:28 Kai Yu
  2016-11-18 17:24 ` Jeff Johnston
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Yu @ 2016-11-18 13:28 UTC (permalink / raw)
  To: newlib

In newlib README file, it says that:

Shared newlib
=============

newlib uses libtool when it is being compiled natively (with
--target=i[34567]86-pc-linux-gnu) on an i[34567]86-pc-linux-gnu
host. This allows newlib to be compiled as a shared library.

To configure newlib, do the following from your build directory:

$(source_dir)/src/configure --with-newlib --prefix=$(install_dir)

configure will recognize that host == target ==
i[34567]86-pc-linux-gnu, so it will tell newlib to compile itself using
libtool. By default, libtool will build shared and static versions of
newlib.

Does it mean that we can build newlib shared library only on
i[34567]86-pc-linux-gnu host?
I tried to build newlib on x86_64-unknown-linux-gun just the way
above, but the Makefile generated
did nothing for newlib target. I also tried x86_64-unknown-linux-gun
as --target with cross-compiling
on i686-pc-linux-gnu, the Makefile still did nothing.
So please tell me can't we build newlib on x86_64 linux-gnu??

Thanks
Yu Kai

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

* Re: Can I compile newlib as a shared library on x86_64 linux-gnu?
  2016-11-18 13:28 Can I compile newlib as a shared library on x86_64 linux-gnu? Kai Yu
@ 2016-11-18 17:24 ` Jeff Johnston
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Johnston @ 2016-11-18 17:24 UTC (permalink / raw)
  To: Kai Yu; +Cc: newlib

The shared library version of newlib has only been set up for ix86 linux,
but not for x86_64 linux.  There hasn't been much feedback regarding it so
I am not sure many people are/were using it.  It should be relatively straight-forward to
make an x86_64 version if you want to give it a try.  Basically, you need to create
an x86_64 directory in each of the machine directories under libc/sys/linux.  You can
base files on the x86 versions.

That said, the x86 code hasn't been modified for a while and will likely need some
patching as it includes local system glibc header files which will have
been updated and may cause build issues.

-- Jeff J.

----- Original Message -----
> In newlib README file, it says that:
> 
> Shared newlib
> =============
> 
> newlib uses libtool when it is being compiled natively (with
> --target=i[34567]86-pc-linux-gnu) on an i[34567]86-pc-linux-gnu
> host. This allows newlib to be compiled as a shared library.
> 
> To configure newlib, do the following from your build directory:
> 
> $(source_dir)/src/configure --with-newlib --prefix=$(install_dir)
> 
> configure will recognize that host == target ==
> i[34567]86-pc-linux-gnu, so it will tell newlib to compile itself using
> libtool. By default, libtool will build shared and static versions of
> newlib.
> 
> Does it mean that we can build newlib shared library only on
> i[34567]86-pc-linux-gnu host?
> I tried to build newlib on x86_64-unknown-linux-gun just the way
> above, but the Makefile generated
> did nothing for newlib target. I also tried x86_64-unknown-linux-gun
> as --target with cross-compiling
> on i686-pc-linux-gnu, the Makefile still did nothing.
> So please tell me can't we build newlib on x86_64 linux-gnu??
> 
> Thanks
> Yu Kai
> 

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

end of thread, other threads:[~2016-11-18 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 13:28 Can I compile newlib as a shared library on x86_64 linux-gnu? Kai Yu
2016-11-18 17:24 ` Jeff Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).