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

Bug#874583: gcc-6: Add support for arm64ilp32 triplet



Control: tags -1 - patch
Control: tags -1 + wontfix

closing.  This is not the recent upstream patch, and it's still not applied
upstream.  Please update the patch for gcc-8 and gcc-7 and resubmit it once it's
applied upstream.


On 12.09.2017 21:36, Matthias Klose wrote:
> On 07.09.2017 17:07, Wookey wrote:
>> Package: gcc-6
>> Version: 6.3.0-18
>> Severity: normal
>> Tags: upstream patch
>>
>> gcc has arm64 ILP32 support, but it only works if built as a multilib
>> on arm64 architecture.  This patch allows gcc to also be configured
>> for the aarch64 ILP32 triplet and build the right thing. Without it,
>> gcc defaults to LP64 even when the build is configured as
>> TARGET=aarch64-linux-gnu_ilp32 which is wrong.
>>
>> Note that this uses the newer triplet for this ABI agreed at Linaro
>> Connect (Feb 2018): aarch64-linux-gnu_ilp32, matching the change made
>> in binutils.
>>
>> This support is in gcc-ilp32-default-support.patch
>>
>> The existing debian multiarch support patch has to be modified to
>> match the right triplet and multiarch/multilib paths too. A patch for that is attached in 
>> gcc-fixup-multilib-patch-for-ilp32-default.patch
>>
>> That is a rather confusing patch-patch, so here is the final file that 
>> should result from it (sans header):
>>
>> LIB1ASMSRC   = aarch64/lib1funcs.asm
>> LIB1ASMFUNCS = _aarch64_sync_cache_range
>>
>> AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
>> ifneq (,$(findstring _ilp32,$(target)))
>> MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
>> MULTILIB_OSDIRNAMES += mabi.ilp32=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
>> MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu_ilp32)
>> else
>> MULTILIB_OSDIRNAMES = mabi.lp64=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
>> MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
>> MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
>> endif
>>
>> These have only been tested on gcc-6, although they should work the same
>> on gcc-7. I will supply separate bug/patches for gcc-7.
> 
> please do. also are all of these accepted upstream?
> 


Reply to: