From c1aac39eaccd32dc3b74ccfcce701d3d888fbc6b Mon Sep 17 00:00:00 2001 From: Sean McGovern Date: Wed, 7 Oct 2015 17:39:37 -0400 Subject: build: add Solaris symbol versioning The versioning facility in the Solaris linker differs from Linux in 3 ways: 1. It does not support globs in linker scripts for symbol versioning -- this is a GNU extension. 2. The linker argument is '-M', instead of '--version-script'. 3. It is picky about line endings. Each symbol or directive must be on a line of it's own. Let's use make_sunver.pl from GCC to generate a version script that works correctly with the Solaris linker. It's function is to correctly expand the globs in the original generated version script. Signed-off-by: Luca Barbato --- configure | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index ac4c2eb5c6..40bf7255bd 100755 --- a/configure +++ b/configure @@ -3611,6 +3611,7 @@ case $target_os in echo "hwcap_1 = OVERRIDE;" > mapfile && add_ldflags -Wl,-M,mapfile nm_default='nm -P -g' + SLIB_CREATE_DEF_CMD='$(Q)perl $(SRC_PATH)/compat/solaris/make_sunver.pl $$(filter %.ver,$$^) $(OBJS) | grep -v @ > $(SUBDIR)lib$(NAME).ver-sol2' ;; netbsd) disable symver @@ -4650,10 +4651,14 @@ enabled xmm_clobber_test && -Wl,--wrap,sws_scale || disable xmm_clobber_test -echo "X{};" > $TMPV +echo "X { local: *; };" > $TMPV if test_ldflags -Wl,--version-script,$TMPV; then append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver' - check_cc <