Skip to content

Commit

Permalink
Only export symbols that are really there
Browse files Browse the repository at this point in the history
  • Loading branch information
wtoorop committed May 26, 2014
1 parent 9596647 commit 76c6105
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,18 @@ uninstall:
if test $(have_libev) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBEV_LIB) ; fi

libgetdns_ext_event.la: libgetdns.la extension/libevent.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ extension/libevent.lo ./.libs/libgetdns.la $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -release $(version) -export-symbols $(srcdir)/SYMFILE
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ extension/libevent.lo ./.libs/libgetdns.la $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -release $(version) -export-symbols $(srcdir)/extension/libevent.symfile

libgetdns_ext_uv.la: libgetdns.la extension/libuv.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ extension/libuv.lo ./.libs/libgetdns.la $(EXTENSION_LIBUV_LDFLAGS) $(EXTENSION_LIBUV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -release $(version) -export-symbols $(srcdir)/SYMFILE
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ extension/libuv.lo ./.libs/libgetdns.la $(EXTENSION_LIBUV_LDFLAGS) $(EXTENSION_LIBUV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -release $(version) -export-symbols $(srcdir)/extension/libuv.symfile


libgetdns_ext_ev.la: libgetdns.la extension/libev.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ extension/libev.lo ./.libs/libgetdns.la $(EXTENSION_LIBEV_LDFLAGS) $(EXTENSION_LIBEV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -release $(version) -export-symbols $(srcdir)/SYMFILE
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ extension/libev.lo ./.libs/libgetdns.la $(EXTENSION_LIBEV_LDFLAGS) $(EXTENSION_LIBEV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -release $(version) -export-symbols $(srcdir)/extension/libev.symfile


libgetdns.la: $(GETDNS_OBJ)
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ $(GETDNS_OBJ) $(LDFLAGS) -rpath $(libdir) -version-info $(libversion) -no-undefined -release $(version) -export-symbols $(srcdir)/SYMFILE
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ $(GETDNS_OBJ) $(LDFLAGS) -rpath $(libdir) -version-info $(libversion) -no-undefined -release $(version) -export-symbols $(srcdir)/libgetdns.symfile


test: FORCE
Expand Down
1 change: 1 addition & 0 deletions src/extension/libev.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
getdns_extension_set_libev_loop
1 change: 1 addition & 0 deletions src/extension/libevent.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
getdns_extension_set_libevent_base
1 change: 1 addition & 0 deletions src/extension/libuv.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
getdns_extension_set_libuv_loop
17 changes: 17 additions & 0 deletions src/SYMFILE → src/libgetdns.symbols
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
getdns_context_set_namespaces
getdns_context_set_namespaces
getdns_context_set_namespaces
getdns_context_set_namespaces
getdns_context_set_namespaces
getdns_context_set_resolution_type
getdns_context_set_resolution_type
getdns_context_set_follow_redirects
getdns_context_set_follow_redirects
getdns_context_set_dns_transport
getdns_context_set_dns_transport
getdns_context_set_dns_transport
getdns_context_set_dns_transport
getdns_context_set_append_name
getdns_context_set_append_name
getdns_context_set_append_name
getdns_context_set_append_name
getdns_strerror
getdns_list_get_length
getdns_list_get_data_type
Expand Down
5 changes: 0 additions & 5 deletions src/mk-SYMFILE.sh

This file was deleted.

14 changes: 14 additions & 0 deletions src/mk-symfiles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

write_symbols() {
OUTPUT=$1
shift
grep 'getdns_[0-9a-zA-Z_]*(' $* | grep -v '^#' \
| sed -e 's/(.*$//g' -e 's/^.*getdns_/getdns_/g' > $OUTPUT
}

write_symbols libgetdns.symbols getdns/getdns.h.in getdns/getdns_extra.h
write_symbols extension/libevent.symbols getdns/getdns_ext_libevent.h
write_symbols extension/libev.symbols getdns/getdns_ext_libev.h
write_symbols extension/libuv.symbols getdns/getdns_ext_libuv.h

0 comments on commit 76c6105

Please sign in to comment.