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

better FreeBSD-support for O'Caml 2.04 #2367

Closed
vicuna opened this issue Feb 11, 2000 · 1 comment
Closed

better FreeBSD-support for O'Caml 2.04 #2367

vicuna opened this issue Feb 11, 2000 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Feb 11, 2000

Original bug ID: 36
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hello,

I just want to send you some patches that improve the
FreeBSD-support of O'Caml 2.04. Those patches are part
of the changes done in the FreeBSD ports collection
(/usr/ports/lang/ocaml on FreeBSD-systems).

Main additions are the support for the profiler and the
x86 bignum lib.

Regards,
Ronald

--- configure.orig Fri Feb 11 16:15:25 2000
+++ configure Fri Feb 11 16:27:37 2000
@@ -290,6 +290,7 @@
case "$host" in
alpha--osf) arch=alpha; system=digital;;
alpha--linux) arch=alpha; system=linux;;

  • alpha--freebsd) arch=alpha; system=freebsd;;
    alpha--netbsd) arch=alpha; system=netbsd;;
    alpha--openbsd) arch=alpha; system=openbsd;;
    sparc--sunos4.) arch=sparc; system=sunos;;
    @@ -340,6 +341,7 @@
    alpha,,digital) asflags='-O2'; asppflags='-O2 -DSYS_$(SYSTEM)';
    asppprofflags='-pg -DPROFILING';;
    alpha,
    ,linux) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
  • alpha,,freebsd) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
    alpha,
    ,netbsd) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
    alpha,,openbsd) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
    mips,
    ,irix) asflags='-n32 -O2'; asppflags="$asflags";;
    @@ -365,6 +367,7 @@
    case "$arch,$model,$system" in
    alpha,,digital) profiling='prof';;
    i386,
    ,linux_elf) profiling='prof';;
  • i386,*,bsd) profiling='prof';;
    *) profiling='noprof';;
    esac

@@ -649,6 +652,7 @@
alpha--osf) bignum_arch=alpha;;
i[3456]86--linux) bignum_arch=x86;;
i[3456]86-
-beos) bignum_arch=x86;;

  • i[3456]86--bsd) bignum_arch=x86;;
    sparc-
    -sunos*) bignum_arch=supersparc;;
    sparc--solaris) bignum_arch=supersparc-solaris;;
    sparc-*-bsd) bignum_arch=sparc;;

--- asmcomp/i386/emit.mlp.orig Fri Feb 11 16:33:42 2000
+++ asmcomp/i386/emit.mlp Fri Feb 11 16:53:31 2000
@@ -713,6 +713,15 @@
popl %edx\n;
popl %ecx\n;
popl %eax\n

  • | "bsd_elf" ->
  •  `	pushl	%eax\n`;
    
  •  `	movl	%esp, %ebp\n`;
    
  •  `	pushl	%ecx\n`;
    
  •  `	pushl	%edx\n`;
    
  •  `	call	.mcount\n`;
    
  •  `	popl	%edx\n`;
    
  •  `	popl	%ecx\n`;
    
  •  `	popl	%eax\n`
    
    | _ -> () (unsupported yet)

(* Emission of a function declaration *)

--- asmrun/i386.S.orig Wed Nov 17 19:56:48 1999
+++ asmrun/i386.S Fri Feb 11 16:51:35 2000
@@ -35,13 +35,22 @@
#define FUNCTION_ALIGN 2
#endif

-#if defined(PROFILING) && defined(SYS_linux_elf)
+#if defined(PROFILING)
+#if defined(SYS_linux_elf)
#define PROFILE_CAML
pushl %ebp; movl %esp, %ebp; pushl %eax; pushl %ecx; pushl %edx;
call mcount;
popl %edx; popl %ecx; popl %eax; popl %ebp
#define PROFILE_C
pushl %ebp; movl %esp, %ebp; call mcount; popl %ebp
+#elif defined(SYS_bsd_elf)
+#define PROFILE_CAML \

  •    pushl %ebp; movl %esp, %ebp; pushl %eax; pushl %ecx; pushl %edx; \
    
  •    call .mcount; \
    
  •    popl %edx; popl %ecx; popl %eax; popl %ebp
    

+#define PROFILE_C \

  •    pushl %ebp; movl %esp, %ebp; call .mcount; popl %ebp
    

+#endif
#else
#define PROFILE_CAML
#define PROFILE_C

--- otherlibs/num/bignum/Makefile.orig Thu Dec 4 19:07:35 1997
+++ otherlibs/num/bignum/Makefile Fri Feb 11 16:54:51 2000
@@ -73,7 +73,7 @@
$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" all

alpha: scratch

  • as -O s/alphaKerN.s -o o/KerN.o
  • as s/alphaKerN.s -o o/KerN.o
    $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" all

pyramid: scratch

--- asmcomp/alpha/emit.mlp.orig Fri Feb 11 16:55:21 2000
+++ asmcomp/alpha/emit.mlp Fri Feb 11 16:56:28 2000
@@ -274,7 +274,7 @@
let rdata_section =
match Config.system with
"digital" | "openbsd" -> ".rdata"

  • | "linux" | "netbsd" -> ".section .rodata"
  • | "linux" | "netbsd" "freebsd" -> ".section .rodata"
    | _ -> assert false

(* Names of various instructions *)

--- otherlibs/graph/open.c.orig Fri Feb 11 18:00:12 2000
+++ otherlibs/graph/open.c Fri Feb 11 17:59:18 2000
@@ -13,6 +13,7 @@
/* $Id: open.c,v 1.12 1999/11/18 13:33:53 xleroy Exp $ */

#include <fcntl.h>
+#include <unistd.h>
#include <signal.h>
#include "libgraph.h"
#include <alloc.h>

--- byterun/config.h.orig Fri Feb 11 18:34:29 2000
+++ byterun/config.h Fri Feb 11 18:34:06 2000
@@ -27,6 +27,7 @@

#ifdef HAS_MEMMOVE
#undef bcopy
+#include <string.h>
#define bcopy(src,dst,len) memmove((dst), (src), (len))
#else
#ifdef HAS_BCOPY

--
Give a man a fish, and you feed him for a day.
Tell him he should learn how to fish himself,
and he'll hate you for a lifetime.

@vicuna
Copy link
Author

vicuna commented Mar 6, 2000

Comment author: administrator

Merged in 3.00

@vicuna vicuna closed this as completed Mar 6, 2000
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant