1999-02-17 Alexandre Oliva <oliva@dcc.unicamp.br>
+ * ltconfig.in: (freebsd2*, sunos4*, exclude_expsyms): exclude
+ _GLOBAL_OFFSET_TABLE_
+ * ltmain.in: implement exclude_expsyms with egrep
+
* libltdl/ltdl.c (lt_dlmalloc, lt_dlfree): SunOS' cc can't cope
with argument lists, we __P even in the definition
runpath_var=
always_export_symbols=no
export_symbols_cmd="$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq > $export_symbols"
+# include_expsyms should be a list of space-separated symbols to be *always*
+# included in the symbol list
include_expsyms=
+# exclude_expsyms can be an egrep regular expression of symbols to exclude
+# it will be wrapped by `^(' and `) ', so one must not match beginning or
+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+# as well as any symbol that contains `d'.
exclude_expsyms=
case "$host_os" in
with_gnu_ld=no
fi
;;
+
+freebsd2* | sunos4*)
+ exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ ;;
+
esac
ld_shlibs=yes
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
done
- if test -n "$exclude_expsyms"; then
- : # TODO: remove symbols from $nlist
- fi
-
if test -z "$run"; then
# Make sure we have at least an empty file.
test -f "$nlist" || : > "$nlist"
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
+ $mv "$nlist"T "$nlist"
else
$rm "$nlist"T
fi
+ if test -n "$exclude_expsyms"; then
+ egrep -v "^($exclude_expsyms) " "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
if test -f "$nlist"; then
sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$output_objdir/$dlsyms"
else
for arg in $progfiles; do
eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
done
- if test -n "$exclude_expsyms"; then
- : # TODO: remove symbols from $nlist
- fi
+
if test -f "$nlist"; then
+ if test -n "$exclude_expsyms"; then
+ egrep -v "^($exclude_expsyms) " "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
sed 's/^\(.*\) \(.*\)$/ {"\1", (lt_ptr_t) \&\2},/' < "$nlist" >> "$output_objdir/$dlsyms"
else
echo '/* NONE */' >> "$output_objdir/$dlsyms"
{\"$name\", (lt_ptr_t) 0},"
eval "$NM $arg | $global_symbol_pipe > '$nlist'"
- if test -n "$exclude_expsyms"; then
- : # TODO: remove symbols from $nlist
- fi
if test -f "$nlist"; then
+ if test -n "$exclude_expsyms"; then
+ egrep -v "^($exclude_expsyms) " "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
sed 's/^\(.*\) \(.*\)$/ {"\1", (lt_ptr_t) \&\2},/' < "$nlist" >> "$output_objdir/$dlsyms"
else
echo '/* NONE */' >> "$output_objdir/$dlsyms"