-
Notifications
You must be signed in to change notification settings - Fork 263
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
Problem: how to customize linux kernel version and gcc version when compile a musl tool chain #123
Comments
The Linux version here has nothing to do with the kernel version you intend to run. It's just the one to pull headers from, if you want your output toolchain to install Linux kernel headers (non-essential, but some important things folks tend to want to compile, like busybox, depend on having them). Versions earlier than the earliest version mcm still supports are not compatible with musl - they have both incompatibility with As for GCC, 5.3.0 is still one of the versions we provide patches for, and it should just work. If you hit problems with it, please report them. |
Hi, I am facing a similar issue. Also trying to compile a cross-compiler for Linux kernel v4.1. In the Linux kernel source v4.1 include/linux folder, there are only gcc headers up to compiler-gcc5.h. However, when the musl-cross-make cross compiler makes a call to compiler-gcc.h, it attempts to include config-gcc9.h, which doesn't exist in the include/linux folder of v4.1 source code. I have tried changing the gcc version in config.mak to 5.2.0 but the resulting cross-compile binary (the gcc itself) was the same (same md5sum) and still demanded compiler-gcc9.h. From my understanding, the gcc version in config.mak is the gcc version used to compile the toolchain, which in this case doesn't affect the output toolchain. For now, I made an empty file named compiler-gcc9.h, but I am not sure if there will be issues later. Is there a way I can get musl-cross-make to use gcc5 and include compile-gcc5.h? Thank you! |
This was a known bug in Linux from that era, that it was not future-proof against compiling with GCC newer than the newest it knew about at the time. In case it has bugs (UB) that don't compile correctly with newer compilers, it might make sense to build it with an older one, but you can also just copy
This sounds like you did not actually rebuild. If you change the config variables you should remove the directory the build was in and restart from scratch, or manually set a different |
Hi, I meet the problem of compiling a musl cross compile tool chain for linux 4.1.17 and gcc 5, the new linux version is not fit for me. So I want to know how to change the compile script to include linux 4.1.17 and gcc 5 for musl.
The text was updated successfully, but these errors were encountered: