Patchwork [VMS] : Build gfortran

login
register
mail settings
Submitter Tristan Gingold
Date March 30, 2012, 1:46 p.m.
Message ID <DB99E81E-7275-43EB-BEB8-34F5D39A66A3@adacore.com>
Download mbox | patch
Permalink /patch/149654/
State New
Headers show

Comments

Tristan Gingold - March 30, 2012, 1:46 p.m.
Hi,

this is the minimum required to build gfortran on VMS.
As vms.h defines TARGET_EXTRA_INCLUDES, we need to add an empty replacement for gfortran not unlike darwin.

Tested by building gfortran.
Committed on trunk.

Tristan.

2012-03-30  Tristan Gingold  <gingold@adacore.com>

	* config/vms/vms-f.c: New file.
	* config/vms/t-vms (vms-f.o): New rule.
	* config.gcc (*-*-*vms*): Define fortran_target_objs.

Patch

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 186009)
+++ gcc/config.gcc	(working copy)
@@ -740,6 +740,7 @@ 
   xm_file="vms/xm-vms.h"
   c_target_objs="vms-c.o"
   cxx_target_objs="vms-c.o"
+  fortran_target_objs="vms-f.o"
   use_gcc_stdint=provide
   tm_file="${tm_file} vms/vms-stdint.h"
   if test x$gnu_ld != xyes; then
Index: gcc/config/vms/t-vms
===================================================================
--- gcc/config/vms/t-vms	(revision 186009)
+++ gcc/config/vms/t-vms	(working copy)
@@ -34,3 +34,8 @@ 
   $(TM_P_H)
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
           $(PREPROCESSOR_DEFINES) $< -o $@
+
+vms-f.o: $(srcdir)/config/vms/vms-f.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+  $(TM_H)
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+          $(PREPROCESSOR_DEFINES) $< -o $@
Index: gcc/config/vms/vms-f.c
===================================================================
--- gcc/config/vms/vms-f.c	(revision 0)
+++ gcc/config/vms/vms-f.c	(revision 0)
@@ -0,0 +1,31 @@ 
+/* VMS support needed only by Fortran frontends.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+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 "tm.h"
+
+void
+vms_c_register_includes (const char *sysroot ATTRIBUTE_UNUSED,
+                         const char *iprefix ATTRIBUTE_UNUSED,
+			 int stdinc ATTRIBUTE_UNUSED)
+{
+  /* No-op for fortran.  */
+}