News for hackers. Stuff that matters.
Re:Zig cc: A drop-in replacement for GCC/Clang by luizfelberti on Tuesday March 24, 2020 @08:57PM (#22680858)
I don't think the parent comment's point was if this was technically possible.

glibc is GPL licensed, and the GPL explicitly forbids statically linking to it unless your code is GPL too.

Thus any non-GPL project has it's license tainted by the GPL if you statically link it.

It's not a technical limitation, it's a legal one.

Re:Zig cc: A drop-in replacement for GCC/Clang by cesarb on Tuesday March 24, 2020 @09:17PM (#22681010)
This is false. The license for glibc is the LGPL, not the GPL, and the LGPL has an exception to allow static linking without the whole code having to be under the LGPL, as long as the .o files are also distributed to allow linking with a modified glibc ("As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice [...] and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library.")
Re:Zig cc: A drop-in replacement for GCC/Clang by luizfelberti on Wednesday March 25, 2020 @12:01AM (#22681837)
Sounds like I got conned by my (poor) memory. I should have re-googled this before posting, thanks for the correction.
Re:Zig cc: A drop-in replacement for GCC/Clang by jfkebwjsbx on Wednesday March 25, 2020 @04:06AM (#22682795)
Yes, but for many projects it means no static linking in practice.
Re:Zig cc: A drop-in replacement for GCC/Clang by yarrel on Tuesday March 24, 2020 @09:47PM (#22681233)
This isn't a legal limitation.

It's FUD.

See here -

https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynami...

Re:Zig cc: A drop-in replacement for GCC/Clang by luizfelberti on Wednesday March 25, 2020 @12:04AM (#22681846)
Thanks for the link, that's very useful. I should have re-googled this stuff instead of commenting "from memory", sorry for spreading the FUD :/
Re:Zig cc: A drop-in replacement for GCC/Clang by a1369209993 on Wednesday March 25, 2020 @11:47AM (#22685672)
Also, right above that: https://www.gnu.org/licenses/gpl-faq.html#GPLStaticVsDynamic

Dynamically linking a GPL library is the same as statically linking a GPL library; the resulting executable must be GPL-licensed.

Re:Zig cc: A drop-in replacement for GCC/Clang by sandov on Tuesday March 24, 2020 @11:10PM (#22681644)
That's also a good reason to avoid glibc and switch to a musl-based system.
Re:Zig cc: A drop-in replacement for GCC/Clang by freemint on Tuesday March 24, 2020 @09:20PM (#22681039)
I might be uneducated but wasn't there a "system library exception" or something like that in GPL to prevent these problems?