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 --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e9a95aaec4..a453be75b4 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,9 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC) $(Q)echo '#include "$*.h"' >$@ %.ver: %.v - $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ + $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ | sed -e 's/:/:\ +/' -e 's/; /;\ +/g' > $@ %.c %.h: TAG = GEN -- cgit v1.2.3