bug-gnulib
[Top][All Lists]
Advanced

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

csharpexec, csharpcomp: Add support for dotnet


From: Bruno Haible
Subject: csharpexec, csharpcomp: Add support for dotnet
Date: Wed, 09 Oct 2024 03:54:19 +0200

The csharpexec, csharpcomp modules allow to compile and run C# programs.
So far, they support
  - Mono,
  - the (20 years old, proprietary) SSCLI implementation from Microsoft.

Nowadays, Mono is in minimal maintenance, and the common C# implementation
is .NET (from Microsoft, under MIT license). This implementation can be
obtained
  - either from source,
  - or as Linux binaries from https://versionsof.net/,
  - or as binary packages for some distros such as Ubuntu, CentOS
    (cf. https://repology.org/project/dotnet/versions ).

This series of patches adds support for this implementation to the
csharpexec, csharpcomp modules.

Tested with
  - dotnet 6, 7, 8 on Ubuntu,
  - MSVC (dotnet 6) on Windows and Cygwin.


2024-10-08  Bruno Haible  <bruno@clisp.org>

        csharpcomp: Add support for dotnet.
        * lib/csharpcomp.c: Include <dirent.h>, concat-filename.h, xvasprintf.h.
        (name_is_dll): New function, from lib/csharpexec.c.
        (compile_csharp_using_dotnet): New function.
        (compile_csharp_class): Invoke compile_csharp_using_dotnet.
        * modules/csharpcomp (Depends-on): Add xconcat-filename, scandir,
        alphasort, xvasprintf.

        csharpcomp-script: Add support for dotnet.
        * m4/csharpcomp.m4 (gt_CSHARPCOMP): Support 'dotnet' as implementation.
        Set HAVE_DOTNET_SDK, HAVE_DOTNET_CSC.
        * build-aux/csharpcomp.sh.in: Add implementations for the cases
        $HAVE_DOTNET_SDK = 1 and $HAVE_DOTNET_CSC = 1.

2024-10-08  Bruno Haible  <bruno@clisp.org>

        csharpexec: Add support for dotnet.
        * lib/csharpexec.c: Include <dirent.h>, <errno.h>, <sys/stat.h>,
        dirname.h, concat-filename.h, canonicalize.h, spawn-pipe.h,
        wait-process.h, xalloc.h, copy-file.h, clean-temp-simple.h,
        clean-temp.h.
        (name_is_dll, execute_csharp_using_dotnet): New functions.
        (execute_csharp_program): Invoke execute_csharp_using_dotnet.
        * modules/csharpexec (Depends-on): Add stat, dirname, xconcat-filename,
        canonicalize, spawn-pipe, wait-process, scandir, alphasort, copy-file,
        clean-temp-simple, clean-temp.

        csharpexec-script: Add support for dotnet.
        * m4/csharpexec.m4 (gt_CSHARPEXEC): Support 'dotnet' as implementation.
        Set HAVE_DOTNET.
        * build-aux/csharpexec.sh.in (func_tmpdir): New function, copied from
        build-aux/csharpcomp.sh.in.
        Add implementation for the case $HAVE_DOTNET = 1.

2024-10-08  Bruno Haible  <bruno@clisp.org>

        csharpexec-script, csharpcomp-script: Prepare support for dotnet.
        * m4/csharp.m4 (gt_CSHARP_CHOICE): Recognize 'dotnet' as value of
        --enable-csharp.

2024-10-08  Bruno Haible  <bruno@clisp.org>

        csharpcomp: Behave like csharpcomp-script.
        * lib/csharpcomp.c (compile_csharp_using_sscli): Pass the option
        '-nologo' to csc.

2024-10-08  Bruno Haible  <bruno@clisp.org>

        csharpcomp: Fix memory management bug (regression yesterday).
        * lib/csharpcomp.c (compile_csharp_using_sscli): Allocate the source
        options with malloc() always, not sometimes with malloca() and sometimes
        with malloc().

Attachment: 0001-csharpcomp-Fix-memory-management-bug-regression-yest.patch
Description: Text Data

Attachment: 0002-csharpcomp-Behave-like-csharpcomp-script.patch
Description: Text Data

Attachment: 0003-csharpexec-script-csharpcomp-script-Prepare-support-.patch
Description: Text Data

Attachment: 0004-csharpexec-script-Add-support-for-dotnet.patch
Description: Text Data

Attachment: 0005-csharpexec-Add-support-for-dotnet.patch
Description: Text Data

Attachment: 0006-csharpcomp-script-Add-support-for-dotnet.patch
Description: Text Data

Attachment: 0007-csharpcomp-Add-support-for-dotnet.patch
Description: Text Data


reply via email to

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