Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What are the packages that cannot be build without GCC? #86

Open
mqrris opened this issue Aug 17, 2023 · 4 comments
Open

What are the packages that cannot be build without GCC? #86

mqrris opened this issue Aug 17, 2023 · 4 comments
Labels
question Further information is requested

Comments

@mqrris
Copy link

mqrris commented Aug 17, 2023

I'm searching for a way to build a custom linux system without GNU, as I only need it for specific desktop usage and nothing else.

@dslm4515
Copy link
Owner

dslm4515 commented Sep 4, 2023

I do not remember. This repo builds a final system without GCC. GCC is built at the end as an alternative compiler for packages (outside the scope of CMLFS) that require GCC and fail to compile with clang. At first GRUB won't compile without GCC but some else told me how to build it without clang.

The stage0 compiler is compiled by GCC. I haven't found a way to not use GCC to build the toolchain that will build the final system. Stage 0 and stage 1 compilers are used to build stage 2 compiler which becomes the compiler for the final system.

An example package that requires GCC and will not compile under clang is btop

UPDATE: btop++ now support clang ... since 1.3.x ?

@emrakyz
Copy link

emrakyz commented Sep 13, 2023

There is a Musl-Clang only profile on Gentoo Linux. It doesn't have GCC. Clang 16.0.6 can built almost everything now (excluding glibc). I am not completely sure though if it can be reproduced easily with LFS and if Gentoo uses certain patches or methods.

@dslm4515 Can we use this repo with latest version of LFS now? I have Nvidia GPU and I am waiting for NVK drivers that will be available with Linux 6.6 kernel. Right now official nvidia drivers do not support Musl and nouveau is problematic.

For grub, efistub can be used for a bootloader replacement without needing any dependencies or programs on UEFI motherboards.

By the way, is Bash completely necessary for this build? Is it used in the process or is it just a preference for the interactive shell? Can we replace it with Dash for example?

Thanks for the great contribution though. It's a very popular topic but there is no repo similar to this.

@dslm4515
Copy link
Owner

Can we use this repo with latest version of LFS now?

As a host? Yes, but will require some packages beyond LFS but found in BLFS. The current build method uses mussel to bootstrap the build.

For grub, efistub can be used for a bootloader replacement without needing any dependencies or programs on UEFI motherboards.

I included GRUB for motherboards with BIOS. For motherboards with UEFI, I just use rEFInd

Bash completely necessary for this build?

No. I have built it with Dash. I use bash as it's commonly installed and I use command-completion a lot.

As of this writing, CMLFS uses LLVM 15.0.6. I am currently testing the AMD64(aka x86_64) build to see if everything works, as I had issues before with packages in C++ not compiling. I really owe it to Chimera Linux as I could not update CMLFS past LLVM 11.0.0 without their patches to LLVM. So in a way, if Chimera Linux can build the latest version of LLVM, CMLFS will follow too.

build a custom linux system without GNU

In the future, I may maintain a separate branch for a pure non-GNU build of CMLFS ... its the bsd-userland branch. I think it still uses some GNU packages. Another distro dev is working with me on that branch.

@dslm4515 dslm4515 added the question Further information is requested label Sep 13, 2023
@emrakyz
Copy link

emrakyz commented Sep 13, 2023

How can Gentoo use the latest version of Clang, LLVM with their Musl-Clang-OpenRC only profiles and stage-3 tarballs? I have tried it and everything is bleeding edge with an update.

Do they use their own patches or patches from other distros?

Maybe you can check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: In progress
Development

No branches or pull requests

3 participants