# HG changeset patch # User ohair # Date 1233451182 28800 # Node ID 69c752d998415145b20b87f51a3c3428ae715937 # Parent 809e899c638bd9b21836abf9d09ab2a30ff3900b 6799141: Build with --hash-style=both so that binaries can work on SuSE 10 Reviewed-by: tbell diff -r 809e899c638b -r 69c752d99841 make/linux/makefiles/gcc.make --- a/make/linux/makefiles/gcc.make Thu Jan 15 11:46:26 2009 -0800 +++ b/make/linux/makefiles/gcc.make Sat Jan 31 17:19:42 2009 -0800 @@ -131,6 +131,14 @@ # 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