Browse Source

allow to use hash-style gnu for non-mips targets

Waldemar Brodkorb 11 years ago
parent
commit
82ae0cb11d
2 changed files with 14 additions and 0 deletions
  1. 5 0
      mk/vars.mk
  2. 9 0
      target/config/Config.in.toolchain

+ 5 - 0
mk/vars.mk

@@ -125,6 +125,11 @@ TARGET_CXXFLAGS+=	-flto
 TARGET_LDFLAGS+=	-flto
 endif
 
+# performance optimization, see http://www.akkadia.org/drepper/dsohowto.pdf
+ifneq ($(ADK_TARGET_USE_GNU_HASHSTYLE),)
+TARGET_LDFLAGS+=	-Wl,--hash-style=gnu
+endif
+
 ifeq ($(ADK_LINUX_MICROBLAZE),y)
 TARGET_CFLAGS+=		-mxl-barrel-shift
 TARGET_CXX_FLAGS+=	-mxl-barrel-shift

+ 9 - 0
target/config/Config.in.toolchain

@@ -73,6 +73,15 @@ config ADK_TARGET_USE_GOLD
 	depends on !ADK_LINUX_MIPS
 	default n
 
+config ADK_TARGET_USE_GNU_HASHSTYLE
+	prompt "Use GNU hashstyle for all packages"
+	boolean
+	depends on !ADK_LINUX_MIPS
+	default n
+	help
+	  Performance optimization for applications with lot of shared library
+	  dependencies. See http://www.akkadia.org/drepper/dsohowto.pdf
+
 config ADK_DEBUG
 	bool "Compile applications with debug support by default"
 	default n