From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] binutils/gcc: make it possible to use lto
Date: Sun, 9 Nov 2014 14:00:35 +0100 [thread overview]
Message-ID: <20141109140035.3798a1c7@free-electrons.com> (raw)
In-Reply-To: <1415534161-24389-1-git-send-email-syntheticpp@gmx.net>
Dear Peter K?mmel,
On Sun, 9 Nov 2014 12:56:01 +0100, Peter K?mmel wrote:
> When -flto is used the compiler and binutils have to support lto.
> ar/ranlib needs to be called with the lto plugin, therefore use
> the wrappers provided by GCC: *-gcc-ar and *-gcc-ranlib.
>
> Signed-off-by: Peter K?mmel <syntheticpp@gmx.net>
> ---
> package/binutils/binutils.mk | 2 ++
> package/gcc/gcc.mk | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
> index b8dab5d..e552abc 100644
> --- a/package/binutils/binutils.mk
> +++ b/package/binutils/binutils.mk
> @@ -48,6 +48,7 @@ BINUTILS_DISABLE_GDB_CONF_OPTS = \
> BINUTILS_CONF_OPTS = --disable-multilib --disable-werror \
> --host=$(GNU_TARGET_NAME) \
> --target=$(GNU_TARGET_NAME) \
> + --enable-plugins --enable-lto \
> --enable-install-libiberty \
> $(BINUTILS_DISABLE_GDB_CONF_OPTS) \
> $(BINUTILS_EXTRA_CONFIG_OPTIONS)
> @@ -67,6 +68,7 @@ endif
> HOST_BINUTILS_CONF_OPTS = --disable-multilib --disable-werror \
> --target=$(GNU_TARGET_NAME) \
> --disable-shared --enable-static \
> + --enable-plugins --enable-lto \
> --with-sysroot=$(STAGING_DIR) \
> $(BINUTILS_DISABLE_GDB_CONF_OPTS) \
> $(BINUTILS_EXTRA_CONFIG_OPTIONS)
> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> index cdd71aa..a8853f7 100644
> --- a/package/gcc/gcc.mk
> +++ b/package/gcc/gcc.mk
> @@ -92,6 +92,8 @@ HOST_GCC_COMMON_CONF_OPTS = \
> --with-gnu-ld \
> --disable-libssp \
> --disable-multilib \
> + --enable-plugins \
> + --enable-lto \
> --with-gmp=$(HOST_DIR)/usr \
> --with-mpfr=$(HOST_DIR)/usr
>
Should we make this optional?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-11-09 13:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-09 11:56 [Buildroot] [PATCH 1/1] binutils/gcc: make it possible to use lto Peter Kümmel
2014-11-09 13:00 ` Thomas Petazzoni [this message]
2014-11-09 13:16 ` Peter Kuemmel
2014-11-10 9:28 ` Peter Kuemmel
2014-11-10 9:45 ` Thomas Petazzoni
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=20141109140035.3798a1c7@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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