Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Fröberg" <stefan.froberg@petroprogram.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] gcc: Support configure option --with-linker-hash-style
Date: Sat, 16 Dec 2017 01:25:30 +0200	[thread overview]
Message-ID: <20171215232530.9388-1-stefan.froberg@petroprogram.com> (raw)

This will set the default hash style that GCC will 
always use during linking.

Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/gcc/Config.in.host | 27 +++++++++++++++++++++++++++
 package/gcc/gcc.mk         | 12 ++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 70cce0a5c5..b9391392e1 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -152,3 +152,30 @@ config BR2_GCC_ENABLE_GRAPHITE
 
 comment "graphite support needs gcc >= 5.x"
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5
+
+choice 
+	prompt "Hash style used during linking"
+	default BR2_GCC_HASH_STYLE_GNU
+	help
+	  This tells GCC to pass --hash-style=choice option to the
+	  linker for all final links where choice can be one of
+	  "gnu", "sysv" or "both".
+	  Using "gnu" should give best application startup time.
+
+config BR2_GCC_HASH_STYLE_GNU
+	bool "gnu"
+	help
+	  For new style GNU ".gnu.hash" section.
+
+config BR2_GCC_HASH_STYLE_SYSV
+	bool "sysv"
+	help
+	  For classic ELF ".hash" section.
+
+config BR2_GCC_HASH_STYLE_BOTH
+	bool "both"
+	help
+	  For both the classic ELF ".hash" and
+	  new style GNU ".gnu.hash".
+
+endchoice	  
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 27fc1e987c..51bb22d0e9 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -183,6 +183,18 @@ else
 HOST_GCC_COMMON_CONF_OPTS += --without-isl --without-cloog
 endif
 
+ifeq ((BR2_GCC_HASH_STYLE_GNU),y)
+HOST_GCC_COMMON_CONF_OPTS += --with-linker-hash-style=gnu
+endif
+
+ifeq ((BR2_GCC_HASH_STYLE_SYSV),y)
+HOST_GCC_COMMON_CONF_OPTS += --with-linker-hash-style=sysv
+endif
+
+ifeq ((BR2_GCC_HASH_STYLE_BOTH),y)
+HOST_GCC_COMMON_CONF_OPTS += --with-linker-hash-style=both
+endif
+
 ifeq ($(BR2_arc)$(BR2_or1k),y)
 HOST_GCC_COMMON_DEPENDENCIES += host-flex host-bison
 endif
-- 
2.13.6

             reply	other threads:[~2017-12-15 23:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 23:25 Stefan Fröberg [this message]
2017-12-15 23:27 ` [Buildroot] FW: [PATCH 1/1] gcc: Support configure option --with-linker-hash-style Kees van Unen
2017-12-16  1:50   ` Carlos Santos
2017-12-16  1:51     ` [Buildroot] FW: " Kees van Unen
2017-12-16 12:11     ` [Buildroot] " Thomas Petazzoni
2017-12-16 15:23 ` [Buildroot] " Thomas Petazzoni
2017-12-17 14:30   ` Stefan Fröberg
2018-11-08 23:49     ` Romain Naour
2018-11-09 21:35       ` Arnout Vandecappelle
2018-11-10 11:30         ` Romain Naour

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=20171215232530.9388-1-stefan.froberg@petroprogram.com \
    --to=stefan.froberg@petroprogram.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