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:
|
||||
# dune build %{?_smp_mflags} @doc
|
||||
|
||||
# Dune passes RPM_LD_FLAGS to ocamlmklib without -ldopt, resulting in "Unknown
|
||||
# option" warnings from ocamlmklib and a library that has not been linked with
|
||||
# the correct flags. We can't add -ldopt ourselves, since that breaks
|
||||
# compilation of the cmxs files. This seems to be a weakness of dune; linker
|
||||
# flags and libraries to be linked with have to be specified together, and
|
||||
# nothing takes care of separating them and adding ldopt as necessary. We
|
||||
# Dune passes %%build_ldflags to ocamlmklib without -ldopt, resulting in
|
||||
# "Unknown option" warnings from ocamlmklib and a library that has not been
|
||||
# linked with the correct flags. We can't add -ldopt ourselves, since that
|
||||
# breaks compilation of the cmxs files. This seems to be a weakness of dune;
|
||||
# linker flags and libraries to be linked with have to be specified together,
|
||||
# and nothing takes care of separating them and adding ldopt as necessary. We
|
||||
# relink manually to address the problem.
|
||||
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
|
||||
ocamlmklib -g -ldopt "$RPM_LD_FLAGS" -o base_internalhash_types_stubs *.o
|
||||
ocamlmklib -g -ldopt "%build_ldflags" -o base_internalhash_types_stubs *.o
|
||||
popd
|
||||
|
||||
%install
|
||||
|
|
Loading…
Reference in New Issue