mailing list of musl libc
 help / color / mirror / code / Atom feed
* Re: MUSL 5.2.0 Static linking issue
       [not found] <CAOkOUeeO1gWK2jX8=_cYDS10YR+BRZHpoco0aPphHNJJ7too1A@mail.gmail.com>
@ 2015-12-02  0:37 ` Rich Felker
  0 siblings, 0 replies; only message in thread
From: Rich Felker @ 2015-12-02  0:37 UTC (permalink / raw)
  To: N Jain; +Cc: musl

I've CC'd the musl list which I think you intended to do; your
original cc was to musl-admin rather than musl so it didn't make it to
the list.

On Tue, Dec 01, 2015 at 12:37:28PM -0500, N Jain wrote:
> Hi,
> 
> 
> I am using MUSL 5.2.0 latest compiler for compiling my ARM application but

I assume you mean gcc 5.2.0 targeting musl?

> when I try to run the application I am getting issue at __set_thread_area
> API.

Can you show the actual error you're getting?

> I am not sure if the static linking is broken for MUSL 5.2.0 ? I am using
> following command to compile the application and using "-static" option
> while linking to ignore dynamic linking.
> 
> Please let me know how to avoid dynamic linking and how to resolve this ? I
> do want dynamic as well static linking capabilities so I am generating
> compile with default configuration.
> 
> arm-linux-musleabi-gcc -static-libgcc -static-libstdc++ -I. -MD -MP
> -mcpu=cortex-a15  -O2 -g  -Wall -Werror  -std=gnu11  -D_POSIX_SOURCE -c
> hello.c -o hello.o
> 
> arm-linux-musleabi-ld -static -nostartfiles $(OBJS) libs.a -Tlink.ld -o
> app.elf

Using ld directly is not expected to work unless you reproduce all the
options the compiler driver (gcc) would pass to it; the main place you
_might_ want to invoke ld directly is when doing
freestanding/bare-metal development, but musl is not going to be
useful for this out of the box; you'd need to customize it to your
environment. I can't tell from your email exactly what you're trying
to do, though.

Rich


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-02  0:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAOkOUeeO1gWK2jX8=_cYDS10YR+BRZHpoco0aPphHNJJ7too1A@mail.gmail.com>
2015-12-02  0:37 ` MUSL 5.2.0 Static linking issue 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).