Open dslm4515 opened 1 year ago
May I ask why is this an enhancement?
musl-obstack requires autotools to build (no configure script, just configue.ac)
But of course, elftoolchain requires libarchive ... so i guess it just trading musl-obstack for libarchive
Doesn't the kernel also require musl-obstack
? Or is that another dependency on libelf
?
I noticed that Chimera Linux does not have a musl-obstack package unlike Void and Linux. Per Alpine package repo, only libelf/elfutils [and other packages not built in MLFS] depends on musl-obstack. I lost my old notes when I first developed MLFS, as I'm sure i added musl-obstack for a reason [elfutils/libelf]
I am in the middle of building CMLFS with elftoolchain. I'll see if its an issue once I build the kernel
Okay, good luck! Please keep us updated.
I just realized compiling the Linux kernel (mainstream) might be tricky... i.e. objcopy
will not be from binutils, but from elf toolchain. I will be using Chimera Linux's cports repo for guidance
When compiling, there are lots of warnings but kernel compiles:
warning: objtool: gelf_update_symshndx: Invalid argument
warning: objtool: elf_update_symbol move
And.... I built CMLFS without binutils and GCC, except when I used mussel to build stage0 clang!
So were you able to replace libelf
from elfutils
and musl-obstack
by using elftoolchain
alone?
Yes. I was able to build CMLFS without libelf (elfutils) and musl-obstack... and without binutils & GCC for the final system.
Only drawback is that elftoolchain Requires bmake and lsb-tools (or a lsb-release script). Perhaps with enough patches, elftoolchain may build with GNU's make and without lsb-tools
Interesting, so we lost some dependencies, but gained two more.
Thanks for the update!
I also realized nothing depends on argp-standalone, according to Alpine Linux package database. This is false: v4l-utils requires it.
I am halfway done with a 2nd CMLFS build with elftoolchain... and came across this package. I will skip it to see if anything requires it. I think it was elfutils that did. Maybe.
In my previous CMLFS build, no package requires musl-obstack ...even up to when building mesa, wayland, and a DE.
Also, @firasuke you can now add CMLFS to projects that use mussel :P ... as master branch now does.
I also realized nothing depends on argp-standalone, according to Alpine Linux package database. I am halfway done with a 2nd CMLFS build with elftoolchain... and came across this package. I will skip it to see if anything requires it. I think it was elfutils that did. Maybe.
I am using libuargp instead of argp-standalone, and I think only libelf from elfutils depends on it. Same goes for musl-obstack, only elfutils depends on it.
Also, @firasuke you can now add CMLFS to projects that use mussel :P ... as master branch now does.
Already did, 2 weeks ago :)
I think oasis uses elftoolchain as well.
I found an updated fork of argp-standalone.... bumping the version from 1.3 to 1.5.0... lol, i guess with the success of elftoolchain and you mentioning libuargp, its no longer needed!
I think oasis uses elftoolchain as well.
Oasis? I'll have to check that.
I just checked today: Chimera Linux no longer uses elftoolchain. It apparently switched to elfutils in the past year or so. I couldn't find [a] definite reason[s].
This might make it harder for me to continue to use elftoolschain since I will have to develop patches when there is an issue.
Also, perhaps its time for me to re-evaluate my decision to replace elfutils with elftoolchain.
Also, perhaps its time for me to re-evaluate my decision to replace elfutils with elftoolchain.
What benefit does elftoolchain
provide over elfutils
?
From experience, elftoolchain can be used as a drop-in replacement for binutils (so far, I had no package fail to compile with elftoolchain). Although, it's not complete: 4 utilities & 2 libraries are not released (either planned, in-development, or in alpha-stage)... But enough to compile packages in CMLFS and BMLFS.
But in terms of compiling it, it requires bmake (and libarchive & LSB tools/script).
In my search for elftoolchain vs binutils comparisons, I realized elfutils is another alternative to binutils. I may consider trying elfutils as the system binary tools. I couldn't find any comparisons posted online...
For now, elftoolchain can be an alternative if for some reason Binutils fails to compile for whatever reason. Or for licensing issues(?).
elftoolchain precludes having libdw (which is a part of elfutils and links against libelf), which significantly reduces usefulness of tools like perf/strace; it also makes it impossible to build specific tools (e.g. flatpak-builder)
besides that, glacial development pace, lack of DT_RELR support, lack of debuginfod support, lack of objdump, etc
chimera has switched to having llvm provide the binutils (which are significantly more featureful and less buggy) and elfutils exists primarily for libelf/libdw
Replacing libelf/elfutils with elftoolchain will eliminate the need for musl-obstack
Binutils could be moved from /usr to /opt/gnu as secondary binutils OR Create a script to switch between elftoolchain and binutils