summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/vars.mk5
-rw-r--r--target/config/Config.in.toolchain9
2 files changed, 14 insertions, 0 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index 12b26084d..72a50e9ba 100644
--- a/mk/vars.mk
+++ b/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
diff --git a/target/config/Config.in.toolchain b/target/config/Config.in.toolchain
index 26232e63a..68c683686 100644
--- a/target/config/Config.in.toolchain
+++ b/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