unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alan Third <alan@idiocy.org>
Cc: Davide Restivo <davide.restivo@yahoo.it>,
	45934@debbugs.gnu.org, xgutter@yahoo.it,
	Andrea Corallo <akrl@sdf.org>
Subject: bug#45934: native-comp - Dylib ID of ELN files not optimal
Date: Sat, 07 Aug 2021 12:25:02 +0200	[thread overview]
Message-ID: <877dgx8sch.fsf@gnus.org> (raw)
In-Reply-To: <87im0h8tmo.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 07 Aug 2021 11:57:19 +0200")

OK, back to the ostensible subject of this bug report.

This is what the current trunk currently gives us:

bash-3.2$ otool -D native-lisp/28_0_50-395a4a99/preloaded/x-win-3c49581f-3fe8af32.eln 
native-lisp/28_0_50-395a4a99/preloaded/x-win-3c49581f-3fe8af32.eln:
/var/folders/09/qpnlh75n3t70kt9dcw8jlqb80000gn/T//libgccjit-BikCmL/fake.so

And with Andrea's patch it...  er...  segfaults...

Let's try a "make bootstrap" and see whether that helps.  ... Yup, now
it compiles fine.

And:

bash-3.2$ otool -D native-lisp/28_0_50-395a4a99/preloaded/x-win-3c49581f-3fe8af32.eln 
native-lisp/28_0_50-395a4a99/preloaded/x-win-3c49581f-3fe8af32.eln:
/var/folders/09/qpnlh75n3t70kt9dcw8jlqb80000gn/T//libgccjit-Lge08S/fake.so

So...  it had no effect?  This was the patch I applied:

diff --git a/src/comp.c b/src/comp.c                                            
index c380346482..6347c015cd 100644                                             
--- a/src/comp.c                                                                
+++ b/src/comp.c                                                                
@@ -4490,6 +4490,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 ("-dynamiclib -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 =                                                          



-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






  reply	other threads:[~2021-08-07 10:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <EDAEF3DD-6B4E-4ED9-A7B8-8FB4F236DF42.ref@yahoo.it>
2021-01-17 10:13 ` bug#45934: native-comp - Dylib ID of ELN files not optimal davide.restivo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-17 12:36   ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-17 16:48     ` davide.restivo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-17 20:06       ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-23 16:13         ` davide.restivo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-24 19:37           ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-28 21:59           ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-29  7:09             ` Eli Zaretskii
2021-01-29  8:52               ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-30  8:18             ` davide.restivo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-11 16:00               ` xgutter--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-30 12:32                 ` Lars Ingebrigtsen
2021-08-02 14:19                   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-04  6:55                     ` Lars Ingebrigtsen
2021-08-04 18:11                       ` Alan Third
2021-08-05 10:54                         ` Lars Ingebrigtsen
2021-08-05 19:00                           ` Alan Third
2021-08-06 10:49                             ` Lars Ingebrigtsen
2021-08-06 16:37                               ` Alan Third
2021-08-07  9:52                                 ` Lars Ingebrigtsen
2021-08-07  9:57                                   ` Lars Ingebrigtsen
2021-08-07 10:25                                     ` Lars Ingebrigtsen [this message]
2021-08-07 13:11                                       ` Alan Third
2021-08-09 12:20                                         ` Lars Ingebrigtsen
2021-08-22 17:18                                           ` Davide Restivo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-22 19:40                                             ` Davide Restivo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-22 21:18                                               ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dgx8sch.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=45934@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=alan@idiocy.org \
    --cc=davide.restivo@yahoo.it \
    --cc=xgutter@yahoo.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).