[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


  • To: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>, "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>, Simon Kuenzer <simon.kuenzer@xxxxxxxxx>, Felipe Huici <felipe.huici@xxxxxxxxx>
  • From: Justin He <Justin.He@xxxxxxx>
  • Date: Thu, 9 Apr 2020 01:36:26 +0000
  • Accept-language: en-US, zh-CN
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YW0xo7QRHurjxCYKFm7KYnkf8S8VuWBUK/P+xIKSL0Y=; b=B4X8rp7B8U6g4KJBamSHFdbRXZa+y62AeyCQOzGMGMat/y4oP892BvwrTsklTAjDyzEGGVs4EvPSdym+ancr2NHE52mYqLWKolLdmjR+H8cyKooISrz4C9pJRq1C/jICr+unFwZ56+87oGvkMNind2hFNcYJzvWHJNss+IUrXN+tqEOp7CLdpsYT5lEycVGAbVprIcqZVOG7+yjCv/Y8KDOw0/eCTuAJewMngMre28YKs3hdXNAYyjDBS+MYe8jLRO2bTZIhp6bSKUWL238ZGHgHrrmK8qj7mAZmLRw0yBVZzhA8n6KpNa/4NxG7j0m9qbZc+GJSFv+whNC65QQd/A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rfnbsogosg+m1gsEBQEzSVkzXqEuQFxnbCS6jX8Tmmh01EwJ/4lv9T1gUpdN62VPZDtaYkaKro9ky/CSCf0yhQe88xVpJuHknruwWOQLwVJ8G76PNJeimYr2OVLhOhj62JxFGncXfNCpvrZF1aWMKnfWwC9DxybBJpU1haurRVOl9jSEO3DavKJrflBwjEKwFS8zfKNNLXAyW5Y9+XI2Mq0v0cDlrXaOHhrX8EzeATFaWTRkqpS9AzqeiBAJYRfsGVuZ5jNL8biUhQXdcssFvHjOwJ89pKAcEkuhxyIRKqyHx1JLLcO7dO+Aft9ayHZUYkgLtSkXcryxkNDf6ywH4A==
  • Authentication-results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xenproject.org; dmarc=bestguesspass action=none header.from=arm.com;
  • Authentication-results-original: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Cc: Kaly Xin <Kaly.Xin@xxxxxxx>, nd <nd@xxxxxxx>
  • Delivery-date: Thu, 09 Apr 2020 01:36:47 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Thread-index: AQHWC/aGUWDTOLXHl0mcROwehezCMKhs779QgAMVmnA=
  • Thread-topic: [UNIKRAFT PATCH v3 2/7] build: Link libgcc at the end of the link options list

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 the
> link
> > options 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_CALL26
> > against 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_CALL26
> > against undefined symbol `__multf3'
> > > syslog.c:(.text+0x99444): undefined reference to `__multf3'
> > > syslog.c:(.text+0x99444): additional relocation overflows omitted from
> the
> > output
> > > syslog.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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.