|
Message-ID: <20170709020015.GJ1627@brightrain.aerifal.cx> Date: Sat, 8 Jul 2017 22:00:15 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [cross compilation][bootstraping] installing target libc headers without a cross toolchain On Sat, Jul 08, 2017 at 11:58:39PM +0000, sylvain.bertrand@...il.com wrote: > Hi, > > What is the proper way to install target musl libc headers without the cross-toolchain? > > For the target sysroot I did install the linux headers in /sysroot/include > (~make ARCH=x86_64 install-headers), which I know are useless for the musl libc > configuration and build. Then I would like to install the bear target libc > headers in /sysroot/include. > > That _should_ allow me to compile a static libgcc and static libstdc++ from gcc > without musl libc being built. > > ---- > > I started to peak into the musl makefile, it seems install-headers makefile > target is just a raw copy of generic include files + arch specific include > files. No tricks? No generators or such trickeries? You'll notice that ALL_INCLUDES containes some generated headers (GENH), but these are generated purely by standard text processing tools, and do not depend on a cross toolchain. So yes, you can just run make ARCH=[whatever] install-headers. I think your approach will work for static target libs only, but if you want to do dynamic too, look at the approach in musl-cross-make: https://github.com/richfelker/musl-cross-make There, litecross/Makefile is responsible for building musl after binutils, gcc itself, and libgcc.a are built, but before any further target libs are. The combined binutils+gcc may be something of a distraction if you're trying to read it (and it's problematic, I'm trying to remove it) but it's orthogonal to this approach of building musl mid-gcc-build. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.