diff --git a/compile-with-fcommon-to-support-gcc-10.patch b/compile-with-fcommon-to-support-gcc-10.patch new file mode 100644 index 0000000000000000000000000000000000000000..95ed40e65d86f3104ee0b0bb90c9abda5d5a7282 --- /dev/null +++ b/compile-with-fcommon-to-support-gcc-10.patch @@ -0,0 +1,25 @@ +commit e312163ad1349cb767cb38e64908d0dc6247b8f9 +Author: Anil Madhavapeddy +Date: Sun Jun 21 19:06:50 2020 +0100 +Subject: [PATCH] ocaml compile with fcommon to support gcc 10 + + Add `-fcommon` unconditionally to CFLAGS to fix gcc10 build + + Signed-off-by: Anil Madhavapeddy + +diff --git a/configure b/configure +index 53f45f8..0609069 100755 +--- a/configure ++++ b/configure +@@ -474,7 +474,7 @@ case "$ccfamily" in + -fno-builtin-memcmp"; + internal_cflags="$gcc_warnings";; + gcc-*) +- common_cflags="-O2 -fno-strict-aliasing -fwrapv"; ++ common_cflags="-O2 -fno-strict-aliasing -fwrapv -fcommon"; + internal_cflags="$gcc_warnings";; + *) + common_cflags="-O";; +-- +2.30.0 + diff --git a/ocaml.spec b/ocaml.spec index e461591343df8430af8c374002cab466f498e277..d9f9b2d15852191ed8c709f34c83af13e0307eee 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -1,13 +1,14 @@ Name: ocaml Version: 4.07.0 -Release: 6 +Release: 7 Summary: OCaml compiler and programming environment -License: QPL and (LGPLv2+ with exceptions) +License: GPL-2.0-or-later and LGPL-2.1-only URL: http://www.ocaml.org Source0: http://caml.inria.fr/pub/distrib/ocaml-4.07/ocaml-%{version}.tar.xz Patch0002: 0002-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch Patch0003: 0003-configure-Allow-user-defined-C-compiler-flags.patch +Patch0004: compile-with-fcommon-to-support-gcc-10.patch BuildRequires: gcc binutils-devel ncurses-devel gdbm-devel emacs gawk perl-interpreter BuildRequires: util-linux libICE-devel libSM-devel libX11-devel libXaw-devel libXext-devel @@ -237,6 +238,9 @@ find %{buildroot} \( -name '*.cmt' -o -name '*.cmti' \) -a -delete %{_mandir}/man3/* %changelog +* Fri 30 Jul 2021 sunguoshuai - 4.07.0-7 +- compile with -fcommon to support gcc 10 + * Thu Jan 22 2020 yanzhihua - 4.07.0-6 - modify patching method