[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [UNIKRAFT PATCH v3 2/7] build: Link libgcc at the end of the link options list
Hey Justin, Thank you for the update. The patch seems fine. Thanks & regards Sharan Reviewed-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx> On 4/9/20 3:36 AM, Justin He wrote: Hi Sharan For your concern about linking libgcc in Unikraft, here is the reply from our license expert:We have a license question, could BSD licensed project link a GPL licensed binary? *Unikraft* is a BSD licensed project. To support floating-point feature, it needs to link libgcc which is a binary licensed as GPLv3. Will it haves impact on the BSD license in Unikraft?The GCC runtime library exception seems to permit the scenario you described. I believe the license for libgcc includes that exception, and the use-case you described below appears to otherwise qualify. You can read the GNU FAQ on this issue HERE to confirm,So seems we can freely linking libgcc without any license issues. -- Cheers, Justin (Jia He)-----Original Message----- From: Minios-devel <minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of Justin He Sent: Tuesday, April 7, 2020 10:27 AM To: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>; minios- devel@xxxxxxxxxxxxxxxxxxxx; Simon Kuenzer <simon.kuenzer@xxxxxxxxx>; Felipe Huici <felipe.huici@xxxxxxxxx> Cc: Kaly Xin <Kaly.Xin@xxxxxxx>; nd <nd@xxxxxxx> Subject: Re: [Minios-devel] [UNIKRAFT PATCH v3 2/7] build: Link libgcc at the end of the link options list Hi Sharan, thanks for the review For your concern about link gpl binary with bsd project, I will contact our license experts. Will update it asap. -- Cheers, Justin (Jia He)-----Original Message----- From: Sharan Santhanam <sharan.santhanam@xxxxxxxxx> Sent: Monday, April 6, 2020 5:34 PM To: Justin He <Justin.He@xxxxxxx>; minios-devel@xxxxxxxxxxxxxxxxxxxx; Simon Kuenzer <simon.kuenzer@xxxxxxxxx>; Felipe Huici <felipe.huici@xxxxxxxxx> Cc: Kaly Xin <Kaly.Xin@xxxxxxx>; nd <nd@xxxxxxx> Subject: Re: [UNIKRAFT PATCH v3 2/7] build: Link libgcc at the end of thelinkoptions list Hello Justin, Please find the comment inline. Thanks & Regards Sharan On 4/2/20 6:18 AM, Jia He wrote:To use newlib on arm64 plat kvm, libgcc should be linked at the end of the options list, otherwise it will be ignored due to -stdlib. Without this patch, there will be a linking error on arm kvm plat: syslog.c:(.text+0x7d5cc): undefined reference to `__floatsitf' syslog.c:(.text+0x7d5cc): relocation truncated to fit: R_AARCH64_CALL26against undefined symbol `__floatsitf'/root/hj/UK/unikraft_upstream/apps/helloworld/build/helloworld_kvm-arm64.o: In function `__ieee754_hypotl':syslog.c:(.text+0x99434): undefined reference to `__multf3' syslog.c:(.text+0x99434): relocation truncated to fit: R_AARCH64_CALL26against undefined symbol `__multf3'syslog.c:(.text+0x99444): undefined reference to `__multf3' syslog.c:(.text+0x99444): additional relocation overflows omitted fromtheoutputsyslog.c:(.text+0x99450): undefined reference to `__addtf3' /root/hj/UK/unikraft_upstream/apps/helloworld/build/helloworld_kvm-arm64.o: In function `sqrtl':syslog.c:(.text+0xb12c0): undefined reference to `__trunctfdf2' syslog.c:(.text+0xb12c8): undefined reference to `__extenddftf2' Above undefined symbols are at libgcc.a Signed-off-by: Jia He <justin.he@xxxxxxx> --- plat/kvm/Linker.uk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plat/kvm/Linker.uk b/plat/kvm/Linker.uk index 5e42193..65a5f8e 100644 --- a/plat/kvm/Linker.uk +++ b/plat/kvm/Linker.uk @@ -2,6 +2,7 @@ ifeq (x86_64,$(CONFIG_UK_ARCH)) KVM_LDFLAGS-y += -Wl,-m,elf_x86_64 else ifeq (arm64,$(CONFIG_UK_ARCH)) KVM_LDFLAGS-y += -Wl,-m,aarch64elf +KVM_LINK_LIBGCC_FLAG := -lgcc endif @@ -26,6 +27,7 @@ $(KVM_DEBUG_IMAGE): $(KVM_ALIBS)$(KVM_ALIBS-y)$(KVM_OLIBS) $(KVM_OLIBS-y) \-Wl$(comma)--start-group \ $(KVM_ALIBS) $(KVM_ALIBS-y) \ $(UK_ALIBS) $(UK_ALIBS-y) \ + $(KVM_LINK_LIBGCC_FLAG) \I think it is fine if we could directly include the libgcc.a into our statically built binary as this come GPL v3. Do you know if this has an impact on the BSD license?-Wl$(comma)--end-group \ -o $(KVM_IMAGE).ld.o) $(call build_cmd,OBJCOPY,,$(KVM_IMAGE).o,\_______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |