From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12571 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Generating headers for a specific target Date: Thu, 1 Mar 2018 15:59:26 -0500 Message-ID: <20180301205926.GX1436@brightrain.aerifal.cx> References: <4A4C5FE4-F3DF-4A19-9D9B-EC7452756F10@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1519937861 12601 195.159.176.226 (1 Mar 2018 20:57:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Mar 2018 20:57:41 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12587-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 01 21:57:37 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1erVGi-0002ju-UB for gllmg-musl@m.gmane.org; Thu, 01 Mar 2018 21:57:37 +0100 Original-Received: (qmail 30014 invoked by uid 550); 1 Mar 2018 20:59:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 29986 invoked from network); 1 Mar 2018 20:59:38 -0000 Content-Disposition: inline In-Reply-To: <4A4C5FE4-F3DF-4A19-9D9B-EC7452756F10@gmail.com> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12571 Archived-At: 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