rui314 / mold

Mold: A Modern Linker 🦠
MIT License
14.31k stars 470 forks source link

Re-implement LTO plugin-api.h #493

Open rui314 opened 2 years ago

rui314 commented 2 years ago

https://llvm.org/docs/GoldPlugin.html states that the LLVM LTO plugin must be distributed under GPLv3 because it uses a header file that is distributed as a part of GNU binutils.

Currently, FreeBSD does not distribute LLVMgold.so due to this licensing concern.

My understanding is that function names, macro names and constant values in header files are not copyrightable, so we can create a new file with the same function declarations, macros and enums and distribute it under a more liberal license. We probably should do this and contribute the new header file to LLVM.

rui314 commented 2 years ago

Created a patch and sent a review request to LLVM: https://reviews.llvm.org/D125624