logo       
Google Custom Search
    AddThis Social Bookmark Button

r10238 - in trunk/src: . d2c/compiler d2c/compiler/cback d2c/compiler/main : msg#00015

Subject: r10238 - in trunk/src: . d2c/compiler d2c/compiler/cback d2c/compiler/main d2c/runtime/c-code d2c/runtime/dylan d2c/runtime/melange
Author: bruce
Date: Tue Oct  4 07:22:53 2005
New Revision: 10238

Modified:
   trunk/src/configure.in
   trunk/src/d2c/compiler/cback/cback.dylan
   trunk/src/d2c/compiler/main/lid-mode-state.dylan
   trunk/src/d2c/compiler/main/single-file-mode-state.dylan
   trunk/src/d2c/compiler/platforms.descr
   trunk/src/d2c/runtime/c-code/main.c
   trunk/src/d2c/runtime/dylan/debug.dylan
   trunk/src/d2c/runtime/dylan/output.dylan
   trunk/src/d2c/runtime/dylan/system.dylan
   trunk/src/d2c/runtime/melange/melange.dylan
Log:
Job: 7253
Put gcc4 changes on trunk

Modified: trunk/src/configure.in
==============================================================================
--- trunk/src/configure.in      (original)
+++ trunk/src/configure.in      Tue Oct  4 07:22:53 2005
@@ -95,7 +95,11 @@
 
     # might-work stuff
     i*86-*-solaris*) $2=x86-solaris-gcc ;;
-    powerpc-apple-darwin*) $2=ppc-darwin-gcc ;;
+    powerpc-apple-darwin*)
+       case `gcc -dumpversion` in
+            4.*) $2=ppc-darwin-gcc4 ;;
+            *)   $2=ppc-darwin-gcc ;;
+       esac ;;
     powerpc-*-linux-gnu*)  $2=ppc-linux-gcc ;;
     s390*-*-linux-gnu*) $2=s390-linux-gcc ;;
     sparc*-*-linux-gnu*) $2=sparc-linux-gcc ;;

