Use %build_ldflags instead of $RPM_LD_FLAGS
This commit is contained in:
parent
4f63eea935
commit
efff5510a6
|
@ -46,17 +46,17 @@ dune build %{?_smp_mflags}
|
||||||
# TODO: Once odoc is available, BR it and run this to generate documentation:
|
# TODO: Once odoc is available, BR it and run this to generate documentation:
|
||||||
# dune build %{?_smp_mflags} @doc
|
# dune build %{?_smp_mflags} @doc
|
||||||
|
|
||||||
# Dune passes RPM_LD_FLAGS to ocamlmklib without -ldopt, resulting in "Unknown
|
# Dune passes %%build_ldflags to ocamlmklib without -ldopt, resulting in
|
||||||
# option" warnings from ocamlmklib and a library that has not been linked with
|
# "Unknown option" warnings from ocamlmklib and a library that has not been
|
||||||
# the correct flags. We can't add -ldopt ourselves, since that breaks
|
# linked with the correct flags. We can't add -ldopt ourselves, since that
|
||||||
# compilation of the cmxs files. This seems to be a weakness of dune; linker
|
# breaks compilation of the cmxs files. This seems to be a weakness of dune;
|
||||||
# flags and libraries to be linked with have to be specified together, and
|
# linker flags and libraries to be linked with have to be specified together,
|
||||||
# nothing takes care of separating them and adding ldopt as necessary. We
|
# and nothing takes care of separating them and adding ldopt as necessary. We
|
||||||
# relink manually to address the problem.
|
# relink manually to address the problem.
|
||||||
pushd _build/default/src
|
pushd _build/default/src
|
||||||
ocamlmklib -g -ldopt "$RPM_LD_FLAGS" -o base_stubs *.o
|
ocamlmklib -g -ldopt "%build_ldflags" -o base_stubs *.o
|
||||||
cd ../hash_types/src
|
cd ../hash_types/src
|
||||||
ocamlmklib -g -ldopt "$RPM_LD_FLAGS" -o base_internalhash_types_stubs *.o
|
ocamlmklib -g -ldopt "%build_ldflags" -o base_internalhash_types_stubs *.o
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
Loading…
Reference in New Issue