bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45934: native-comp - Dylib ID of ELN files not optimal


From: Andrea Corallo
Subject: bug#45934: native-comp - Dylib ID of ELN files not optimal
Date: Thu, 28 Jan 2021 21:59:16 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Ciao Davide,

could you give it a try with the following blind patch? (can't test it
my-self).

Thanks

  Andrea

>From c4990edcea51e273452e13a4b9b98549aa62a508 Mon Sep 17 00:00:00 2001
From: Andrea Corallo <akrl@sdf.org>
Date: Thu, 28 Jan 2021 22:54:49 +0100
Subject: [PATCH] * On MacOS set a unique dylib ID (Bug#45934)

        * src/comp.c (Fcomp__compile_ctxt_to_file): On MacOS set a unique
        dylib ID (Bug#45934).
---
 src/comp.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/comp.c b/src/comp.c
index b5adc3ed86..d959c3188c 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4374,6 +4374,16 @@ DEFUN ("comp--compile-ctxt-to-file", 
Fcomp__compile_ctxt_to_file,
                                  GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL,
                                  comp.speed < 0 ? 0
                                  : (comp.speed > 3 ? 3 : comp.speed));
+
+/* On MacOS set a unique dylib ID (Bug#45934). */
+#if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option) \
+  && defined (DARWIN_OS)
+  gcc_jit_context_add_driver_option (
+    comp.ctxt,
+    SSDATA (concat2 (build_string ("-install_name "),
+                    Ffile_name_nondirectory (filename))));
+#endif
+
   comp.d_default_idx =
     CALL1I (comp-data-container-idx, CALL1I (comp-ctxt-d-default, Vcomp_ctxt));
   comp.d_impure_idx =
-- 
2.20.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]