From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 46495@debbugs.gnu.org
Cc: andrewjmoreton@gmail.com
Subject: bug#46495: 28.0.50; [native-comp] Build fails for 32bit --with-wide-int
Date: Wed, 17 Feb 2021 18:03:08 +0000 [thread overview]
Message-ID: <xjfk0r6r2qr.fsf@sdf.org> (raw)
In-Reply-To: <xjfsg5vqd4c.fsf@sdf.org> (Andrea Corallo via's message of "Wed, 17 Feb 2021 09:04:19 +0000")
[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]
Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:
> Andy Moreton <andrewjmoreton@gmail.com> writes:
>
>> On Tue 16 Feb 2021, Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>>
>>> Andy could you point out the two libgccjit versions you used specifying
>>> wich one was used in the successfull / failed experiment?
>>
>> It seems they both now fail (and I have lost the build log from the
>> successful experiment, so I don't have a note of the commit used).
>
> That's odd. The culprit of the bug I've isolated is a crash in
> libgccjit so should be easy to recognize (we should never crash in
> libgccjit).
>
> Anyway I've an half cooked patch to work around this issue, I guess I'll
> test it this evening.
A fix like the attached is working around the GCC bug.
The only annoyance of this approach is that libgccjit for each
compilation is outputting to console:
"libgccjit.so: note: disable pass tree-isolate-paths for functions in the range of [0, 4294967295]"
We probably also want to check at configure time and raise an error in
case configuring --with-nativecomp --with-wide-int but with a (really)
old libgccjit that does not provide
'gcc_jit_context_add_command_line_option'.
Works for me bootstraping Emacs on i686-pc-linux-gnu + GCC10 but I can't
test the Windows side, Andy would you mind giving it a try?
Thanks
Andrea
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 46495.patch --]
[-- Type: text/x-diff, Size: 2665 bytes --]
diff --git a/src/comp.c b/src/comp.c
index 5e95161030..bb3cd83036 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -56,6 +56,7 @@
#undef gcc_jit_block_end_with_return
#undef gcc_jit_block_end_with_void_return
#undef gcc_jit_context_acquire
+#undef gcc_jit_context_add_command_line_option
#undef gcc_jit_context_add_driver_option
#undef gcc_jit_context_compile_to_file
#undef gcc_jit_context_dump_reproducer_to_file
@@ -124,6 +125,8 @@ DEF_DLL_FN (const char *, gcc_jit_context_get_first_error,
DEF_DLL_FN (gcc_jit_block *, gcc_jit_function_new_block,
(gcc_jit_function *func, const char *name));
DEF_DLL_FN (gcc_jit_context *, gcc_jit_context_acquire, (void));
+DEF_DLL_FN (void, gcc_jit_context_add_command_line_option,
+ (gcc_jit_context *ctxt, const char *optname));
DEF_DLL_FN (void, gcc_jit_context_add_driver_option,
(gcc_jit_context *ctxt, const char *optname));
DEF_DLL_FN (gcc_jit_field *, gcc_jit_context_new_field,
@@ -312,6 +315,7 @@ init_gccjit_functions (void)
LOAD_DLL_FN (library, gcc_jit_struct_set_fields);
LOAD_DLL_FN (library, gcc_jit_type_get_const);
LOAD_DLL_FN (library, gcc_jit_type_get_pointer);
+ LOAD_DLL_FN_OPT (library, gcc_jit_context_add_command_line_option);
LOAD_DLL_FN_OPT (library, gcc_jit_context_add_driver_option);
LOAD_DLL_FN_OPT (library, gcc_jit_global_set_initializer);
LOAD_DLL_FN_OPT (library, gcc_jit_version_major);
@@ -330,6 +334,7 @@ #define gcc_jit_block_end_with_jump fn_gcc_jit_block_end_with_jump
#define gcc_jit_block_end_with_return fn_gcc_jit_block_end_with_return
#define gcc_jit_block_end_with_void_return fn_gcc_jit_block_end_with_void_return
#define gcc_jit_context_acquire fn_gcc_jit_context_acquire
+#define gcc_jit_context_add_command_line_option fn_gcc_jit_context_add_command_line_option
#define gcc_jit_context_add_driver_option fn_gcc_jit_context_add_driver_option
#define gcc_jit_context_compile_to_file fn_gcc_jit_context_compile_to_file
#define gcc_jit_context_dump_reproducer_to_file fn_gcc_jit_context_dump_reproducer_to_file
@@ -4400,6 +4405,15 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file,
if (!EQ (HASH_VALUE (func_h, i), Qunbound))
compile_function (HASH_VALUE (func_h, i));
+#if defined (WIDE_EMACS_INT) \
+ && (defined (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option) \
+ || defined (WINDOWSNT))
+ Lisp_Object version = Fcomp_libgccjit_version ();
+ if (!NILP (version) && XFIXNUM (XCAR (version)) >= 10)
+ gcc_jit_context_add_command_line_option (comp.ctxt,
+ "-fdisable-tree-isolate-paths");
+#endif
+
add_driver_options ();
if (comp.debug)
next prev parent reply other threads:[~2021-02-17 18:03 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-13 17:57 bug#46495: 28.0.50; [native-comp] Build fails for 32bit --with-wide-int Andy Moreton
2021-02-13 18:10 ` Eli Zaretskii
2021-02-13 20:23 ` Andy Moreton
2021-02-14 15:59 ` Eli Zaretskii
2021-02-14 13:24 ` Andy Moreton
2021-02-14 15:56 ` Eli Zaretskii
2021-02-14 19:26 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-15 9:01 ` Andy Moreton
2021-02-15 10:19 ` Eli Zaretskii
2021-02-15 12:56 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-16 9:34 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-16 15:29 ` Eli Zaretskii
2021-02-16 16:30 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-16 17:01 ` Eli Zaretskii
2021-02-16 17:17 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-16 19:49 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-16 21:51 ` Andy Moreton
2021-02-17 9:04 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-17 18:03 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-02-18 22:36 ` Andy Moreton
2021-02-19 14:19 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-19 16:01 ` Andy Moreton
2021-02-19 16:06 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-19 17:01 ` Eli Zaretskii
2021-02-19 17:35 ` Andy Moreton
2021-02-19 19:36 ` Eli Zaretskii
2021-02-19 22:07 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-26 10:18 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-26 11:27 ` Eli Zaretskii
2021-03-26 13:10 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-29 15:55 ` Eli Zaretskii
2021-03-29 16:15 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-29 16:59 ` Eli Zaretskii
2021-03-29 18:11 ` David Malcolm
2021-03-29 20:46 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-30 7:50 ` Eli Zaretskii
2021-03-30 9:06 ` Eli Zaretskii
2021-03-31 8:13 ` Eli Zaretskii
2021-03-31 13:03 ` David Malcolm
2021-03-31 13:13 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 13:35 ` Eli Zaretskii
2021-03-31 13:33 ` Eli Zaretskii
2021-03-30 9:22 ` Eli Zaretskii
2021-03-30 14:33 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-30 14:37 ` Eli Zaretskii
2021-03-30 19:19 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 8:07 ` Eli Zaretskii
2021-03-31 8:47 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 11:41 ` Eli Zaretskii
2021-03-31 12:16 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 12:27 ` Eli Zaretskii
2021-03-31 18:26 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 10:01 ` Eli Zaretskii
2021-03-31 10:19 ` Eli Zaretskii
2021-03-31 10:33 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 10:55 ` Eli Zaretskii
2021-03-31 12:24 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 12:41 ` Eli Zaretskii
2021-03-31 12:53 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 11:10 ` Eli Zaretskii
2021-03-31 12:25 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 12:33 ` Eli Zaretskii
2021-03-31 18:52 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 19:16 ` Eli Zaretskii
2021-03-31 19:22 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 19:35 ` Eli Zaretskii
2021-03-31 19:43 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-01 6:37 ` Eli Zaretskii
2021-04-01 7:07 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-01 7:42 ` Eli Zaretskii
2021-04-01 8:18 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-01 8:43 ` Eli Zaretskii
2021-04-01 14:16 ` Michael Welsh Duggan
2021-04-01 19:52 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-10 16:49 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-10 17:38 ` Eli Zaretskii
2021-03-31 19:40 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 10:24 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=xjfk0r6r2qr.fsf@sdf.org \
--to=bug-gnu-emacs@gnu.org \
--cc=46495@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=andrewjmoreton@gmail.com \
/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).