mailing list of musl libc
 help / color / mirror / code / Atom feed
* Combine musl compiled library with gcc app?
@ 2019-01-18 15:41 John Mudd
  2019-01-18 15:52 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: John Mudd @ 2019-01-18 15:41 UTC (permalink / raw)
  To: musl, John Mudd

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

Is it possible to link a gcc compiled app with a musl compiled library? I
assume this would require linking with both glibc and musl libc libraries.

John

[-- Attachment #2: Type: text/html, Size: 200 bytes --]

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

* Re: Combine musl compiled library with gcc app?
  2019-01-18 15:41 Combine musl compiled library with gcc app? John Mudd
@ 2019-01-18 15:52 ` Rich Felker
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2019-01-18 15:52 UTC (permalink / raw)
  To: musl

On Fri, Jan 18, 2019 at 10:41:38AM -0500, John Mudd wrote:
> Is it possible to link a gcc compiled app with a musl compiled library? I
> assume this would require linking with both glibc and musl libc libraries.

I think you mean glibc, not gcc. If you have built libraries with
musl, they are almost certainly not suitable for loading by glibc.
They will not reference any versioned glibc symbols so would get
ancient, buggy versions of the glibc functions. In some cases, types
will mismatch too because of this; on 32-bit archs for example the
standard-name functions in glibc taking off_t expect it to be a 32-bit
type.

The other direction, building a library with glibc and loading it with
musl, *is* intended to work in almost all cases as long as you're not
using glibc-specific functions or glibc-specific extensions to
standard functions which musl does not support.

Neither of these is a really good idea though. If you're capable of
building the code from source it makes sense to build it properly for
the target it's going to be run on.

Rich


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

end of thread, other threads:[~2019-01-18 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 15:41 Combine musl compiled library with gcc app? John Mudd
2019-01-18 15:52 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).