On Thu, Jan 27, 2022 at 01:58:34PM +0000, Zbigniew Jędrzejewski-Szmek wrote:
> Hmm, so it sounds like OCaml was actually broken already. For example,
> if OCaml is linked with -flto or -use-ld=lld, then this should not "leak"
> into extensions. The split between flags which are appropriate to propagate
> to extensions and flags which are not is very important, and if it is not
> followed, extensions would be broken too.

I checked and it does not include those.

Before the change (ocaml-csexp-devel-1.5.1-3.fc36.x86_64):

$ ocamlobjinfo /usr/lib64/ocaml/csexp/csexp.cmxa | grep ^Extra
Extra C object files: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
Extra C options: -O2 -flto=auto -ffat-lto-objects -fexceptions -g 
-grecord-gcc-switches -pipe -Wall -Werror=format-security 
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection

After the change (ocaml-csexp-devel-1.5.1-4.fc36.x86_64):

$ ocamlobjinfo /usr/lib64/ocaml/csexp/csexp.cmxa | grep ^Extra
Extra C object files: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 
-Wl,-dT,/builddir/build/BUILD/.package_note-ocaml-csexp-1.5.1-4.fc36.x86_64.ld
Extra C options: -O2 -flto=auto -ffat-lto-objects -fexceptions -g 
-grecord-gcc-switches -pipe -Wall -Werror=format-security 
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection

These flags are used when building and linking OCaml native code that
uses the library (csexp in this case).

Rich.

> > Just about every OCaml package is negatively affected by this change
> > and they all have to be rebuilt.
> 
> That doesn't sound good, but if it turns out that they need to be
> rebuild, I can do that myself.
> 
> Zbyszek
> _______________________________________________
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
> Do not reply to spam on the list, report it: 
> https://pagure.io/fedora-infrastructure

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to