[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [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: Tue, 7 Apr 2020 02:27:28 +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=girM7HGb5uXT6v6/RPhYOv4lzNsxSo97lNazMQ+U9gw=; b=aLnX0mcwrqDhZ6oOl9wBuWDN/SSTxQyw8NiIALlLEzZqEYTfWeY/R/F07YmYLvieA8ZQbHkyFTVj0B0tNBURTV4zZs44IXfwGiIpFPOWeIQduMDnzx9wp3LnNbz3lPb+UhgXXMS0Z5wq17PCb69WzYn7MjJDBdzeT2iy1rLFr8deNTcuMTCnKFJ40hJP8jg/u/U5a0rgG8CyErSpUgk9iH9dRQleQA74Ly8qo8sRSuIF+Qxcbw2g9gS7MB/Bkw6dKE8E2E7QtIiws/KF+Xvfzq1fj2VCNc4HE8Rw+Srf/y/G7RuJzRoFBFN+iSRVs3BbWZzo4KvYrHHMXpOTGAyi6A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uo/W30IsCXcmIlFhmx1w++slWh8OBNL4bZZs3v+fKpKf2ZteDGuiNd3h8/ek4C/1ZGVNKBLfA2ARWW/m4zXFpZq0q7LnXrt6u91IcH9oD4DSPfv8VRBGRXREsJK7sm+DPbQzO+sKi4ISLDrkDC85JWgky9qNL+Hgfi5d/SjjtWYXzU+5NHzmsVbZg4gMXlbIkIaaUuKEIj+N3IOxoebP0sxkp3W0vesawKNC7B12Ebn0S0TwGXH3vcxDSYYpSFFdf7RM2iqFlXvniU6HIP4qqvbTg9GXeGBBHsdpaptfa4wWXoueA1Ov6QxOHfJER6mmbgfNcsddyAN4jGxdWMwTQA==
  • 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: Tue, 07 Apr 2020 02:27:45 +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/aGUWDTOLXHl0mcROwehezCMKhs779Q
  • Thread-topic: [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®.