From c73bbe3955bac67e4c99cce5f424e5a59985b4aa Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Apr 12 2024 21:24:27 +0000 Subject: Fix bytecode compilation (RHBZ#2274708) (cherry picked from commit 1d59ea6a22b6dca3d2fb1936d073e53c23313a65) --- diff --git a/0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch b/0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch new file mode 100644 index 0000000..0d21f27 --- /dev/null +++ b/0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch @@ -0,0 +1,30 @@ +From c249fd5caca8f1eed439f83e2bb1af46c8a28a27 Mon Sep 17 00:00:00 2001 +From: Jerry James +Date: Fri, 12 Apr 2024 20:11:50 +0100 +Subject: [PATCH] Fix bytecode compilation to output whole exe instead of using + -custom + +These binaries are more resistant to being stripped. + +Reported-by: Ilya Leoshkevich +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2274708 +--- + subdir-rules.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/subdir-rules.mk b/subdir-rules.mk +index 6bd62b653d8..051dc9d5abe 100644 +--- a/subdir-rules.mk ++++ b/subdir-rules.mk +@@ -49,7 +49,7 @@ LOG_DRIVER = env $(SHELL) $(top_srcdir)/build-aux/guestfs-test-driver + + if !HAVE_OCAMLOPT + MLARCHIVE = cma +-LINK_CUSTOM_OCAMLC_ONLY = -custom ++LINK_CUSTOM_OCAMLC_ONLY = -output-complete-exe + BEST = c + else + MLARCHIVE = cmxa +-- +2.44.0 + diff --git a/guestfs-tools.spec b/guestfs-tools.spec index 9f2ae33..5e123b9 100644 --- a/guestfs-tools.spec +++ b/guestfs-tools.spec @@ -42,6 +42,9 @@ Source2: libguestfs.keyring Patch: 0001-Move-the-repository-to-https-github.com-libguestfs-g.patch Patch: 0002-builder-Add-a-test-of-the-chown-parameter.patch +# Fix bytecode compilation (RHBZ#2274708) +Patch: 0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch + # Basic build requirements. BuildRequires: autoconf, automake, libtool, gettext-devel BuildRequires: gcc, gcc-c++