Skip to content

Commit

Permalink
Merge bitcoin-core/secp256k1#1022: build: Windows DLL additions
Browse files Browse the repository at this point in the history
c0cd7de build: add -no-undefined to libtool LDFLAGS (fanquake)
fe32a79 build: pass win32-dll to LT_INIT (fanquake)

Pull request description:

  This takes care of two of the outstanding issues in bitcoin#923. One being initializing libtool with `win32-dll` and the other being the addition of `-no-undefined` to the libtool LDFLAGS. See each commit for more details.

  Builders cross-compiling for Windows (including Core) will no-longer see:
  ```bash
  libtool: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only
  ```

  I'm planning on making some related changes downstream.

ACKs for top commit:
  sipa:
    utACK c0cd7de. We indeed have done the work to propertly mark exported symbols, and AFAIK have no imported symbols apart from standard library ones.
  real-or-random:
    ACK c0cd7de
  hebasto:
    ACK c0cd7de

Tree-SHA512: 6756bc88ac439a27117a1341d82a801cef70354a9e7a563592ab3ac7298fbefdaa0a2c410ea3fba8953d53f254c449dc491069f30468db12791027a65dd02f80
  • Loading branch information
real-or-random committed Dec 5, 2021
2 parents 4f01840 + c0cd7de commit 61ae37c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ endif
libsecp256k1_la_SOURCES = src/secp256k1.c
libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB)
libsecp256k1_la_LDFLAGS = -no-undefined

if VALGRIND_ENABLED
libsecp256k1_la_CPPFLAGS += -DVALGRIND
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ AH_TOP([#define LIBSECP256K1_CONFIG_H])
AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/])
AM_INIT_AUTOMAKE([foreign subdir-objects])

LT_INIT
LT_INIT([win32-dll])

# Make the compilation flags quiet unless V=1 is used.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Expand Down

0 comments on commit 61ae37c

Please sign in to comment.