use the same CFLAGS as ocaml would use

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-stdcompat?expand=0&rev=12
This commit is contained in:
Olaf Hering 2021-04-14 13:31:37 +00:00 committed by Git OBS Bridge
parent 0495cf4a1d
commit 8e3c27fb93

View File

@ -16,6 +16,7 @@
#
%global _buildshell /bin/bash
%define _lto_cflags %{nil}
Name: ocaml-stdcompat
Version: 15
@ -28,6 +29,7 @@ URL: https://opam.ocaml.org/packages/stdcompat
Source0: %{name}-%{version}.tar.xz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bash
BuildRequires: ocamlfind(findlib)
BuildRequires: ocaml-rpm-macros >= 20210409
BuildRequires: ocaml(ocaml.opt)
@ -48,6 +50,10 @@ developing applications that use %{name}.
%autosetup -p1
%build
values=( `ocamlc.opt -config-var native_c_compiler` )
export CC="${values[0]}"
unset values[0]
export CFLAGS="${values[@]}"
%make_build -f Makefile.bootstrap
%configure \
--libdir=%{ocaml_standard_library}