-
Notifications
You must be signed in to change notification settings - Fork 266
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
default binutils to disable compressed debug info #73
base: master
Are you sure you want to change the base?
Conversation
compressed debug info section is a relatively new feature, and having it on by default causes link errors when the built libraries (most notably libgcc) are later used with an older binutils version (for example binutils 2.27, which was mcm's default version until just recently).
example error encountered (while building fontconfig 2.13.1 for x32): |
I'm not sure what we should do with this. Compressed debug info is likely a really big win for building gigantic C++ projects that take up multiple GB of disk space due to debug info, but the problem of breaking older tooling is definitely frustrating. We should at least add an example for disabling it, and possibly do it by default as you've requested... |
for the record, in the case i describe i used mcm to compile a native gcc 6.5.0, whose libgcc.a then exposed the problem while using it inside a chroot with binutils 2.27.
certainly. though i'd argue that people that want this feature can simply add
that would work for me too |
distros using bleeding edge binutils default to produce compressed debug sections, even if debug info was disabled via -g0 in CFLAGS, which leads to error message like the following as soon as stage0 is built and the user tries to use the toolchain (e.g., for building stage1): /lib/gcc/x86_64-unknown-linux-gnu/3.4.6/../../../crti.o: file not recognized: File format not recognized or /bin/ld: /lib/gcc/x86_64-unknown-linux-gnu/3.4.6/../../../crtn.o: unable to initialize decompress status for section .debug_aranges more info in this PR: richfelker/musl-cross-make#73 other distros would probably just update to latest binutils to mitigate such an issue, but this opens pandora's box and leads to a chain of consequences such that gdb needs to be updated too, newer versions of which now use C++, etc. seen from a different PoV, sticking with an older and well-test binutils version for the time being has the nice effect that binaries produced on sabotage are way more portable and can be debugged with e.g. a 10 year old gdb without issues.
compressed debug info section is a relatively new feature, and having it on
by default causes link errors when the built libraries (most notably libgcc)
are later used with an older binutils version (for example binutils 2.27,
which was mcm's default version until just recently).