|
Message-ID: <20241221063253.GW10433@brightrain.aerifal.cx> Date: Sat, 21 Dec 2024 01:32:53 -0500 From: Rich Felker <dalias@...c.org> To: Markus Wichmann <nullplan@....net> Cc: musl@...ts.openwall.com, William Pickard <lollol222gg@...il.com> Subject: Re: Question: How can I mix 32-bit and 64-bit musl headers? On Fri, Dec 20, 2024 at 09:22:00AM +0100, Markus Wichmann wrote: > Am Thu, Dec 19, 2024 at 07:42:00PM -0500 schrieb William Pickard: > > So I'm trying to create my own Linux distribution where musl and LLVM are > > the primary libc, libc++ and compiler instead of gcc/glibc but I ran into > > an issue where bits/alltypes.h is 32-bit specific when trying to compile > > LLVM libc++ suite for 64-bit. > > > > Is there a specific way I should be installing headers for the 32-bit > > version? > > musl does not support multilib in any way. The issue you are reporting > sounds like musl is detecting the wrong architecture, because the > alltypes.h is generated for the target architecture. I'm guessing you > are building it the wrong way somehow, and I don't know how, because the > normal "./configure && make && sudo make install" does the right thing. musl fully supports multiarch, just not the gcc multilib directory layout with a shared include dir. The gcc layout is not compatible with third-party libraries that install headers generated for the particular system, so it's flawed to begin with, and it also doesn't work with how musl treats archs as separate. If you want to do multiarch with musl, just ensure your toolchain for each arch (treating 32-bit and 64-bit as independent archs) uses its own separate include and library paths. The ld-musl-*.so.1 files all go in /lib (they very intentionally have different names for each arch and subarch variant) and each needs a corresponding ld-musl-*.path file in /etc telling it where to look for shared libs for that arch. 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.