Reuse MinGW from i386 for AArch64

This patch creates a new config/mingw directory to share MinGW
related definitions, and moves there the corresponding existing files
from config/i386.

gcc/ChangeLog:

	* config.gcc: Adjust targets after moving MinGW related files
	from i386 to mingw folder.
	* config/i386/cygming.opt: Move to...
	* config/mingw/cygming.opt: ...here.
	* config/i386/cygming.opt.urls: Move to...
	* config/mingw/cygming.opt.urls: ...here.
	* config/i386/cygwin-d.cc: Move to...
	* config/mingw/cygwin-d.cc: ...here.
	* config/i386/mingw-stdint.h: Move to...
	* config/mingw/mingw-stdint.h: ...here.
	* config/i386/mingw.opt: Move to...
	* config/mingw/mingw.opt: ...here.
	* config/i386/mingw.opt.urls: Move to...
	* config/mingw/mingw.opt.urls: ...here.
	* config/i386/mingw32.h: Move to...
	* config/mingw/mingw32.h: ...here.
	* config/i386/msformat-c.cc: Move to...
	* config/mingw/msformat-c.cc: ...here.
	* config/i386/t-cygming: Move to...
	* config/mingw/t-cygming: ...here and updated.
	* config/i386/winnt-cxx.cc: Move to...
	* config/mingw/winnt-cxx.cc: ...here.
	* config/i386/winnt-d.cc: Move to...
	* config/mingw/winnt-d.cc: ...here.
	* config/i386/winnt-stubs.cc: Move to...
	* config/mingw/winnt-stubs.cc: ...here.
	* config/i386/winnt.cc: Move to...
	* config/mingw/winnt.cc: ...here.
This commit is contained in:
Zac Walker 2024-03-01 02:41:50 +01:00 committed by Christophe Lyon
parent 21fbaa1a2d
commit 1f05dfc131
14 changed files with 24 additions and 21 deletions

View file

@ -2167,9 +2167,9 @@ i[4567]86-wrs-vxworks*|x86_64-wrs-vxworks7*)
i[34567]86-*-cygwin*)
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/cygming.h i386/cygwin.h i386/cygwin-stdint.h"
xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
tmake_file="${tmake_file} mingw/t-cygming t-slibgcc"
target_gtfiles="$target_gtfiles \$(srcdir)/config/mingw/winnt.cc"
extra_options="${extra_options} mingw/cygming.opt i386/cygwin.opt"
extra_objs="${extra_objs} winnt.o winnt-stubs.o"
c_target_objs="${c_target_objs} msformat-c.o"
cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
@ -2185,9 +2185,9 @@ x86_64-*-cygwin*)
need_64bit_isa=yes
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/cygming.h i386/cygwin.h i386/cygwin-w64.h i386/cygwin-stdint.h"
xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
tmake_file="${tmake_file} mingw/t-cygming t-slibgcc"
target_gtfiles="$target_gtfiles \$(srcdir)/config/mingw/winnt.cc"
extra_options="${extra_options} mingw/cygming.opt i386/cygwin.opt"
extra_objs="${extra_objs} winnt.o winnt-stubs.o"
c_target_objs="${c_target_objs} msformat-c.o"
cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
@ -2223,7 +2223,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
if test x$enable_threads = xmcf ; then
tm_file="${tm_file} i386/mingw-mcfgthread.h"
fi
tm_file="${tm_file} i386/mingw32.h"
tm_file="${tm_file} mingw/mingw32.h"
# This makes the logic if mingw's or the w64 feature set has to be used
case ${target} in
*-w64-*)
@ -2252,8 +2252,8 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
*)
;;
esac
tm_file="${tm_file} i386/mingw-stdint.h"
tmake_file="${tmake_file} t-winnt i386/t-cygming t-slibgcc"
tm_file="${tm_file} mingw/mingw-stdint.h"
tmake_file="${tmake_file} t-winnt mingw/t-cygming t-slibgcc"
case ${target} in
x86_64-w64-*)
tmake_file="${tmake_file} i386/t-mingw-w64"
@ -2263,8 +2263,8 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
esac
native_system_header_dir=/mingw/include
target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
target_gtfiles="$target_gtfiles \$(srcdir)/config/mingw/winnt.cc"
extra_options="${extra_options} mingw/cygming.opt mingw/mingw.opt"
case ${target} in
*-w64-*)
extra_options="${extra_options} i386/mingw-w64.opt"

View file

@ -20,37 +20,40 @@
# doing the build, it may not be installed yet.
LIMITS_H_TEST = true
winnt.o: $(srcdir)/config/i386/winnt.cc $(CONFIG_H) $(SYSTEM_H) coretypes.h \
winnt.o: $(srcdir)/config/mingw/winnt.cc $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h output.h $(TREE_H) flags.h \
$(TM_P_H) $(HASH_TABLE_H) $(GGC_H) $(LTO_STREAMER_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/i386/winnt.cc
$(srcdir)/config/mingw/winnt.cc
winnt-cxx.o: $(srcdir)/config/i386/winnt-cxx.cc $(CONFIG_H) $(SYSTEM_H) coretypes.h \
winnt-cxx.o: $(srcdir)/config/mingw/winnt-cxx.cc $(CONFIG_H) $(SYSTEM_H) \
coretypes.h \
$(TM_H) $(TREE_H) flags.h \
$(TM_P_H) $(HASHTAB_H) $(GGC_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/i386/winnt-cxx.cc
$(srcdir)/config/mingw/winnt-cxx.cc
winnt-stubs.o: $(srcdir)/config/i386/winnt-stubs.cc $(CONFIG_H) $(SYSTEM_H) coretypes.h \
winnt-stubs.o: $(srcdir)/config/mingw/winnt-stubs.cc $(CONFIG_H) $(SYSTEM_H) \
coretypes.h \
$(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h output.h $(TREE_H) flags.h \
$(TM_P_H) $(HASHTAB_H) $(GGC_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/i386/winnt-stubs.cc
$(srcdir)/config/mingw/winnt-stubs.cc
cygwin-d.o: $(srcdir)/config/i386/cygwin-d.cc
cygwin-d.o: $(srcdir)/config/mingw/cygwin-d.cc
$(COMPILE) $<
$(POSTCOMPILE)
winnt-d.o: $(srcdir)/config/i386/winnt-d.cc
winnt-d.o: $(srcdir)/config/mingw/winnt-d.cc
$(COMPILE) $<
$(POSTCOMPILE)
msformat-c.o: $(srcdir)/config/i386/msformat-c.cc $(CONFIG_H) $(SYSTEM_H) coretypes.h \
msformat-c.o: $(srcdir)/config/mingw/msformat-c.cc $(CONFIG_H) $(SYSTEM_H) \
coretypes.h \
$(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h output.h $(TREE_H) flags.h \
$(TM_P_H) $(HASHTAB_H) $(GGC_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/i386/msformat-c.cc
$(srcdir)/config/mingw/msformat-c.cc
STMP_FIXINC=stmp-fixinc