public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Arnaud Charlet <charlet@adacore.com>
To: Yang Yujie <yangyujie@loongson.cn>
Cc: gcc-patches@gcc.gnu.org, charlet@adacore.com,
	ebotcazou@libertysurf.fr, poulhies@adacore.com,
	derodat@adacore.com, xuchenghua@loongson.cn,
	chenglulu@loongson.cn
Subject: Re: [PING][PATCH] LoongArch: initial ada support on linux
Date: Fri, 1 Sep 2023 13:52:16 +0000	[thread overview]
Message-ID: <20230901135216.GA2377083@adacore.com> (raw)
In-Reply-To: <20230825044712.348608-1-yangyujie@loongson.cn>

> gcc/ChangeLog:
> 
> 	* ada/Makefile.rtl: Add LoongArch support.
> 	* ada/libgnarl/s-linux__loongarch.ads: New.
> 	* ada/libgnat/system-linux-loongarch.ads: New.
> 	* config/loongarch/loongarch.h: mark normalized options
> 	passed from driver to gnat1 as explicit for multilib.
> ---
> --- a/gcc/ada/Makefile.rtl
> +++ b/gcc/ada/Makefile.rtl
> @@ -2111,6 +2111,55 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
>    LIBRARY_VERSION := $(LIB_VERSION)
>  endif
>  
> +# LoongArch Linux
> +ifeq ($(strip $(filter-out loongarch% linux%,$(target_cpu) $(target_os))),)
> +  LIBGNAT_TARGET_PAIRS = \
> +  a-exetim.adb<libgnarl/a-exetim__posix.adb \
> +  a-exetim.ads<libgnarl/a-exetim__default.ads \
> +  a-intnam.ads<libgnarl/a-intnam__linux.ads \
> +  a-nallfl.ads<libgnat/a-nallfl__wraplf.ads \
> +  a-synbar.adb<libgnarl/a-synbar__posix.adb \
> +  a-synbar.ads<libgnarl/a-synbar__posix.ads \
> +  s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
> +  s-intman.adb<libgnarl/s-intman__posix.adb \
> +  s-linux.ads<libgnarl/s-linux__loongarch.ads \
> +  s-mudido.adb<libgnarl/s-mudido__affinity.adb \
> +  s-osinte.ads<libgnarl/s-osinte__linux.ads \
> +  s-osinte.adb<libgnarl/s-osinte__posix.adb \
> +  s-osprim.adb<libgnat/s-osprim__posix.adb \
> +  s-taprop.adb<libgnarl/s-taprop__linux.adb \
> +  s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
> +  s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
> +  s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
> +  s-taspri.ads<libgnarl/s-taspri__posix.ads \
> +  g-sercom.adb<libgnat/g-sercom__linux.adb \
> +  $(TRASYM_DWARF_UNIX_PAIRS) \
> +  $(GNATRTL_128BIT_PAIRS) \
> +  s-tsmona.adb<libgnat/s-tsmona__linux.adb \
> +  $(ATOMICS_TARGET_PAIRS) \
> +  $(ATOMICS_BUILTINS_TARGET_PAIRS) \
> +  system.ads<libgnat/system-linux-loongarch.ads
> +
> +  TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
> +
> +  EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
> +  EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS)
> +  EXTRA_GNATRTL_TASKING_OBJS = s-linux.o a-exetim.o
> +
> +  EH_MECHANISM = -gcc
> +  THREADSLIB = -lpthread
> +  MISCLIB = -ldl
> +  GNATLIB_SHARED = gnatlib-shared-dual
> +  GMEM_LIB = gmemlib
> +  LIBRARY_VERSION := $(LIB_VERSION)
> +  # Temporarily disable strict alignment -- for some reason, it causes
> +  # infinite loops during stack unwinding (libgcc) and indefinite hang
> +  # in some futex system calls.
> +  GNATLIBCFLAGS := $(GNATLIBCFLAGS) -mno-strict-align
> +  GNATLIBCFLAGS_FOR_C := $(GNATLIBCFLAGS_FOR_C) -mno-strict-align

Patch looks indeed OK.
A small nit above: I'd suggest using += instead of := $(XXX) to make things
clearer.

Arno

  parent reply	other threads:[~2023-09-01 13:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25  4:46 Yang Yujie
2023-08-25  5:55 ` Yujie Yang
2023-08-31  3:31   ` chenglulu
2023-08-31 13:09 ` Marc Poulhiès
2023-09-01  2:05   ` Yujie Yang
2023-09-05 11:23     ` Marc Poulhiès
2023-09-01 13:52 ` Arnaud Charlet [this message]
2023-09-04  2:19   ` Yang Yujie

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

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

  git send-email \
    --in-reply-to=20230901135216.GA2377083@adacore.com \
    --to=charlet@adacore.com \
    --cc=chenglulu@loongson.cn \
    --cc=derodat@adacore.com \
    --cc=ebotcazou@libertysurf.fr \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=poulhies@adacore.com \
    --cc=xuchenghua@loongson.cn \
    --cc=yangyujie@loongson.cn \
    /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.
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).