[Top][All Lists]

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

bug#42761: 28.0.50; [feature/native-comp] allow customizing command line

From: Andrea Corallo
Subject: bug#42761: 28.0.50; [feature/native-comp] allow customizing command line/driver options?
Date: Sun, 09 Aug 2020 07:58:20 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Andreas Fuchs <asf@boinkor.net> writes:

> On Sat, Aug 8, 2020 at 3:31 PM Andrea Corallo <akrl@sdf.org> wrote:
>> Regarfing the gcc version: ne option would be to just ifdef the
> body of
>> add_driver_options using
>> LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option and making
> clear
>> that the customize is effective only with GCC>=9.
>> But I think would be better to raise an error if
>> comp-native-driver-options is not empty and
>> gcc_jit_context_add_command_line_option is not available.
>> I think we should make this clear in the customize doc.
> Agreed - that makes sense. I've adjusted the patch accordingly, and
> de-untabified the files that I touched (sorry about the whitespace
> churn,
> leftover customization from another C codebase):
> https://github.com/emacs-mirror/emacs/compare/feature/
> native-comp...antifuchs:allow-setting-driver-options

>From the patch:

> + #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option
> + DEF_DLL_FN (void, gcc_jit_context_add_driver_option,
> +             (gcc_jit_context *ctxt, const char *optname));
> + #endif


> + #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option
> +   LOAD_DLL_FN (library, gcc_jit_context_add_driver_option);
> + #endif

The above should not be ifdef'd as they allow the function to be used
only if present in the library in use at runtime on Windows systems.

Unfortunatelly we do not have such system for Linux where the decision
to include the call is done at compile time.  So unless we implement
that too also the call site has to be a little changed to handle this.

Please have a look for that into in Fcomp_libgccjit_version where we use
gcc_jit_version_*.  These are the only "optional" libgccjit entry point
we used so far.

>> Do you already have copyright paperwork done?
> I signed copyright assignment papers for gnus back in 2001, but those
> are only valid for those changes to gnus. I've requested assignment
> paperwork for GNU Emacs changes now.





reply via email to

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