aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2022-10-17 19:32:52 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2022-10-29 09:16:47 +0200
commitca652f86f79855830762e2e7680b6807798437bf (patch)
tree0c046c8e7b074e434d369724a5bdfe8c69bc361e /gcc/config.gcc
parent724d3f926b94672de960dbe88fb699bbdd7fde97 (diff)
downloadgcc-ca652f86f79855830762e2e7680b6807798437bf.zip
gcc-ca652f86f79855830762e2e7680b6807798437bf.tar.gz
gcc-ca652f86f79855830762e2e7680b6807798437bf.tar.bz2
d: Remove D-specific version definitions from target headers
This splits up the targetdm sources so that each file only handles one target platform. Having all logic kept in the headers means that they could become out of sync when a new target is added (loongarch*-*-linux*) or accidentally broken if some headers in tm_file are changed about. gcc/ChangeLog: * config.gcc: Split out glibc-d.o into linux-d.o, kfreebsd-d.o, kopensolaris-d.o, and gnu-d.o. Split out cygwin-d.o from winnt-d.o. * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Remove. * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Remove. * config/i386/cygwin.h (EXTRA_TARGET_D_OS_VERSIONS): Remove. * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Remove. * config/i386/mingw32.h (EXTRA_TARGET_D_OS_VERSIONS): Remove. * config/i386/t-cygming: Add cygwin-d.o. * config/i386/winnt-d.cc (winnt_d_os_builtins): Only add MinGW-specific version condition. * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Remove. * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Remove. * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Remove. * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Remove. * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Remove. * config/t-glibc: Remove glibc-d.o, add gnu-d.o, kfreebsd-d.o, kopensolaris-d.o. * config/t-linux: Add linux-d.o. * config/glibc-d.cc: Remove file. * config/gnu-d.cc: New file. * config/i386/cygwin-d.cc: New file. * config/kfreebsd-d.cc: New file. * config/kopensolaris-d.cc: New file. * config/linux-d.cc: New file.
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc24
1 files changed, 20 insertions, 4 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index e8fe623..ac1c08f 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -882,10 +882,8 @@ case ${target} in
esac
c_target_objs="${c_target_objs} glibc-c.o"
cxx_target_objs="${cxx_target_objs} glibc-c.o"
- d_target_objs="${d_target_objs} glibc-d.o"
tmake_file="${tmake_file} t-glibc"
target_has_targetcm=yes
- target_has_targetdm=yes
case $target in
*-*-*uclibc* | *-*-uclinuxfdpiceabi)
;;
@@ -894,6 +892,24 @@ case ${target} in
gcc_cv_initfini_array=yes
;;
esac
+ case $target in
+ *-*-*linux*)
+ d_target_objs="${d_target_objs} linux-d.o"
+ target_has_targetdm=yes
+ ;;
+ *-*-kfreebsd*-gnu)
+ d_target_objs="${d_target_objs} kfreebsd-d.o"
+ target_has_targetdm=yes
+ ;;
+ *-*-kopensolaris*-gnu)
+ d_target_objs="${d_target_objs} kopensolaris-d.o"
+ target_has_targetdm=yes
+ ;;
+ *-*-gnu*)
+ d_target_objs="${d_target_objs} gnu-d.o"
+ target_has_targetdm=yes
+ ;;
+ esac
;;
*-*-netbsd*)
tm_p_file="${tm_p_file} netbsd-protos.h"
@@ -2054,7 +2070,7 @@ i[34567]86-*-cygwin*)
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"
- d_target_objs="${d_target_objs} winnt-d.o"
+ d_target_objs="${d_target_objs} cygwin-d.o"
target_has_targetdm="yes"
if test x$enable_threads = xyes; then
thread_file='posix'
@@ -2072,7 +2088,7 @@ x86_64-*-cygwin*)
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"
- d_target_objs="${d_target_objs} winnt-d.o"
+ d_target_objs="${d_target_objs} cygwin-d.o"
target_has_targetdm="yes"
if test x$enable_threads = xyes; then
thread_file='posix'