summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSean McGovern <gseanmcg@gmail.com>2015-10-07 17:39:37 -0400
committerLuca Barbato <lu_zero@gentoo.org>2015-10-11 15:42:36 +0200
commitc1aac39eaccd32dc3b74ccfcce701d3d888fbc6b (patch)
tree99c2de788e2c57519aaee5495f0dee0bb71fbb14 /configure
parentb9ece15a01782b4f301c0c139d1d7b20f848914c (diff)
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 <lu_zero@gentoo.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 7 insertions, 3 deletions
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 <<EOF && enable symver_asm_label
+elif test_ldflags -Wl,-M,$TMPV; then
+ append SHFLAGS '-Wl,-M,\$(SUBDIR)lib\$(NAME).ver-sol2'
+fi
+
+check_cc <<EOF && enable symver_asm_label
void ff_foo(void) __asm__ ("av_foo@VERSION");
void ff_foo(void) { ${inline_asm+__asm__($quotes);} }
EOF
@@ -4661,7 +4666,6 @@ EOF
__asm__(".symver ff_foo,av_foo@VERSION");
void ff_foo(void) {}
EOF
-fi
if [ -z "$optflags" ]; then
if enabled small; then