Modified: trunk/src/d2c/compiler/cback/cback.dylan
==============================================================================
--- trunk/src/d2c/compiler/cback/cback.dylan    (original)
+++ trunk/src/d2c/compiler/cback/cback.dylan    Tue Oct  4 07:22:53 2005
@@ -1595,6 +1595,7 @@
   let sov-cclass = specifier-type(#"<simple-object-vector>");
   format(gstream, "long elements = SLOT(vector, long, %d);\n",
         dylan-slot-offset(sov-cclass, #"size"));
+  maybe-emit-include("string.h", file);
   format(gstream, "memcpy(sp, (char *)vector + %d, elements * "
           "sizeof(descriptor_t));\n",
         dylan-slot-offset(sov-cclass, #"%element"));
@@ -3005,9 +3006,11 @@
     rep.representation-has-bottom-value? =>
       let c-type = rep.representation-c-type;
       let temp = new-local(file, modifier: "temp", wanted-rep: c-type);
+      maybe-emit-include("stdlib.h", file);
       format(stream, "if ((%s = %s).heapptr == NULL) abort();\n", temp, name);
       deliver-result(defines, temp, rep, #t, file);
     otherwise =>
+      maybe-emit-include("stdlib.h", file);
       format(stream, "if (!%s_initialized) abort();\n", name);
       deliver-result(defines, name, rep, #t, file);
   end;

Modified: trunk/src/d2c/compiler/main/lid-mode-state.dylan
==============================================================================
--- trunk/src/d2c/compiler/main/lid-mode-state.dylan    (original)
+++ trunk/src/d2c/compiler/main/lid-mode-state.dylan    Tue Oct  4 07:22:53 2005
@@ -589,7 +589,8 @@
   format(*debug-output*, "Building inits.c.\n");
   do-with-c-file(state, concatenate(state.unit-mprefix, "-global-inits"),
                  method(stream)
-                     format(stream, "#include \"runtime.h\"\n\n");
+                     format(stream, "#include \"runtime.h\"\n");
+                     format(stream, "#include <stdlib.h>\n\n");
                      format(stream, 
                             "/* This file is machine generated.  Do not edit. 
*/\n\n");
                      let entry-function-name

Modified: trunk/src/d2c/compiler/main/single-file-mode-state.dylan
==============================================================================
--- trunk/src/d2c/compiler/main/single-file-mode-state.dylan    (original)
+++ trunk/src/d2c/compiler/main/single-file-mode-state.dylan    Tue Oct  4 
07:22:53 2005
@@ -211,6 +211,7 @@
 define method build-inits-dot-c (state :: <single-file-mode-state>) => ();
   format(*debug-output*, "Building inits.\n");
   let stream = state.unit-stream;
+  format(stream, "#include <stdlib.h>\n\n");
   format(stream,
         "void inits(descriptor_t *sp, int argc, char *argv[])\n{\n");
   for (unit in *units*)

Modified: trunk/src/d2c/compiler/platforms.descr
==============================================================================
--- trunk/src/d2c/compiler/platforms.descr      (original)
+++ trunk/src/d2c/compiler/platforms.descr      Tue Oct  4 07:22:53 2005
@@ -395,6 +395,13 @@
 long-long-alignment:           4
 long-double-alignment:         4
 
+platform-name:                  ppc-darwin-gcc4
+inherit-from:                   ppc-darwin-gcc
+default-c-compiler-flags:       -I. -I%s -Os -fomit-frame-pointer 
-no-cpp-precomp
+long-double-size:               16
+long-double-alignment:          16
+
+
 // Linux
 platform-name:                 ppc-linux-gcc
 inherit-from:                  gcc linux ppc

Modified: trunk/src/d2c/runtime/c-code/main.c
==============================================================================
--- trunk/src/d2c/runtime/c-code/main.c (original)
+++ trunk/src/d2c/runtime/c-code/main.c Tue Oct  4 07:22:53 2005
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <math.h>
 #include <time.h>
 

Modified: trunk/src/d2c/runtime/dylan/debug.dylan
==============================================================================
--- trunk/src/d2c/runtime/dylan/debug.dylan     (original)
+++ trunk/src/d2c/runtime/dylan/debug.dylan     Tue Oct  4 07:22:53 2005
@@ -86,6 +86,7 @@
  => (res :: <never-returns>);
   condition-format(*warning-output*, "%s\n", condition);
   condition-force-output(*warning-output*);
+  c-system-include("stdlib.h");
   call-out("abort", void:);
 end;
 

Modified: trunk/src/d2c/runtime/dylan/output.dylan
==============================================================================
--- trunk/src/d2c/runtime/dylan/output.dylan    (original)
+++ trunk/src/d2c/runtime/dylan/output.dylan    Tue Oct  4 07:22:53 2005
@@ -366,6 +366,7 @@
     otherwise =>
       fputs("cheap-io-to-stdio: bad Dylan Cheap-IO stream\n", #"Cheap-Err");
       cheap-force-output(#"Cheap-Err");
+      c-system-include("stdlib.h");
       call-out("abort", void:);
   end select;
 end function cheap-io-to-stdio;
@@ -409,5 +410,6 @@
 
 
 define inline function cheap-force-output(fake-stream :: <symbol>) => ()
+  c-system-include("stdio.h");
   call-out("fflush", int:, ptr: cheap-io-to-stdio(fake-stream));
 end function cheap-force-output;

Modified: trunk/src/d2c/runtime/dylan/system.dylan
==============================================================================
--- trunk/src/d2c/runtime/dylan/system.dylan    (original)
+++ trunk/src/d2c/runtime/dylan/system.dylan    Tue Oct  4 07:22:53 2005
@@ -32,6 +32,8 @@
 // Some of the functions that go in the System module.  Much of the
 // code was moved from the d2c Main module.
 
+c-system-include("stdlib.h");
+
 define function import-string (ptr :: <raw-pointer>)
  => string :: <byte-string>;
   for (len :: <integer> from 0,

Modified: trunk/src/d2c/runtime/melange/melange.dylan
==============================================================================
--- trunk/src/d2c/runtime/melange/melange.dylan (original)
+++ trunk/src/d2c/runtime/melange/melange.dylan Tue Oct  4 07:22:53 2005
@@ -32,6 +32,8 @@
 // produced by Melange rather than being explicitly referenced by users.
 //
 
+c-system-include("string.h");
+
 // Usage: c-variable(int: "&variable") { := expression }
 //
 define macro c-variable
-- 
Gd-chatter mailing list
Gd-chatter@xxxxxxxxxxxxxxxx
https://gauss.gwydiondylan.org/mailman/listinfo/gd-chatter




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>