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

Re: [PATCH] ppc: make also linking work with big-endian tool chain


  • To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 5 Jul 2023 18:09:30 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0VKhlOi63tb7CSHiqLYBRVxGNILIVhDrL9rIEgQudYE=; b=RshxQBN4SqiqmGUOPvMk3V3g1V74eD/TPbvPQqaa46+oZ73llx9kfMV4fVtSvDW/wgkLzfEdHHNHru85NWGi0z8AOcCx+yGgsKsjhVay/syDm2CLr6JNqiTiG4m6haGlcJF1LinCKaw1VfTQJt7TGP4CtpF6PsWmSvG4fSYkc7kPCnN8NuWgXtzkGJKsAH1gp2lAxogohaBOXBA4B6cbafX8Hs9jgawrgRrXOESsPUb/35w6+Zshuo6ReF95I4Da8NsIg9dmXfDrRF3ve+ucYPR4hEVFqyJPBB2hROri4GJ+s+vNUfYWD8YHYdkeIJqXd4T/Yb0DOgqSidMRDhLWSQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iixZgmlfQZdmARS041G/rfHmjfzJwrfs8edlyuMbqPqDWn2XH/YGFkoIxVIldsUHObgIryMiFPFPC+Xj5/38bvAJvZo9qGlm8G3uhNVEI20bp9GIynt1QfPKBI9lTqcP0htiywLkLe08/hTdTpLfKEWhkOUxHTP4QXbtmB8NBmQ7OgokZIOS6wo0bjGxZOtg6fFjBYBY7z1L17e84lEhuUg+du1EpZDYFmA3Sno4zoP0h5P47RYiraH55k9Tmbk2U+7w5nzYz3hGcR73Q/cNRRj/SGuy43C0L1xNOJMhiPzqwc3g1bNovg5lHvSIwKGAroZE8IHYrO6d6iO+N2nMwg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Delivery-date: Wed, 05 Jul 2023 16:09:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 05.07.2023 17:10, Shawn Anastasio wrote:
> On 7/5/23 9:44 AM, Jan Beulich wrote:
>> Telling just the compiler to produce little-endian objects isn't enough.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
>> --- a/xen/arch/ppc/arch.mk
>> +++ b/xen/arch/ppc/arch.mk
>> @@ -7,6 +7,8 @@ ppc-march-$(CONFIG_POWER_ISA_3_00) := po
>>  CFLAGS += -m64 -mlittle-endian -mcpu=$(ppc-march-y)
>>  CFLAGS += -mstrict-align -mcmodel=large -mabi=elfv2 -mno-altivec -mno-vsx
>>  
>> +LDFLAGS += -m elf64lppc
> 
> Looking around, it seems GNU ld also has a -EL flag:
> 
>   -EL Link little-endian objects.  This affects the default output format.
> 
> Linux's build system passes both -EL and -m elf64lppc, though I'm
> wondering if -EL alone would be enough.

What I did is check what gcc passes to ld when itself passed -mlittle
or -mlittle-endian.

> In any case, this doesn't break the build with my ppc64le toolchain, so
> if this fixes issues you're seeing with BE toolchains then it's fine
> with me.
> 
>>  # TODO: Drop override when more of the build is working
>>  override ALL_OBJS-y = arch/$(SRCARCH)/built_in.o
>>  override ALL_LIBS-y =
> 
> Acked-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>

Thanks.

Jan



 


Rackspace

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