From 96e95c4000ce649591275eb4aefceb5f28f92c6b Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 29 Oct 2010 12:40:31 +0100 Subject: [PATCH] shlib-build: Add ignore option Add an option to shlib-build to ignore missing symbols in the map file. This is already the default on some platforms, but others (such as Darwin) require that all symbols in the mapfile be present in the objects. This is a pain for libraries such as libroken, which will have different symbols on different platforms. Specifying -i adds the necessary magic to Darwin's ld to relax this check. Changes may also be necessary for other platforms, but I don't currently have those available for testing. Change-Id: Ieaff8ed6dd4e16dfc420b90b85e4471952d83bd2 Reviewed-on: http://gerrit.openafs.org/3188 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/config/shlib-build.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/config/shlib-build.in b/src/config/shlib-build.in index e54742b0c..493ad116f 100644 --- a/src/config/shlib-build.in +++ b/src/config/shlib-build.in @@ -22,6 +22,7 @@ sysname="@AFS_SYSNAME@" library= major= minor= +unused= srcdir=. done= while [ -z "$done" ] && [ $# -gt 0 ] ; do @@ -51,18 +52,22 @@ while [ -z "$done" ] && [ $# -gt 0 ] ; do minor="$1" shift ;; + -i) + ignore=yes + shift + ;; --) shift done=yes ;; *) - echo 'Usage: shlib-build -l -M -m -- ...' >&2 + echo 'Usage: shlib-build [-i] -l -M -m -- ...' >&2 exit 1 ;; esac done if [ -z "$library" ] ; then - echo 'Usage: shlib-install -l -M -m ' >&2 + echo 'Usage: shlib-install [-i] -l -M -m ' >&2 exit 1 fi @@ -132,6 +137,9 @@ hp_ux*) /global:/ { inglobal=1};' \ > $library.exp export="-Wl,-exported_symbols_list,$library.exp" + if [ ! -z "$ignore" ] ; then + export="$export,-flat_namespace,-undefined,suppress" + fi fi echo "$linker $export -o $filename $*" $linker $export -o "$filename" "$@" -- 2.39.5