firasuke / mussel

The shortest and fastest script to build working cross compilers targeting musl libc
ISC License
88 stars 12 forks source link

revamp dir structure, toolchains can now be moved anywhere #30

Closed ghost closed 5 months ago

ghost commented 6 months ago

Fixes #29. I had to alter the directory structure of the build process in order to make it work (./toolchain and ./sysroot are now one and the same) which may go against your intentions for what gets installed where, but I believe it's worth making the change as not being able to move the toolchains mussel.sh builds is a significant limitation. I also think it looks cleaner this way, but I suppose that's a matter of personal taste...

firasuke commented 6 months ago

Reviewing these changes while ensuring the sanity of the resulting toolchain will take some time.

ghost commented 5 months ago

No rush. I tried to implement this without altering the directory structure as much, but I couldn't make it work so having everything contained under toolchain/ seemed like the optimal solution. I tested the new build process on a few targets (aarch64, m68k, i486, x86-64 if I recall correctly) and everything functioned as expected (with the addition of being able to move toolchain/ anywhere, of course), and I also cross compiled busybox using the i486 toolchain as a sanity check so I'm fairly confident it works. I haven't yet done this on the others as I'm pretty certain there aren't any architecture-specific semantics that would cause the new directory structure to break specific targets, but if you think it's necessary I can test that. Thanks for your work on the mussel project!

ghost commented 5 months ago

Let me know if there's anything you want me to change or test in order to get this merged, I'm happy to do what I can since I believe this will be a fairly important improvement

firasuke commented 5 months ago

Let me know if there's anything you want me to change or test in order to get this merged, I'm happy to do what I can since I believe this will be a fairly important improvement

I apologize for the delay. I believe ensuring the sanity of the resulting toolchain is of utmost priority. I'll review your changes and perform some tests and see if we can get them merged.

Thanks for your contribution!

firasuke commented 5 months ago

So you're emptying prefixes and specifying DESTDIRs for everything. Sounds reasonable to me. But why specify a lib32?

I pushed some changes that might have broken your PR. I'll gladly merge your PR after you've resolved the conflicts.

ghost commented 5 months ago

If you want, I can test each build and see whether the lib32 directory is really needed; since multilib is disabled the separate directory may not be needed anyway. I've been meaning to look more thoroughly at the targets I added in prior PRs as well; I'm fairly confident most of them are implemented correctly but I know that at least the sh*-fdpic builds are broken, and they'll probably require patches similar to the ones used in musl-cross-make.

Please do. I really appreciate the PR, but we need to prioritize the sanity of the resulting toolchain as well. I'd say having the toolchain successfully build gcc is a good enough sanity test.

I just merged your changes into my fork so it should be good to go now. I'll do some testing and edit DOCUMENTATION.MD as needed to reflect my findings whenever I can make time for it this week; let me know if you want to wait for me to do so, otherwise I'll submit a new PR when I get around to it. Thanks!

Cool! For now I'll merge the PR, provided that enough testing of the resulting toolchains is done.