mailing list of musl libc
 help / color / mirror / code / Atom feed
* Using musl in a cross-compiling environment
@ 2013-01-30  0:03 Andre Renaud
  2013-01-30  3:43 ` idunham
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Renaud @ 2013-01-30  0:03 UTC (permalink / raw)
  To: musl

Hi,
We're investigating moving some of our future projects over to using
musl. All of our development is done in a cross-compiling environment
(hosted on x86_64, targeting various ARM platforms). We've done some
preliminary testing, and it has all gone well. However when we come to
start cross compiling third party packages, we generally run into
various minor issues. Mostly it is around getting configure to work
properly, pick up the correct compiler, and pass through the
appropriate flags. How do you guys normally cope with this? I know of
the musl-gcc command, but unfortunately when you're cross compiling
you generally need to have all of your commands with a similar prefix
(ie: arm-none-linux-gnueabi-gcc, arm-none-linux-gnueabi-strip etc...)
I thought of creating a bin directory with a bunch of scripts, which
have the same name as the original commands, and simply put the
'-spec' line in there, similar to musl-gcc.

Does anyone have any comments on how this is best achieved?

Regards,
Andre


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

* Re: Using musl in a cross-compiling environment
  2013-01-30  0:03 Using musl in a cross-compiling environment Andre Renaud
@ 2013-01-30  3:43 ` idunham
  0 siblings, 0 replies; 2+ messages in thread
From: idunham @ 2013-01-30  3:43 UTC (permalink / raw)
  To: musl

> Hi,
> We're investigating moving some of our future projects over to using
> musl. All of our development is done in a cross-compiling environment
> (hosted on x86_64, targeting various ARM platforms). We've done some
> preliminary testing, and it has all gone well. However when we come to
> start cross compiling third party packages, we generally run into
> various minor issues. Mostly it is around getting configure to work
> properly, pick up the correct compiler, and pass through the
> appropriate flags. How do you guys normally cope with this? I know of
> the musl-gcc command, but unfortunately when you're cross compiling
> you generally need to have all of your commands with a similar prefix
> (ie: arm-none-linux-gnueabi-gcc, arm-none-linux-gnueabi-strip etc...)
> I thought of creating a bin directory with a bunch of scripts, which
> have the same name as the original commands, and simply put the
> '-spec' line in there, similar to musl-gcc.

Only gcc needs the -spec line; ld gets parameters from gcc, cpp is no
longer used anywhere, and nothing else cares at all.

So basically, you should be able to go:
export REALGCC=arm-none-linux-gnueabi CC=musl-gcc

although, you might want a patched version of musl-gcc that defaults to
that compiler.

Option 2 is using the musl-cross toolchain instead.




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

end of thread, other threads:[~2013-01-30  3:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-30  0:03 Using musl in a cross-compiling environment Andre Renaud
2013-01-30  3:43 ` idunham

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).