public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: freesoftware@logarithmus.dev, gcc-patches@gcc.gnu.org,
	"H.J. Lu" <hjl.tools@gmail.com>, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH] Generalize -fuse-ld= to support absolute path or arbitrary ld.linker
Date: Mon, 28 Jun 2021 15:46:48 +0200	[thread overview]
Message-ID: <20210628134648.GM7746@tucnak> (raw)
In-Reply-To: <244b04d4-34ae-087d-7851-068ed1a7b307@suse.cz>

On Mon, Jun 28, 2021 at 03:26:21PM +0200, Martin Liška wrote:
> > There are 2 options:
> > 1. Add mold to -fuse-ld option
> > 2. Implement --ld-path
> > 
> > The 2nd option is much more future-proof: you won't need to add new
> > -fuse-ld variant each time new linker comes up. To provide some
> > context: clang had been supporting passing path to -fuse-ld, but since
> > clang 12 this is deprecated in favor of new --ld-path option. I think
> > we should take an example from clang and implement this useful feature
> > in gcc as well.
> 
> Can you please provide a pointer for the deprecation.
> I'm adding Jakub who recommended using the -B argument.

-B will work with any gcc version, at least from the past 3+ decades,
just mkdir /whatever/dir/ and put the linker or symlink (with ld basename)
to it there, then -B /whatever/dir/

--ld-path= is a bad idea, it doesn't follow use any usual option naming
conventions.

Note, all these extra linkers (lld, mold) will not really work properly,
gcc during configuration detects various assembler and linker properties
on which it then relies on and I'm sure neither lld nor mold supports
those features.

HAVE_LD_ALIGNED_SHF_MERGE
HAVE_LD_AS_NEEDED
HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH
HAVE_LD_BNDPLT_SUPPORT
HAVE_LD_BROKEN_PE_DWARF5
HAVE_LD_BUILDID
HAVE_LD_CLEARCAP
HAVE_LD_COMPRESS_DEBUG
HAVE_LD_DEMANGLE
HAVE_LD_EH_FRAME_CIEV3
HAVE_LD_EH_FRAME_HDR
HAVE_LD_EH_GC_SECTIONS
HAVE_LD_EH_GC_SECTIONS_BUG
HAVE_LD_LARGE_TOC
HAVE_LD_NO_DOT_SYMS
HAVE_LD_PERSONALITY_RELAXATION
HAVE_LD_PIE
HAVE_LD_PIE_COPYRELOC
HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE
HAVE_LD_PUSHPOPSTATE_SUPPORT
HAVE_LD_RO_RW_SECTION_MIXING
HAVE_LD_SOL2_EMULATION
HAVE_LD_STATIC_DYNAMIC
HAVE_LD_SYSROOT

is what is currently tested (not all of these for all targets).

	Jakub


  parent reply	other threads:[~2021-06-28 13:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-26 14:44 Artur Sinila
2021-06-28 12:08 ` Martin Liška
2021-06-28 12:24   ` Artur Sinila
2021-06-28 13:26     ` Martin Liška
2021-06-28 13:41       ` Artur Sinila
2021-06-28 13:49         ` Jakub Jelinek
2021-06-28 13:46       ` Jakub Jelinek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-10  0:02 Fangrui Song via gcc-patches
2020-02-13 17:59 ` Fangrui Song via gcc-patches
2020-02-24 23:02   ` Fangrui Song via gcc-patches
2020-03-11 12:55 ` Martin Liška
2020-04-05 22:32   ` Fangrui Song
2020-04-06  7:18     ` Martin Liška

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=20210628134648.GM7746@tucnak \
    --to=jakub@redhat.com \
    --cc=freesoftware@logarithmus.dev \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=hubicka@ucw.cz \
    --cc=mliska@suse.cz \
    /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).