mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Generating headers for a specific target
Date: Thu, 1 Mar 2018 15:59:26 -0500	[thread overview]
Message-ID: <20180301205926.GX1436@brightrain.aerifal.cx> (raw)
In-Reply-To: <4A4C5FE4-F3DF-4A19-9D9B-EC7452756F10@gmail.com>

On Thu, Mar 01, 2018 at 09:49:42PM +0100, EJ wrote:
> Hello,
> 
> Is there a way to generate the headers for a specific target without
> having access to the target or a cross-compiler for the target?
> 
> I’m not interested in compiling must, just in a complete set of header files.

Yes, with a few caveats. Keep in mind that for archs with subarchs,
there will be preprocessor conditionals in the bits headers which
depend on predefined macros from the compiler, so you can't
use/process the headers without knowing the values of those macros.

With that said, something like this should work from a clean tree:

	make includedir=/where/you/want/them ARCH=whatever install-headers

or out-of-tree in a clean dir:

	make -f /path/to/musl/Makefile srcdir=/path/to/musl \
	includedir=/where/you/want/them ARCH=whatever install-headers

filling in ARCH=whatever with the musl name for the target arch (not
including the subarch part).

The above make invocations are not entirely documented/public
interfaces, but are probably 90% so and unlikely to change/break in
practice. It might be a good idea to check that they still work with
new versions when upgrading musl though.

Rich


  reply	other threads:[~2018-03-01 20:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 20:49 EJ
2018-03-01 20:59 ` Rich Felker [this message]
2018-03-01 21:12   ` EJ
2018-03-01 21:20     ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180301205926.GX1436@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).