aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2018-12-09 19:41:39 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2018-12-09 19:41:39 +0000
commitb8559e810f5912bba9fba39c005f3fe2c1de09d9 (patch)
tree0f0bb84d01d9230e39196bf53f6dbd230194766e /gcc
parent6dc5aacf971328602dcbf278b6a6ed2cbb6dc99a (diff)
downloadgcc-b8559e810f5912bba9fba39c005f3fe2c1de09d9.zip
gcc-b8559e810f5912bba9fba39c005f3fe2c1de09d9.tar.gz
gcc-b8559e810f5912bba9fba39c005f3fe2c1de09d9.tar.bz2
config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file.
* config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file. Define d_target_objs. * config/pa/pa-protos.h (pa_d_target_versions): New prototype. * config/pa/pa.h (TARGET_D_CPU_VERSIONS): Define. * config/pa/pa-d.c: New file. * config/pa/t-pa: New file. From-SVN: r266931
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config.gcc3
-rw-r--r--gcc/config/pa/pa-d.c39
-rw-r--r--gcc/config/pa/pa-protos.h3
-rw-r--r--gcc/config/pa/pa.h3
-rw-r--r--gcc/config/pa/t-pa4
6 files changed, 60 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 515fb32..3711cf8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2018-12-09 John David Anglin <danglin@gcc.gnu.org>
+
+ * config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file. Define
+ d_target_objs.
+ * config/pa/pa-protos.h (pa_d_target_versions): New prototype.
+ * config/pa/pa.h (TARGET_D_CPU_VERSIONS): Define.
+ * config/pa/pa-d.c: New file.
+ * config/pa/t-pa: New file.
+
2018-12-08 Bin Cheng <bin.cheng@linux.alibaba.com>
* ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 71f0835..76849b5 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1451,7 +1451,8 @@ hppa*-*-linux*)
target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS|MASK_CALLER_COPIES"
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
pa/pa32-regs.h pa/pa32-linux.h"
- tmake_file="${tmake_file} pa/t-linux"
+ tmake_file="${tmake_file} pa/t-pa pa/t-linux"
+ d_target_objs="${d_target_objs} pa-d.o"
;;
hppa*-*-openbsd*)
target_cpu_default="MASK_PA_11"
diff --git a/gcc/config/pa/pa-d.c b/gcc/config/pa/pa-d.c
new file mode 100644
index 0000000..249fd4d
--- /dev/null
+++ b/gcc/config/pa/pa-d.c
@@ -0,0 +1,39 @@
+/* Subroutines for the D front end on the HPPA architecture.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "target.h"
+#include "d/d-target.h"
+#include "d/d-target-def.h"
+
+/* Implement TARGET_D_CPU_VERSIONS for HPPA targets. */
+
+void
+pa_d_target_versions (void)
+{
+ if (TARGET_64BIT)
+ d_add_builtin_version ("HPPA64");
+ else
+ d_add_builtin_version ("HPPA");
+
+ if (TARGET_SOFT_FLOAT)
+ d_add_builtin_version ("D_SoftFloat");
+ else
+ d_add_builtin_version ("D_HardFloat");
+}
diff --git a/gcc/config/pa/pa-protos.h b/gcc/config/pa/pa-protos.h
index 79685ba..30709a4 100644
--- a/gcc/config/pa/pa-protos.h
+++ b/gcc/config/pa/pa-protos.h
@@ -110,3 +110,6 @@ extern HOST_WIDE_INT pa_initial_elimination_offset (int, int);
extern HOST_WIDE_INT pa_function_arg_size (machine_mode, const_tree);
extern const int pa_magic_milli[];
+
+/* Routines implemented in pa-d.c */
+extern void pa_d_target_versions (void);
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index a121e20..1a6253f 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1302,3 +1302,6 @@ do { \
(flag_pic ? (TARGET_HPUX ? 198164 : 221312) : 240000)
#define NEED_INDICATE_EXEC_STACK 0
+
+/* Target CPU versions for D. */
+#define TARGET_D_CPU_VERSIONS pa_d_target_versions
diff --git a/gcc/config/pa/t-pa b/gcc/config/pa/t-pa
new file mode 100644
index 0000000..fbd05d2
--- /dev/null
+++ b/gcc/config/pa/t-pa
@@ -0,0 +1,4 @@
+pa-d.o: $(srcdir)/config/pa/pa-d.c
+ $(COMPILE) $<
+ $(POSTCOMPILE)
+