]> 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>
Tue, 21 Dec 2010 14:01:54 +0000 (06:01 -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.

Reviewed-on: http://gerrit.openafs.org/3365
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 222067f6f8fd4f596302befbc48918e10547ed1d)
Change-Id: I4bdf000bbdc10b0818c2fab6eaff912f18e1f4fb
Reviewed-on: http://gerrit.openafs.org/3561
Tested-by: Derrick Brashear <shadow@dementia.org>
src/config/shlib-build.in

index e54742b0cb474fef3afc4ba210fa2cfb271fc254..bccbf11a19b1242d8daa92112652a8958e9dc21a 100644 (file)
@@ -92,7 +92,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 $*"