From 35732f1e2e39b40f77934f48009ecc3a6611f3be Mon Sep 17 00:00:00 2001 From: ohair Date: Sat, 31 Jan 2009 17:19:42 -0800 Subject: [PATCH] 6799141: Build with --hash-style=both so that binaries can work on SuSE 10 Reviewed-by: tbell --- make/linux/makefiles/gcc.make | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/make/linux/makefiles/gcc.make b/make/linux/makefiles/gcc.make index 4a01c29c5..1a1f1465c 100644 --- a/make/linux/makefiles/gcc.make +++ b/make/linux/makefiles/gcc.make @@ -131,6 +131,14 @@ endif # Enable linker optimization LFLAGS += -Xlinker -O1 +# If this is a --hash-style=gnu system, use --hash-style=both +# The gnu .hash section won't work on some Linux systems like SuSE 10. +_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | grep -- '--hash-style=gnu') +ifneq ($(_HAS_HASH_STYLE_GNU),) + LDFLAGS_HASH_STYLE = -Wl,--hash-style=both +endif +LFLAGS += $(LDFLAGS_HASH_STYLE) + # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. MAPFLAG = -Xlinker --version-script=FILENAME -- GitLab