compile with fcommon to support gcc 10

This commit is contained in:
sunguoshuai 2021-07-30 14:53:04 +08:00
parent 6c99f5e7f1
commit c8ae076190
2 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,25 @@
commit e312163ad1349cb767cb38e64908d0dc6247b8f9
Author: Anil Madhavapeddy <anil@recoil.org>
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 <anil@recoil.org>
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

View File

@ -1,13 +1,14 @@
Name: ocaml Name: ocaml
Version: 4.07.0 Version: 4.07.0
Release: 6 Release: 7
Summary: OCaml compiler and programming environment 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 URL: http://www.ocaml.org
Source0: http://caml.inria.fr/pub/distrib/ocaml-4.07/ocaml-%{version}.tar.xz Source0: http://caml.inria.fr/pub/distrib/ocaml-4.07/ocaml-%{version}.tar.xz
Patch0002: 0002-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch Patch0002: 0002-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch
Patch0003: 0003-configure-Allow-user-defined-C-compiler-flags.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: gcc binutils-devel ncurses-devel gdbm-devel emacs gawk perl-interpreter
BuildRequires: util-linux libICE-devel libSM-devel libX11-devel libXaw-devel libXext-devel 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/* %{_mandir}/man3/*
%changelog %changelog
* Fri 30 Jul 2021 sunguoshuai <sunguoshuai@huawei.com> - 4.07.0-7
- compile with -fcommon to support gcc 10
* Thu Jan 22 2020 yanzhihua <yanzhihua4@huawei.com> - 4.07.0-6 * Thu Jan 22 2020 yanzhihua <yanzhihua4@huawei.com> - 4.07.0-6
- modify patching method - modify patching method