From 1b7451707709d6745efb52b54b17e798d7375aac Mon Sep 17 00:00:00 2001 From: Zac Walker <zacwal...@microsoft.com> Date: Tue, 20 Feb 2024 17:31:58 +0100 Subject: [PATCH v1 07/13] Exclude i386 functionality from aarch64 build
ix86_get_callcvt is used for i386 build and needs to be excluded to reuse winnt.cc in aarch64. gcc/ChangeLog: * config/mingw/winnt.cc (defined): Use TARGET_ARM64_MS_ABI to exclude ix86_get_callcvt. (i386_pe_maybe_mangle_decl_assembler_name): Likewise. (i386_pe_mangle_decl_assembler_name): Likewise. --- gcc/config/mingw/winnt.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/config/mingw/winnt.cc b/gcc/config/mingw/winnt.cc index 1ed383155d0..bd86cfb1156 100644 --- a/gcc/config/mingw/winnt.cc +++ b/gcc/config/mingw/winnt.cc @@ -224,6 +224,8 @@ gen_stdcall_or_fastcall_suffix (tree decl, tree id, bool fastcall) return get_identifier (new_str); } +#if !defined (TARGET_ARM64_MS_ABI) + /* Maybe decorate and get a new identifier for the DECL of a stdcall or fastcall function. The original identifier is supplied in ID. */ @@ -250,6 +252,8 @@ i386_pe_maybe_mangle_decl_assembler_name (tree decl, tree id) return new_id; } +#endif + /* Emit an assembler directive to set symbol for DECL visibility to the visibility type VIS, which must not be VISIBILITY_DEFAULT. As for PE there is no hidden support in gas, we just warn for @@ -266,6 +270,8 @@ i386_pe_assemble_visibility (tree decl, int) "in this configuration; ignored"); } +#if !defined (TARGET_ARM64_MS_ABI) + /* This is used as a target hook to modify the DECL_ASSEMBLER_NAME in the language-independent default hook langhooks,c:lhd_set_decl_assembler_name () @@ -278,6 +284,8 @@ i386_pe_mangle_decl_assembler_name (tree decl, tree id) return (new_id ? new_id : id); } +#endif + /* This hook behaves the same as varasm.cc/assemble_name(), but generates the name into memory rather than outputting it to a file stream. */ -- 2.25.1