OSDN Git Service

2011-12-16 Tristan Gingold <gingold@adacore.com>
authorgingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Dec 2011 15:25:30 +0000 (15:25 +0000)
committergingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Dec 2011 15:25:30 +0000 (15:25 +0000)
* config/vms/vms.c (VMS_CRTL_GLOBAL): Define.
(vms_patch_builtins): Handle.
* config/vms/vms-crtlmap.map: Add an entry for environ.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182405 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/vms/vms-crtlmap.map
gcc/config/vms/vms.c

index 1b7a743..7ed91d1 100644 (file)
@@ -1,3 +1,9 @@
+2011-12-16  Tristan Gingold  <gingold@adacore.com>
+
+       * config/vms/vms.c (VMS_CRTL_GLOBAL): Define.
+       (vms_patch_builtins): Handle.
+       * config/vms/vms-crtlmap.map: Add an entry for environ.
+
 2011-12-16  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/51557
index 4f2755e..47520de 100644 (file)
@@ -63,6 +63,7 @@ ctermid       64
 ctime
 dup
 dup2
+environ       GLOBAL
 exit
 exp           FLOAT
 fabs          FLOAT
index ab37f82..63ca931 100644 (file)
@@ -45,6 +45,9 @@ along with GCC; see the file COPYING3.  If not see
 /* Prepend x before the name for printf like functions.  */
 #define VMS_CRTL_PRNTF (1 << 4)
 
+/* Prepend ga_ for global data.  */
+#define VMS_CRTL_GLOBAL (1 << 5)
+
 struct vms_crtl_name
 {
   /* The standard C name.  */
@@ -123,6 +126,12 @@ vms_patch_builtins (void)
           rlen += 9;
         }
 
+      if (n->flags & VMS_CRTL_GLOBAL)
+        {
+          memcpy (res + rlen, "ga_", 3);
+          rlen += 3;
+        }
+
       if (n->flags & VMS_CRTL_FLOAT)
         res[rlen++] = 't';