From 817b039154de6d275738cb31a4e606b2f13d646e Mon Sep 17 00:00:00 2001 From: Toshio くらとみ Date: May 23 2005 01:46:18 +0000 Subject: - Fix for gcc4 and the 32 bit assembly in otherlibs/num. - Fix to allow compilation with RPM_OPT_FLAG defined -O level. --- diff --git a/ocaml-num-gcc4.patch b/ocaml-num-gcc4.patch new file mode 100644 index 0000000..b172ace --- /dev/null +++ b/ocaml-num-gcc4.patch @@ -0,0 +1,20 @@ +--- ocaml-3.08.3/otherlibs/num/bng_ia32.c.x86 2005-05-09 15:24:29.000000000 -0400 ++++ ocaml-3.08.3/otherlibs/num/bng_ia32.c 2005-05-09 22:02:50.000000000 -0400 +@@ -121,7 +121,7 @@ + "leal 4(%1), %1 \n\t" + "decl %2 \n\t" + "jnz 1b" +- : "+&r" (a), "+&r" (b), "+&rm" (blen), "+&r" (out) ++ : "+&r" (a), "+&r" (b), "+m" (blen), "+&r" (out) + : "rm" (d) + : "eax", "edx"); + } +@@ -164,7 +164,7 @@ + "leal 4(%1), %1 \n\t" + "decl %2 \n\t" + "jnz 1b" +- : "+&r" (a), "+&r" (b), "+&rm" (blen), "+&rm" (out), "=&r" (tmp) ++ : "+&r" (a), "+&r" (b), "+m" (blen), "+m" (out), "=&r" (tmp) + : "rm" (d) + : "eax", "edx"); + } diff --git a/ocaml-user-cflags.patch b/ocaml-user-cflags.patch new file mode 100644 index 0000000..361068d --- /dev/null +++ b/ocaml-user-cflags.patch @@ -0,0 +1,13 @@ +--- ocaml-3.08.3/configure.opt 2005-05-08 19:00:34.000000000 -0400 ++++ ocaml-3.08.3/configure 2005-05-08 19:54:50.000000000 -0400 +@@ -1455,6 +1455,10 @@ + nativecccompopts="$nativecccompopts -fomit-frame-pointer";; + esac + ++# Allow user defined C Compiler flags ++bytecccompopts="$bytecccompopts $CFLAGS" ++nativecccompopts="$nativecccompopts $CFLAGS" ++ + # Finish generated files + + cclibs="$cclibs $mathlib" diff --git a/ocaml.spec b/ocaml.spec index 55da096..8b38fda 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -1,6 +1,6 @@ Name: ocaml Version: 3.08.3 -Release: 3 +Release: 4 Summary: Objective Caml compiler and programming environment @@ -11,7 +11,9 @@ Source0: http://caml.inria.fr/distrib/ocaml-3.08/ocaml-3.08.3.tar.bz2 Source1: http://caml.inria.fr/distrib/ocaml-3.08/ocaml-3.08-refman.html.tar.gz Source2: http://caml.inria.fr/distrib/ocaml-3.08/ocaml-3.08-refman.ps.gz Source3: http://caml.inria.fr/distrib/ocaml-3.08/ocaml-3.08-refman.info.tar.gz -Patch: ocaml-rpath.patch +Patch0: ocaml-rpath.patch +Patch1: ocaml-user-cflags.patch +Patch2: ocaml-num-gcc4.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel, gdbm-devel, xorg-x11-devel BuildRequires: tcl-devel, tk-devel @@ -75,12 +77,14 @@ Documentation for Objective Caml. %setup -q -T -b 0 %setup -q -T -D -a 1 %setup -q -T -D -a 3 -%patch -p1 +%patch0 -p1 +%patch1 -p1 -b .cflags +%patch2 -p1 -b .x86_32 + cp %{SOURCE2} refman.ps.gz %build -./configure \ - -ccoption "gcc $RPM_OPT_FLAGS" \ +CFLAGS="$RPM_OPT_FLAGS" ./configure \ -bindir %{_bindir} \ -libdir %{_libdir}/ocaml \ -x11lib %{_prefix}/X11R6/%{_lib} \ @@ -177,6 +181,10 @@ fi %doc emacs/README %changelog +* Mon May 9 2005 Toshio Kuratomi - 3.08.3-4 +- Fix for gcc4 and the 32 bit assembly in otherlibs/num. +- Fix to allow compilation with RPM_OPT_FLAG defined -O level. + * Sun May 22 2005 Jeremy Katz - 3.08.3-3 - rebuild on all arches