This patch renames functions and moves files related to MinGW functionality.
These functions and files will be reused in the aarch64-pc-cygwin target.

gcc/ChangeLog:

        * config/i386/cygming.h (TARGET_ASM_ASSEMBLE_VISIBILITY): Rename.
        * config/i386/i386-protos.h (i386_pe_assemble_visibility): Remove.
        * config/mingw/winnt.cc (i386_pe_assemble_visibility): Rename.
        (mingw_pe_assemble_visibility): Rename.
        * config/mingw/winnt.h (mingw_pe_assemble_visibility): Add.

libgcc/ChangeLog:

        * config.host: Update.
        * config/i386/cygming-crtbegin.c: Move to...
        * config/mingw/cygming-crtbegin.c: ...here.
        * config/i386/cygming-crtend.c: Move to...
        * config/mingw/cygming-crtend.c: ...here.
        * config/i386/t-cygming: Move to...
        * config/mingw/t-cygming: ...here.
        * config/i386/t-slibgcc-cygming: Move to...
        * config/mingw/t-slibgcc-cygming: ...here.
        * config/i386/t-slibgcc-mingw: Move to...
        * config/mingw/t-slibgcc-mingw: ...here.
---
 gcc/config/i386/cygming.h                        | 2 +-
 gcc/config/i386/i386-protos.h                    | 1 -
 gcc/config/mingw/winnt.cc                        | 2 +-
 gcc/config/mingw/winnt.h                         | 1 +
 libgcc/config.host                               | 8 ++++----
 libgcc/config/{i386 => mingw}/cygming-crtbegin.c | 0
 libgcc/config/{i386 => mingw}/cygming-crtend.c   | 0
 libgcc/config/{i386 => mingw}/t-cygming          | 6 +++---
 libgcc/config/{i386 => mingw}/t-slibgcc-cygming  | 0
 libgcc/config/{i386 => mingw}/t-slibgcc-mingw    | 0
 10 files changed, 10 insertions(+), 10 deletions(-)
 rename libgcc/config/{i386 => mingw}/cygming-crtbegin.c (100%)
 rename libgcc/config/{i386 => mingw}/cygming-crtend.c (100%)
 rename libgcc/config/{i386 => mingw}/t-cygming (75%)
 rename libgcc/config/{i386 => mingw}/t-slibgcc-cygming (100%)
 rename libgcc/config/{i386 => mingw}/t-slibgcc-mingw (100%)

diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index 59ee1c4c69d..61958324a0a 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -462,7 +462,7 @@ do {                                                \
 #define SUBTARGET_MANGLE_DECL_ASSEMBLER_NAME i386_pe_mangle_decl_assembler_name
 
 #undef TARGET_ASM_ASSEMBLE_VISIBILITY
-#define TARGET_ASM_ASSEMBLE_VISIBILITY i386_pe_assemble_visibility
+#define TARGET_ASM_ASSEMBLE_VISIBILITY mingw_pe_assemble_visibility
 
 #undef SUB_TARGET_RECORD_STUB
 #define SUB_TARGET_RECORD_STUB(NAME, DECL) mingw_pe_record_stub((NAME), 0)
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 8ac329a716a..70ec9b5d9ff 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -335,7 +335,6 @@ extern void i386_pe_asm_output_aligned_decl_common (FILE *, 
tree,
                                                    HOST_WIDE_INT,
                                                    HOST_WIDE_INT);
 extern void i386_pe_start_function (FILE *, const char *, tree);
-extern void i386_pe_assemble_visibility (tree, int);
 extern tree i386_pe_mangle_decl_assembler_name (tree, tree);
 extern tree i386_pe_mangle_assembler_name (const char *);
 
diff --git a/gcc/config/mingw/winnt.cc b/gcc/config/mingw/winnt.cc
index 2e06b0e8146..7745ecf8af1 100644
--- a/gcc/config/mingw/winnt.cc
+++ b/gcc/config/mingw/winnt.cc
@@ -278,7 +278,7 @@ i386_pe_drectve_name (tree id)
    what Clang emits for hidden visibility on PE/COFF.  */
 
 void
-i386_pe_assemble_visibility (tree decl, int vis)
+mingw_pe_assemble_visibility (tree decl, int vis)
 {
   if (!decl)
     return;
diff --git a/gcc/config/mingw/winnt.h b/gcc/config/mingw/winnt.h
index cc7490939d5..f2e34e53185 100644
--- a/gcc/config/mingw/winnt.h
+++ b/gcc/config/mingw/winnt.h
@@ -60,6 +60,7 @@ extern tree mingw_handle_selectany_attribute (tree *, tree, 
tree, int, bool *);
 extern void mingw_pe_asm_named_section (const char *, unsigned int, tree);
 extern void mingw_pe_asm_lto_start (void);
 extern void mingw_pe_asm_lto_end (void);
+extern void mingw_pe_assemble_visibility (tree decl, int vis);
 extern void mingw_pe_declare_type (FILE *, const char *, bool, bool);
 extern void mingw_pe_encode_section_info (tree, rtx, int);
 extern void mingw_pe_end_cold_function (FILE *, const char *, tree);
diff --git a/libgcc/config.host b/libgcc/config.host
index ba44a49cc0e..08dde46d7b3 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -856,7 +856,7 @@ i[34567]86-*-cygwin*)
        else
                tmake_dlldir_file="i386/t-dlldir-x"
        fi
-       tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} 
i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin t-crtfm i386/t-chkstk 
t-dfprules"
+       tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} 
mingw/t-slibgcc-cygming mingw/t-cygming i386/t-cygwin t-crtfm i386/t-chkstk 
t-dfprules"
        ;;
 x86_64-*-cygwin*)
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
@@ -879,7 +879,7 @@ x86_64-*-cygwin*)
                tmake_dlldir_file="i386/t-dlldir-x"
        fi
        # FIXME - dj - t-chkstk used to be in here, need a 64-bit version of 
