All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: ndesaulniers@google.com
Cc: yamada.masahiro@socionext.com,
	Sami Tolvanen <samitolvanen@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Kees Cook <keescook@chromium.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Nicholas Piggin <npiggin@gmail.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Vasily Gorbik <gor@linux.ibm.com>, Adrian Reber <adrian@lisas.de>,
	Richard Guy Briggs <rgb@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] init/Kconfig: add config support for detecting linker
Date: Thu, 7 Feb 2019 22:14:44 -0700	[thread overview]
Message-ID: <20190208051444.GA9647@archlinux-ryzen> (raw)
In-Reply-To: <20190207220155.81351-1-ndesaulniers@google.com>

On Thu, Feb 07, 2019 at 02:01:49PM -0800, ndesaulniers@google.com wrote:
> Similar to how we differentiate between CONFIG_CC_IS_GCC and
> CONFIG_CC_IS_CLANG, add CONFIG_LD_IS_BFD, CONFIG_LD_IS_GOLD, and
> CONFIG_LD_IS_LLD.
> 
> This simiplifies patches to Makefiles that need to do different things
> for different linkers.
> 
> Cc: Nathan Chancellor <natechancellor@gmail.com>
> Cc: Sami Tolvanen <samitolvanen@google.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>

> ---
>  init/Kconfig | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/init/Kconfig b/init/Kconfig
> index c9386a365eea..b6046dcf7794 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -26,6 +26,15 @@ config CLANG_VERSION
>  config CC_HAS_ASM_GOTO
>  	def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
>  
> +config LD_IS_BFD
> +	def_bool $(success,$(LD) --version | head -n 1 | grep -q 'GNU ld')
> +
> +config LD_IS_GOLD
> +	def_bool $(success,$(LD) --version | head -n 1 | grep -q 'GNU gold')
> +
> +config LD_IS_LLD
> +	def_bool $(success,$(LD) --version | head -n 1 | grep -q 'LLD')
> +
>  config CONSTRUCTORS
>  	bool
>  	depends on !UML
> -- 
> 2.20.1.791.gb4d0f1c61a-goog
> 

  parent reply	other threads:[~2019-02-08  5:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 22:01 [PATCH 1/4] init/Kconfig: add config support for detecting linker ndesaulniers
2019-02-07 22:01 ` [PATCH 2/4] Makefile: clang: choose GCC_TOOLCHAIN_DIR not on LD ndesaulniers
2019-02-08  5:45   ` Nathan Chancellor
2019-02-07 22:01 ` [PATCH 3/4] Makefile: lld: tell clang to use lld ndesaulniers
2019-02-08  5:50   ` Nathan Chancellor
2019-02-08 17:27     ` Nick Desaulniers
2019-02-08 17:45       ` Nathan Chancellor
2019-02-11 15:32       ` Masahiro Yamada
2019-02-11 16:05         ` Sedat Dilek
2019-02-11 19:30           ` Nick Desaulniers
2019-02-11 19:27         ` Nick Desaulniers
2019-02-11 19:26     ` Nick Desaulniers
2019-02-07 22:01 ` [PATCH 4/4] Makefile: lld: set -O2 linker flag when linking with LLD ndesaulniers
2019-02-08  6:07   ` Nathan Chancellor
2019-02-08  0:48 ` [PATCH 1/4] init/Kconfig: add config support for detecting linker Kees Cook
2019-02-08  0:57 ` Mathieu Desnoyers
2019-02-08  5:41   ` Nathan Chancellor
2019-02-11 15:08     ` Masahiro Yamada
2019-02-08  5:14 ` Nathan Chancellor [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-08 14:06 Sedat Dilek

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=20190208051444.GA9647@archlinux-ryzen \
    --to=natechancellor@gmail.com \
    --cc=adrian@lisas.de \
    --cc=akpm@linux-foundation.org \
    --cc=gor@linux.ibm.com \
    --cc=hannes@cmpxchg.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=ndesaulniers@google.com \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=rgb@redhat.com \
    --cc=samitolvanen@google.com \
    --cc=yamada.masahiro@socionext.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.