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

Re: [PATCH 2/3] tools/firmware: Build firmware as -ffreestanding


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 26 Feb 2021 12:42:41 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=qJkm1mjHEZI916fYf+gCBZniTqvzXzWhCGrKE9LdiVs=; b=ZMUZyVgjexr/xRXWeJ1+yCaLq8djm/sR9eKiEDactKycgVf9AquMu1p0lgCAsWNCUEz/4kmAVKPDWfjbgnWkpVSyLbGnpYnPxD30iFoUfFUUBR8GXgwXFpYFA+LoMAtRm6rcq26ydbh85XdAnJCigdkI3i11kQyZqtFoSBjGzfpgchO585m6TxdwfvJ559W3gUD1e+8t0U++OiX2o3IpIYaVrK2YmEuK0T2GEFoaYZOqkryR5EC+GEaldEkT9DwfTdVYDcg2YwKRoTzEiIGDh9F/8EqI9jxFzOwI4U6QiYbAX7guLPci7fna6haxsVkUiZyubB3fT5dxwQP5cl+JuQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cd4HtjIHt1Q7JqcAgGcgqlT9EI+Xp3EU/7KAs8mtRlgqt99nU4s8yse4eciIGMpK/D89RILWZLp481ISbbn6n+nvRZuiTNvHbBNOM+dF4ddt6WblM3U+cBEosHt3/oyBWYgL1yGkvQ7cdy7NoxV31H+g406pCJ0t91qTl/6FGAYj+7PsNCYNbp8mn79S84r1RyMYabLr5LgG6PEsKateCkQMGug9nxrPk+6PlWbhv5ojZk68EjvCAeHaPGBmy5xXWJ0087hv+XwzO3/+yZVAK9IDXmejugxvznBD0ZoShzNsMbQAJ50jY7aOX6Z0dnSfQIWQudqT1JZXfLDf2oLjsg==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 26 Feb 2021 12:43:07 +0000
  • Ironport-sdr: g6cKc/XBmyRulc3N+O3hjjTNbEo9YqhlzPA1WlhInS2S60gA8wAXvN4PDMXgZHJ9JSJLsdcjMh +Fa5Uw4VFi6L/nbKYXluk4u1xEna/KtKmCUhv+KcpAFf20FHpVrj7fXEfmZ4zz1ja9ISstSIv9 rMvWEn26L3kXTfxTE+0v/nDF6HObI9x3xWXq863LwoAQuuX98iYl2dCR3v1m2qCVBVfXI8340y p/9mgwy61PiMez5Cx3RVDTj45MIuxwcbrjCzivo0EsJcsonbGYE6zw6B4F61gkrPM7g1OB9cyD v2U=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26/02/2021 09:10, Jan Beulich wrote:
> On 25.02.2021 21:30, Andrew Cooper wrote:
>> firmware should always have been -ffreestanding, as it doesn't execute in the
>> host environment.
>>
>> inttypes.h isn't a freestanding header, but the 32bitbios_support.c only 
>> wants
>> the stdint.h types so switch to the more appropriate include.
>>
>> This removes the build time dependency on a 32bit libc just to compile the
>> hvmloader and friends.
>>
>> Update README and the TravisCI configuration.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> preferably with one further adjustment:
>
>> --- a/tools/firmware/Rules.mk
>> +++ b/tools/firmware/Rules.mk
>> @@ -16,4 +16,4 @@ CFLAGS += -Werror
>>  $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
>>  
>>  # Extra CFLAGS suitable for an embedded type of environment.
>> -CFLAGS += -fno-builtin -msoft-float
>> +CFLAGS += -fno-builtin -msoft-float -ffreestanding
> As per gcc doc -ffreestanding implies -fno-builtin, so I think you
> want to replace that one instead of adding the new option on top.

Oops yes - fixed.

Thanks.

~Andrew



 


Rackspace

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