that
-       tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} 
i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin t-crtfm t-dfprules 
i386/t-chkstk"
+       tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} 
mingw/t-slibgcc-cygming mingw/t-cygming i386/t-cygwin t-crtfm t-dfprules 
i386/t-chkstk"
        ;;
 i[34567]86-*-mingw*)
        extra_parts="crtbegin.o crtend.o crtfastmath.o"
@@ -910,7 +910,7 @@ i[34567]86-*-mingw*)
        else
                tmake_dlldir_file="i386/t-dlldir-x"
        fi
-       tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_thr_file} 
${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-slibgcc-mingw i386/t-cygming 
i386/t-mingw32 t-crtfm i386/t-chkstk t-dfprules"
+       tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_thr_file} 
${tmake_dlldir_file} mingw/t-slibgcc-cygming mingw/t-slibgcc-mingw 
mingw/t-cygming i386/t-mingw32 t-crtfm i386/t-chkstk t-dfprules"
        ;;
 x86_64-*-mingw*)
        case ${target_thread_file} in
@@ -940,7 +940,7 @@ x86_64-*-mingw*)
        else
                tmake_dlldir_file="i386/t-dlldir-x"
        fi
-       tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_thr_file} 
${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-slibgcc-mingw i386/t-cygming 
i386/t-mingw32 t-dfprules t-crtfm i386/t-chkstk"
+       tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_thr_file} 
${tmake_dlldir_file} mingw/t-slibgcc-cygming mingw/t-slibgcc-mingw 
mingw/t-cygming i386/t-mingw32 t-dfprules t-crtfm i386/t-chkstk"
        extra_parts="$extra_parts crtbegin.o crtend.o crtfastmath.o"
        if test x$enable_vtable_verify = xyes; then
                extra_parts="$extra_parts vtv_start.o vtv_end.o 
vtv_start_preinit.o vtv_end_preinit.o"
diff --git a/libgcc/config/i386/cygming-crtbegin.c 
b/libgcc/config/mingw/cygming-crtbegin.c
similarity index 100%
rename from libgcc/config/i386/cygming-crtbegin.c
rename to libgcc/config/mingw/cygming-crtbegin.c
diff --git a/libgcc/config/i386/cygming-crtend.c 
b/libgcc/config/mingw/cygming-crtend.c
similarity index 100%
rename from libgcc/config/i386/cygming-crtend.c
rename to libgcc/config/mingw/cygming-crtend.c
diff --git a/libgcc/config/i386/t-cygming b/libgcc/config/mingw/t-cygming
similarity index 75%
rename from libgcc/config/i386/t-cygming
rename to libgcc/config/mingw/t-cygming
index 4713b7f696e..ccdf64a8a30 100644
--- a/libgcc/config/i386/t-cygming
+++ b/libgcc/config/mingw/t-cygming
@@ -5,13 +5,13 @@ LIBGCC2_INCLUDES = -I$(srcdir)/../winsup/w32api/include
 
 CUSTOM_CRTSTUFF = yes
 
-crtbegin.o: $(srcdir)/config/i386/cygming-crtbegin.c
+crtbegin.o: $(srcdir)/config/mingw/cygming-crtbegin.c
        $(crt_compile) -fno-omit-frame-pointer  -c $<
 
-crtbeginS.o: $(srcdir)/config/i386/cygming-crtbegin.c
+crtbeginS.o: $(srcdir)/config/mingw/cygming-crtbegin.c
        $(crt_compile) -fno-omit-frame-pointer  -c $< -DCRTSTUFFS_O
 
 # We intentionally use a implementation-reserved init priority of 0,
 # so allow the warning.
-crtend.o: $(srcdir)/config/i386/cygming-crtend.c
+crtend.o: $(srcdir)/config/mingw/cygming-crtend.c
        $(crt_compile) -fno-omit-frame-pointer -Wno-error -c $<
diff --git a/libgcc/config/i386/t-slibgcc-cygming 
b/libgcc/config/mingw/t-slibgcc-cygming
similarity index 100%
rename from libgcc/config/i386/t-slibgcc-cygming
rename to libgcc/config/mingw/t-slibgcc-cygming
diff --git a/libgcc/config/i386/t-slibgcc-mingw 
b/libgcc/config/mingw/t-slibgcc-mingw
similarity index 100%
rename from libgcc/config/i386/t-slibgcc-mingw
rename to libgcc/config/mingw/t-slibgcc-mingw

Reply via email to