Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 4.01 macppc compiler build #6045

Closed
vicuna opened this issue Jun 21, 2013 · 1 comment
Closed

fix 4.01 macppc compiler build #6045

vicuna opened this issue Jun 21, 2013 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Jun 21, 2013

Original bug ID: 6045
Reporter: @avsm
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2015-12-11T18:19:55Z)
Resolution: fixed
Priority: normal
Severity: major
Platform: macppc64
OS: debian wheezy
Category: back end (clambda to assembly)

Bug description

Building the 4.01 (or trunk) branch on macppc breaks at the moment due to some of the newer warnings. This patch fixes it and 'make world.opt' completes.

https://github.com/avsm/ocaml/commit/fcbac1b629300273d5ed49f432e97b29bccb837d.patch

From fcbac1b Mon Sep 17 00:00:00 2001
From: Anil Madhavapeddy anil@recoil.org
Date: Fri, 21 Jun 2013 15:08:24 +0100
Subject: [PATCH] fix build on macppc


asmcomp/power/arch.ml | 1 -
asmcomp/power/emit.mlp | 3 +--
asmcomp/power/proc.ml | 3 ---
asmcomp/power/selection.ml | 2 --
4 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/asmcomp/power/arch.ml b/asmcomp/power/arch.ml
index 4e31a8c..cbeba91 100644
--- a/asmcomp/power/arch.ml
+++ b/asmcomp/power/arch.ml
@@ -12,7 +12,6 @@

(* Specific operations for the PowerPC processor *)

-open Misc
open Format

(* Machine-specific command-line options *)
diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
index 4e7b078..794478f 100644
--- a/asmcomp/power/emit.mlp
+++ b/asmcomp/power/emit.mlp
@@ -15,7 +15,6 @@
module StringSet =
Set.Make(struct type t = string let compare (x:t) y = compare x y end)

-open Location
open Misc
open Cmm
open Arch
@@ -820,7 +819,7 @@ let rec emit_all i =
match i with
{desc = Lend} -> ()
| {next = {desc = (Lcondbranch(_, ) | Lcondbranch3(, _, _))}}

  • when is_simple_instr i & no_interference i.res i.next.arg ->
  • when is_simple_instr i && no_interference i.res i.next.arg ->
    emit_instr i.next (Some i);
    emit_all i.next.next
    | _ ->
    diff --git a/asmcomp/power/proc.ml b/asmcomp/power/proc.ml
    index 38adadc..07eb8b6 100644
    --- a/asmcomp/power/proc.ml
    +++ b/asmcomp/power/proc.ml
    @@ -235,7 +235,4 @@ let assemble_file infile outfile =
    Ccomp.command (Config.asm ^ " -o " ^
    Filename.quote outfile ^ " " ^ Filename.quote infile)

-open Clflags;;
-open Config;;

let init () = ()
diff --git a/asmcomp/power/selection.ml b/asmcomp/power/selection.ml
index 41b6e9f..a68c63f 100644
--- a/asmcomp/power/selection.ml
+++ b/asmcomp/power/selection.ml
@@ -12,9 +12,7 @@

(* Instruction selection for the Power PC processor *)

-open Misc
open Cmm
-open Reg
open Arch
open Mach

--
1.8.1.6

Additional information

$ uname -a
Linux maccy 3.2.0-3-powerpc64 #1 SMP Mon Jul 23 08:03:56 UTC 2012 ppc64 GNU/Linux
$ file ocamlopt.opt
ocamlopt.opt: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x693e3e3d6a6b91a97eec4dde402e376635646fd7, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped

@vicuna
Copy link
Author

vicuna commented Jun 21, 2013

Comment author: @gasche

Committed in trunk and version/4.01, thanks.

There are certainly similar changes to be made for other rarely-used architectures, but waiting for patch contributors to stand up looks like a good method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants