From: Olivier Hainque Date: Fri, 16 Aug 2024 15:12:13 +0000 (+0200) Subject: ada: Extend arm-android section of Makefile.rtl to aarch64 X-Git-Tag: basepoints/gcc-16~5417 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39bd80bee89d68be08d5b41ad71adfb2ec6cff05;p=thirdparty%2Fgcc.git ada: Extend arm-android section of Makefile.rtl to aarch64 gcc/ada/ChangeLog: * Makefile.rtl: Extend arm-android section to aarch64, in a similar fashion as other arm/arch64 configurations. Introduce pair selection guards to prevent match of aarch64-linux-android on the regular aarch64-linux% cross as well. --- diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 1512c01f3f8..9f4c6cd99dc 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -1079,9 +1079,21 @@ GCC_SPEC_FILES= # $(strip STRING) removes leading and trailing spaces from STRING. # If what's left is null then it's a match. +# Setup to make sure at most one match gets selected, useful for android +# targets which are canonically configured with a linux-android target_os, +# which would match filtering patterns such as linux% intended to match +# only regular linux or linux64 variants. + +# The current set of selected pairs. A new match remains allowed +# as long as this isn't assigned a new value. +SELECTED_PAIRS=PAIRS_NONE + # PowerPC VxWorks6 and VxWorks7 +ifeq ($(SELECTED_PAIRS),PAIRS_NONE) ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7%, $(target_cpu) $(target_vendor) $(target_os))),) + SELECTED_PAIRS=powerpc-vxworks + ifeq ($(strip $(filter-out powerpc64, $(target_cpu))),) ARCH_STR=ppc64 else @@ -1189,10 +1201,14 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7%, $(target_cpu) $(targe GCC_SPEC_FILES+=vxworks-smp-$(ARCH_STR)-link.spec endif endif +endif # x86/x86_64 VxWorks7 +ifeq ($(SELECTED_PAIRS),PAIRS_NONE) ifeq ($(strip $(filter-out %86 x86_64 wrs vxworks7%, $(target_cpu) $(target_vendor) $(target_os))),) + SELECTED_PAIRS=x86-vxworks7 + LIBGNAT_TARGET_PAIRS= \ a-intnam.adsexception propagation + # while aarch64 relies on kernel dwarf CFI. And as a 64bit target, + # aarch64 can also incorporate support for 128bit arithmetic. + + ifeq ($(strip $(filter-out arm%, $(target_cpu))),) + SELECTED_PAIRS=arm-android + + EH_MECHANISM=-arm + SIGTRAMP_OBJ=sigtramp-armdroid.o + else + SELECTED_PAIRS=aarch64-android + + EH_MECHANISM=-gcc + SIGTRAMP_OBJ= + + LIBGNAT_TARGET_PAIRS += $(GNATRTL_128BIT_PAIRS) + EXTRA_GNATRTL_NONTASKING_OBJS = $(GNATRTL_128BIT_OBJS) + endif + + EXTRA_LIBGNAT_OBJS+=$(SIGTRAMP_OBJ) EXTRA_LIBGNAT_SRCS+=sigtramp.h - EH_MECHANISM=-arm THREADSLIB = GNATLIB_SHARED = gnatlib-shared-dual LIBRARY_VERSION := $(LIB_VERSION) endif +endif # ARM and AARCH64 QNX +ifeq ($(SELECTED_PAIRS),PAIRS_NONE) ifeq ($(strip $(filter-out arm aarch64 %qnx,$(target_cpu) $(target_os))),) + + SELECTED_PAIRS=arm-qnx + LIBGNAT_TARGET_PAIRS = \ a-intnam.ads