public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Lulu Cheng <chenglulu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>, gcc-patches@gcc.gnu.org
Cc: xuchenghua@loongson.cn, Wang Xuerui <i@xen0n.name>
Subject: Re: [PATCH] LoongArch: adjust the default of -mexplicit-relocs by checking gas feature
Date: Wed, 27 Jul 2022 09:34:21 +0800	[thread overview]
Message-ID: <c2e924f5-a8f6-5d5e-87a4-d25b468fb302@loongson.cn> (raw)
In-Reply-To: <bf9291484b38de830d4d79ca5b8a3d4832f05e9f.camel@xry111.site>


在 2022/7/26 下午10:15, Xi Ruoyao 写道:
>
> The following should work.  I've tested it locally by building GCC with
> both old (2.38 with patch) and new (trunk) Binutils. Ok for trunk?
>
> I simply checked as instead of ld.  If as supports explicitly
> relocations, the produced .o file won't be supported by an old ld even
> if we use -mno-explicit-relocs (because as will generate new relocation
> types for la.local etc).  So such a mismatch between as and ld can be
> considered "completely broken" and we don't need to support it.  And,
> the Alpha port also check the assembler for the default of -mexplicit-
> relocs.
>
> This should be documented in invoke.texi, but currently it does not
> mention -mexplicit-relocs for LoongArch at all.  So I'll submit the
> doclater in another patch.
>
> -- >8 --
>
> The assembly produced with -mexplicit-relocs is not supported by gas <=
> 2.39.  Check if the assembler supports explicit relocations and set the
> default accordingly.
Looks good to me.


  reply	other threads:[~2022-07-27  1:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  7:21 [PATCH][wwwdocs] gcc-13: Add loongarch '-mexplicit-relocs' support Lulu Cheng
2022-07-26  9:44 ` Xi Ruoyao
2022-07-26 11:42   ` Lulu Cheng
2022-07-26 12:01     ` Xi Ruoyao
2022-07-26 13:26       ` Lulu Cheng
2022-07-26 14:15         ` [PATCH] LoongArch: adjust the default of -mexplicit-relocs by checking gas feature Xi Ruoyao
2022-07-27  1:34           ` Lulu Cheng [this message]
2022-07-27  2:22             ` Xi Ruoyao
2022-07-28  2:59       ` [PATCH][wwwdocs] gcc-13: Add loongarch '-mexplicit-relocs' support Lulu Cheng
2022-07-28 10:41         ` Xi Ruoyao
2022-07-28 13:06           ` Lulu Cheng
2022-07-26 11:32 ` Gerald Pfeifer
2022-07-26 12:28   ` Lulu Cheng

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=c2e924f5-a8f6-5d5e-87a4-d25b468fb302@loongson.cn \
    --to=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@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).