]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Solaris: Support -i in shlib-build
authorAndrew Deason <adeason@sinenomine.net>
Sun, 21 Nov 2010 23:57:22 +0000 (18:57 -0500)
committerDerrick Brashear <shadow@dementia.org>
Thu, 25 Nov 2010 21:19:28 +0000 (13:19 -0800)
Our librokenafs.map file contains symbols that we may not actually
define, since the list of exported symbols varies depending on the
platform's capabilities. This causes errors during linking, which can
be suppressed by marking all symbols as "= EXTERN". Do so by having
shlib-build modify the mapfile at link-time, when -i is specified to
indicate ignoring undefined symbols.

Change-Id: I043fca6c8206a19fb7bddbc8e624baeaaff3ab00
Reviewed-on: http://gerrit.openafs.org/3365
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/config/shlib-build.in

index 493ad116fb861f21dd79eb4de5981a5e7987f5fd..c58591bbbab8d92bbc403e9c89e33747bf9218c1 100644 (file)
@@ -97,7 +97,15 @@ rs_aix*)
     ;;
 sun*_5*)
     if [ -f "$srcdir/$library.map" ] ; then
-        export="-Wl,-M$srcdir/$library.map"
+        if [ -z "$ignore" ] ; then
+            export="-Wl,-M$srcdir/$library.map"
+        else
+            # add "= EXTERN" to every symbol, so we don't get errors about
+            # undefined symbols
+            cat "$srcdir/$library.map" | \
+                sed -e 's/\([a-zA-Z_]\);$/\1 = EXTERN;/' > "$library.real.map"
+            export="-Wl,-M$library.real.map"
+        fi
     fi
     if [ -z "$soname" ] ; then
         echo "$linker $export -o $filename $*"